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

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.stat = type { i64, i64, i64, i32, i32, i32, i32, i64, i64, i64, i64, %struct.timespec, %struct.timespec, %struct.timespec, [3 x i64] }
%struct.timespec = type { i64, i64 }
%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 { i64, 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.18 = external hidden unnamed_addr constant [3 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: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #1

declare noalias ptr @fopen(ptr noundef, ptr noundef) #2

declare i32 @fclose(ptr noundef) #2

; Function Attrs: nounwind
declare i32 @stat(ptr noundef, ptr noundef) #3

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

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

15:                                               ; preds = %2
  store i32 -1, ptr %3, align 4
  store i32 1, ptr %12, align 4
  br label %149

16:                                               ; preds = %2
  %17 = getelementptr inbounds [65536 x i8], ptr %9, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 16 %17, i8 0, i64 65536, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %10, i8 0, i64 144, i1 false)
  %18 = load ptr, ptr %5, align 8, !tbaa !5
  %19 = call i32 @stat(ptr noundef %18, ptr noundef %10) #5
  %20 = icmp ne i32 %19, 0
  br i1 %20, label %21, label %22

21:                                               ; preds = %16
  store i32 -3, ptr %3, align 4
  store i32 1, ptr %12, align 4
  br label %149

22:                                               ; preds = %16
  %23 = getelementptr inbounds %struct.stat, ptr %10, i32 0, i32 3
  %24 = load i32, ptr %23, align 8, !tbaa !13
  %25 = and i32 %24, 4095
  %26 = trunc i32 %25 to i16
  store i16 %26, ptr %11, align 2, !tbaa !16
  %27 = getelementptr inbounds %struct.stat, ptr %10, i32 0, i32 3
  %28 = load i32, ptr %27, align 8, !tbaa !13
  %29 = and i32 %28, 61440
  %30 = icmp eq i32 %29, 16384
  br i1 %30, label %31, label %36

31:                                               ; preds = %22
  %32 = load i16, ptr %11, align 2, !tbaa !16
  %33 = zext i16 %32 to i32
  %34 = or i32 %33, 16384
  %35 = trunc i32 %34 to i16
  store i16 %35, ptr %11, align 2, !tbaa !16
  br label %36

36:                                               ; preds = %31, %22
  %37 = getelementptr inbounds %struct.stat, ptr %10, i32 0, i32 3
  %38 = load i32, ptr %37, align 8, !tbaa !13
  %39 = and i32 %38, 61440
  %40 = icmp eq i32 %39, 32768
  br i1 %40, label %41, label %46

41:                                               ; preds = %36
  %42 = load i16, ptr %11, align 2, !tbaa !16
  %43 = zext i16 %42 to i32
  %44 = or i32 %43, 32768
  %45 = trunc i32 %44 to i16
  store i16 %45, ptr %11, align 2, !tbaa !16
  br label %46

46:                                               ; preds = %41, %36
  %47 = getelementptr inbounds %struct.stat, ptr %10, i32 0, i32 3
  %48 = load i32, ptr %47, align 8, !tbaa !13
  %49 = and i32 %48, 61440
  %50 = icmp eq i32 %49, 40960
  br i1 %50, label %51, label %56

51:                                               ; preds = %46
  %52 = load i16, ptr %11, align 2, !tbaa !16
  %53 = zext i16 %52 to i32
  %54 = or i32 %53, 40960
  %55 = trunc i32 %54 to i16
  store i16 %55, ptr %11, align 2, !tbaa !16
  br label %56

56:                                               ; preds = %51, %46
  %57 = getelementptr inbounds %struct.stat, ptr %10, i32 0, i32 3
  %58 = load i32, ptr %57, align 8, !tbaa !13
  %59 = and i32 %58, 61440
  %60 = icmp eq i32 %59, 24576
  br i1 %60, label %61, label %66

61:                                               ; preds = %56
  %62 = load i16, ptr %11, align 2, !tbaa !16
  %63 = zext i16 %62 to i32
  %64 = or i32 %63, 24576
  %65 = trunc i32 %64 to i16
  store i16 %65, ptr %11, align 2, !tbaa !16
  br label %66

66:                                               ; preds = %61, %56
  %67 = getelementptr inbounds %struct.stat, ptr %10, i32 0, i32 3
  %68 = load i32, ptr %67, align 8, !tbaa !13
  %69 = and i32 %68, 61440
  %70 = icmp eq i32 %69, 8192
  br i1 %70, label %71, label %76

71:                                               ; preds = %66
  %72 = load i16, ptr %11, align 2, !tbaa !16
  %73 = zext i16 %72 to i32
  %74 = or i32 %73, 8192
  %75 = trunc i32 %74 to i16
  store i16 %75, ptr %11, align 2, !tbaa !16
  br label %76

76:                                               ; preds = %71, %66
  %77 = getelementptr inbounds %struct.stat, ptr %10, i32 0, i32 3
  %78 = load i32, ptr %77, align 8, !tbaa !13
  %79 = and i32 %78, 61440
  %80 = icmp eq i32 %79, 4096
  br i1 %80, label %81, label %86

81:                                               ; preds = %76
  %82 = load i16, ptr %11, align 2, !tbaa !16
  %83 = zext i16 %82 to i32
  %84 = or i32 %83, 4096
  %85 = trunc i32 %84 to i16
  store i16 %85, ptr %11, align 2, !tbaa !16
  br label %86

86:                                               ; preds = %81, %76
  %87 = getelementptr inbounds %struct.stat, ptr %10, i32 0, i32 3
  %88 = load i32, ptr %87, align 8, !tbaa !13
  %89 = and i32 %88, 61440
  %90 = icmp eq i32 %89, 49152
  br i1 %90, label %91, label %96

91:                                               ; preds = %86
  %92 = load i16, ptr %11, align 2, !tbaa !16
  %93 = zext i16 %92 to i32
  %94 = or i32 %93, 49152
  %95 = trunc i32 %94 to i16
  store i16 %95, ptr %11, align 2, !tbaa !16
  br label %96

96:                                               ; preds = %91, %86
  %97 = load i16, ptr %11, align 2, !tbaa !16
  %98 = zext i16 %97 to i32
  %99 = shl i32 %98, 16
  %100 = getelementptr inbounds %struct.stat, ptr %10, i32 0, i32 3
  %101 = load i32, ptr %100, align 8, !tbaa !13
  %102 = and i32 %101, 128
  %103 = icmp ne i32 %102, 0
  %104 = xor i1 %103, true
  %105 = zext i1 %104 to i32
  %106 = or i32 %99, %105
  %107 = load ptr, ptr %4, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct.zip_t, ptr %107, i32 0, i32 2
  %109 = getelementptr inbounds %struct.zip_entry_t, ptr %108, i32 0, i32 11
  store i32 %106, ptr %109, align 8, !tbaa !18
  %110 = getelementptr inbounds %struct.stat, ptr %10, i32 0, i32 3
  %111 = load i32, ptr %110, align 8, !tbaa !13
  %112 = and i32 %111, 61440
  %113 = icmp eq i32 %112, 16384
  br i1 %113, label %114, label %120

114:                                              ; preds = %96
  %115 = load ptr, ptr %4, align 8, !tbaa !5
  %116 = getelementptr inbounds %struct.zip_t, ptr %115, i32 0, i32 2
  %117 = getelementptr inbounds %struct.zip_entry_t, ptr %116, i32 0, i32 11
  %118 = load i32, ptr %117, align 8, !tbaa !18
  %119 = or i32 %118, 16
  store i32 %119, ptr %117, align 8, !tbaa !18
  br label %120

120:                                              ; preds = %114, %96
  %121 = getelementptr inbounds %struct.stat, ptr %10, i32 0, i32 12
  %122 = getelementptr inbounds %struct.timespec, ptr %121, i32 0, i32 0
  %123 = load i64, ptr %122, align 8, !tbaa !24
  %124 = load ptr, ptr %4, align 8, !tbaa !5
  %125 = getelementptr inbounds %struct.zip_t, ptr %124, i32 0, i32 2
  %126 = getelementptr inbounds %struct.zip_entry_t, ptr %125, i32 0, i32 12
  store i64 %123, ptr %126, align 8, !tbaa !25
  %127 = load ptr, ptr %5, align 8, !tbaa !5
  %128 = call noalias ptr @fopen(ptr noundef %127, ptr noundef @.str.18)
  store ptr %128, ptr %8, align 8, !tbaa !5
  %129 = icmp ne ptr %128, null
  br i1 %129, label %131, label %130

130:                                              ; preds = %120
  store i32 -16, ptr %3, align 4
  store i32 1, ptr %12, align 4
  br label %149

131:                                              ; preds = %120
  br label %132

132:                                              ; preds = %144, %131
  %133 = getelementptr inbounds [65536 x i8], ptr %9, i64 0, i64 0
  %134 = load ptr, ptr %8, align 8, !tbaa !5
  %135 = call i64 @fread(ptr noundef %133, i64 noundef 1, i64 noundef 65536, ptr noundef %134)
  store i64 %135, ptr %7, align 8, !tbaa !11
  %136 = icmp ugt i64 %135, 0
  br i1 %136, label %137, label %145

137:                                              ; preds = %132
  %138 = load ptr, ptr %4, align 8, !tbaa !5
  %139 = getelementptr inbounds [65536 x i8], ptr %9, i64 0, i64 0
  %140 = load i64, ptr %7, align 8, !tbaa !11
  %141 = call i32 @zip_entry_write(ptr noundef %138, ptr noundef %139, i64 noundef %140)
  %142 = icmp slt i32 %141, 0
  br i1 %142, label %143, label %144

143:                                              ; preds = %137
  store i32 -8, ptr %6, align 4, !tbaa !9
  br label %145

144:                                              ; preds = %137
  br label %132, !llvm.loop !26

145:                                              ; preds = %143, %132
  %146 = load ptr, ptr %8, align 8, !tbaa !5
  %147 = call i32 @fclose(ptr noundef %146)
  %148 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %148, ptr %3, align 4
  store i32 1, ptr %12, align 4
  br label %149

149:                                              ; preds = %145, %130, %21, %15
  call void @llvm.lifetime.end.p0(i64 2, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 144, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 65536, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  %150 = load i32, ptr %3, align 4
  ret i32 %150
}

declare i64 @fread(ptr noundef, i64 noundef, i64 noundef, ptr noundef) #2

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !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, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!14, !10, i64 24}
!14 = !{!"stat", !12, i64 0, !12, i64 8, !12, i64 16, !10, i64 24, !10, i64 28, !10, i64 32, !10, i64 36, !12, i64 40, !12, i64 48, !12, i64 56, !12, i64 64, !15, i64 72, !15, i64 88, !15, i64 104, !7, i64 120}
!15 = !{!"timespec", !12, i64 0, !12, i64 8}
!16 = !{!17, !17, i64 0}
!17 = !{!"short", !7, i64 0}
!18 = !{!19, !10, i64 319592}
!19 = !{!"zip_t", !20, i64 0, !10, i64 112, !21, i64 120}
!20 = !{!"", !12, i64 0, !12, i64 8, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !12, 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}
!21 = !{!"zip_entry_t", !12, i64 0, !6, i64 8, !12, i64 16, !12, i64 24, !10, i64 32, !12, i64 40, !7, i64 48, !12, i64 80, !17, i64 88, !22, i64 96, !23, i64 120, !10, i64 319472, !12, i64 319480}
!22 = !{!"", !6, i64 0, !12, i64 8, !12, i64 16}
!23 = !{!"", !6, i64 0, !6, i64 8, !10, i64 16, !7, i64 20, !10, i64 28, !10, i64 32, !10, i64 36, !10, i64 40, !10, i64 44, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !10, i64 80, !10, i64 84, !10, i64 88, !10, i64 92, !10, i64 96, !10, i64 100, !10, i64 104, !10, i64 108, !10, i64 112, !10, i64 116, !10, i64 120, !10, i64 124, !10, i64 128, !10, i64 132, !6, i64 136, !6, i64 144, !6, i64 152, !6, i64 160, !10, i64 168, !6, i64 176, !12, i64 184, !12, 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}
!24 = !{!14, !12, i64 88}
!25 = !{!19, !12, i64 319600}
!26 = distinct !{!26, !27}
!27 = !{!"llvm.loop.mustprogress"}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.stat = type { i64, i64, i64, i32, i32, i32, i32, i64, i64, i64, i64, %struct.timespec, %struct.timespec, %struct.timespec, [3 x i64] }
%struct.timespec = type { i64, i64 }

@.str.18 = external hidden unnamed_addr constant [3 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: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #1

; Function Attrs: nofree nounwind
declare noalias noundef ptr @fopen(ptr nocapture noundef readonly, ptr nocapture noundef readonly) local_unnamed_addr #2

; Function Attrs: nofree nounwind
declare noundef i32 @fclose(ptr nocapture noundef) local_unnamed_addr #2

; Function Attrs: nofree nounwind
declare noundef i32 @stat(ptr nocapture noundef readonly, ptr nocapture noundef) local_unnamed_addr #2

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

; Function Attrs: nounwind uwtable
define dso_local range(i32 -16, 1) i32 @zip_entry_fwrite(ptr noundef %0, ptr nocapture noundef readonly %1) local_unnamed_addr #3 {
  %3 = alloca [65536 x i8], align 16
  %4 = alloca %struct.stat, align 8
  call void @llvm.lifetime.start.p0(i64 65536, ptr nonnull %3) #4
  call void @llvm.lifetime.start.p0(i64 144, ptr nonnull %4) #4
  %.not = icmp eq ptr %0, null
  br i1 %.not, label %43, label %5

5:                                                ; preds = %2
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(65536) %3, i8 0, i64 65536, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(144) %4, i8 0, i64 144, i1 false)
  %6 = call i32 @stat(ptr noundef %1, ptr noundef nonnull %4) #4
  %.not23 = icmp eq i32 %6, 0
  br i1 %.not23, label %7, label %43

7:                                                ; preds = %5
  %8 = getelementptr inbounds i8, ptr %4, i64 24
  %9 = load i32, ptr %8, align 8, !tbaa !5
  %10 = trunc i32 %9 to i16
  %11 = and i16 %10, 4095
  %12 = and i32 %9, 61440
  %13 = icmp eq i32 %12, 16384
  %spec.select = select i1 %13, i16 %10, i16 %11
  %14 = icmp eq i32 %12, 32768
  %15 = or i16 %spec.select, -32768
  %.1 = select i1 %14, i16 %15, i16 %spec.select
  %16 = icmp eq i32 %12, 40960
  %17 = or i16 %.1, -24576
  %.2 = select i1 %16, i16 %17, i16 %.1
  %18 = icmp eq i32 %12, 24576
  %19 = or i16 %.2, 24576
  %.3 = select i1 %18, i16 %19, i16 %.2
  %20 = icmp eq i32 %12, 8192
  %21 = or i16 %.3, 8192
  %.4 = select i1 %20, i16 %21, i16 %.3
  %22 = icmp eq i32 %12, 4096
  %23 = or i16 %.4, 4096
  %.5 = select i1 %22, i16 %23, i16 %.4
  %24 = icmp eq i32 %12, 49152
  %25 = or i16 %.5, -16384
  %.6 = select i1 %24, i16 %25, i16 %.5
  %26 = zext i16 %.6 to i32
  %27 = shl nuw i32 %26, 16
  %28 = lshr i32 %9, 7
  %.lobit = and i32 %28, 1
  %29 = or disjoint i32 %27, %.lobit
  %30 = xor i32 %29, 1
  %31 = getelementptr inbounds i8, ptr %0, i64 319592
  %32 = or disjoint i32 %30, 16
  %spec.select27 = select i1 %13, i32 %32, i32 %30
  store i32 %spec.select27, ptr %31, align 8, !tbaa !12
  %33 = getelementptr inbounds i8, ptr %4, i64 88
  %34 = load i64, ptr %33, align 8, !tbaa !20
  %35 = getelementptr inbounds i8, ptr %0, i64 319600
  store i64 %34, ptr %35, align 8, !tbaa !21
  %36 = tail call noalias ptr @fopen(ptr noundef %1, ptr noundef nonnull @.str.18)
  %.not25 = icmp eq ptr %36, null
  br i1 %.not25, label %43, label %.preheader

.preheader:                                       ; preds = %7, %38
  %37 = call i64 @fread(ptr noundef nonnull %3, i64 noundef 1, i64 noundef 65536, ptr noundef nonnull %36)
  %.not26 = icmp eq i64 %37, 0
  br i1 %.not26, label %41, label %38

38:                                               ; preds = %.preheader
  %39 = call i32 @zip_entry_write(ptr noundef nonnull %0, ptr noundef nonnull %3, i64 noundef %37)
  %40 = icmp slt i32 %39, 0
  br i1 %40, label %41, label %.preheader, !llvm.loop !22

41:                                               ; preds = %38, %.preheader
  %.019 = phi i32 [ 0, %.preheader ], [ -8, %38 ]
  %42 = call i32 @fclose(ptr noundef nonnull %36)
  br label %43

43:                                               ; preds = %7, %5, %2, %41
  %.020 = phi i32 [ %.019, %41 ], [ -1, %2 ], [ -3, %5 ], [ -16, %7 ]
  call void @llvm.lifetime.end.p0(i64 144, ptr nonnull %4) #4
  call void @llvm.lifetime.end.p0(i64 65536, ptr nonnull %3) #4
  ret i32 %.020
}

; Function Attrs: nofree nounwind
declare noundef i64 @fread(ptr nocapture noundef, i64 noundef, i64 noundef, ptr nocapture noundef) local_unnamed_addr #2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #2 = { nofree 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 #3 = { 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 #4 = { 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, !10, i64 24}
!6 = !{!"stat", !7, i64 0, !7, i64 8, !7, i64 16, !10, i64 24, !10, i64 28, !10, i64 32, !10, i64 36, !7, i64 40, !7, i64 48, !7, i64 56, !7, i64 64, !11, i64 72, !11, i64 88, !11, i64 104, !8, i64 120}
!7 = !{!"long", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"timespec", !7, i64 0, !7, i64 8}
!12 = !{!13, !10, i64 319592}
!13 = !{!"zip_t", !14, i64 0, !10, i64 112, !16, i64 120}
!14 = !{!"", !7, i64 0, !7, i64 8, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !7, i64 32, !15, i64 40, !15, i64 48, !15, i64 56, !15, i64 64, !15, i64 72, !15, i64 80, !15, i64 88, !15, i64 96, !15, i64 104}
!15 = !{!"any pointer", !8, i64 0}
!16 = !{!"zip_entry_t", !7, i64 0, !15, i64 8, !7, i64 16, !7, i64 24, !10, i64 32, !7, i64 40, !8, i64 48, !7, i64 80, !17, i64 88, !18, i64 96, !19, i64 120, !10, i64 319472, !7, i64 319480}
!17 = !{!"short", !8, i64 0}
!18 = !{!"", !15, i64 0, !7, i64 8, !7, i64 16}
!19 = !{!"", !15, i64 0, !15, i64 8, !10, i64 16, !8, i64 20, !10, i64 28, !10, i64 32, !10, i64 36, !10, i64 40, !10, i64 44, !15, i64 48, !15, i64 56, !15, i64 64, !15, i64 72, !10, i64 80, !10, i64 84, !10, i64 88, !10, i64 92, !10, i64 96, !10, i64 100, !10, i64 104, !10, i64 108, !10, i64 112, !10, i64 116, !10, i64 120, !10, i64 124, !10, i64 128, !10, i64 132, !15, i64 136, !15, i64 144, !15, i64 152, !15, i64 160, !10, i64 168, !15, i64 176, !7, i64 184, !7, i64 192, !8, i64 200, !8, i64 33226, !8, i64 34954, !8, i64 36682, !8, i64 37546, !8, i64 103082, !8, i64 168618, !8, i64 234154}
!20 = !{!6, !7, i64 88}
!21 = !{!13, !7, i64 319600}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}


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