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

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

%struct.mz_zip_archive = type { i64, i64, i32, i32, i32, i32, i64, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.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.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: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #1

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

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @mz_zip_writer_end(ptr noundef) #3

; Function Attrs: nounwind uwtable
declare dso_local i32 @mz_zip_writer_add_file(ptr noundef, ptr noundef, ptr noundef, ptr noundef, i16 noundef zeroext, i32 noundef, i32 noundef) #3

; Function Attrs: nounwind uwtable
declare dso_local i32 @mz_zip_writer_finalize_archive(ptr noundef) #3

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

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

18:                                               ; preds = %3
  %19 = load ptr, ptr %5, align 8, !tbaa !5
  %20 = call i64 @strlen(ptr noundef %19) #6
  %21 = icmp ult i64 %20, 1
  br i1 %21, label %22, label %23

22:                                               ; preds = %18, %3
  store i32 -22, ptr %4, align 4
  store i32 1, ptr %14, align 4
  br label %163

23:                                               ; preds = %18
  call void @llvm.memset.p0.i64(ptr align 8 %10, i8 0, i64 112, i1 false)
  %24 = icmp ne ptr %10, null
  br i1 %24, label %26, label %25

25:                                               ; preds = %23
  store i32 -7, ptr %4, align 4
  store i32 1, ptr %14, align 4
  br label %163

26:                                               ; preds = %23
  %27 = load ptr, ptr %5, align 8, !tbaa !5
  %28 = call i32 @mz_zip_writer_init_file(ptr noundef %10, ptr noundef %27, i64 noundef 0)
  %29 = icmp ne i32 %28, 0
  br i1 %29, label %31, label %30

30:                                               ; preds = %26
  store i32 -1, ptr %4, align 4
  store i32 1, ptr %14, align 4
  br label %163

31:                                               ; preds = %26
  call void @llvm.memset.p0.i64(ptr align 8 %11, i8 0, i64 144, i1 false)
  %32 = icmp ne ptr %11, null
  br i1 %32, label %34, label %33

33:                                               ; preds = %31
  store i32 -7, ptr %4, align 4
  store i32 1, ptr %14, align 4
  br label %163

34:                                               ; preds = %31
  store i64 0, ptr %9, align 8, !tbaa !9
  br label %35

35:                                               ; preds = %156, %34
  %36 = load i64, ptr %9, align 8, !tbaa !9
  %37 = load i64, ptr %7, align 8, !tbaa !9
  %38 = icmp ult i64 %36, %37
  br i1 %38, label %39, label %159

39:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  %40 = load ptr, ptr %6, align 8, !tbaa !5
  %41 = load i64, ptr %9, align 8, !tbaa !9
  %42 = getelementptr inbounds ptr, ptr %40, i64 %41
  %43 = load ptr, ptr %42, align 8, !tbaa !5
  store ptr %43, ptr %15, align 8, !tbaa !5
  %44 = load ptr, ptr %15, align 8, !tbaa !5
  %45 = icmp ne ptr %44, null
  br i1 %45, label %47, label %46

46:                                               ; preds = %39
  store i32 -2, ptr %8, align 4, !tbaa !11
  store i32 2, ptr %14, align 4
  br label %153

47:                                               ; preds = %39
  %48 = load ptr, ptr %15, align 8, !tbaa !5
  %49 = call i32 @stat(ptr noundef %48, ptr noundef %11) #5
  %50 = icmp ne i32 %49, 0
  br i1 %50, label %51, label %52

51:                                               ; preds = %47
  store i32 -19, ptr %8, align 4, !tbaa !11
  store i32 2, ptr %14, align 4
  br label %153

52:                                               ; preds = %47
  %53 = getelementptr inbounds %struct.stat, ptr %11, i32 0, i32 3
  %54 = load i32, ptr %53, align 8, !tbaa !13
  %55 = and i32 %54, 4095
  %56 = trunc i32 %55 to i16
  store i16 %56, ptr %13, align 2, !tbaa !16
  %57 = getelementptr inbounds %struct.stat, ptr %11, i32 0, i32 3
  %58 = load i32, ptr %57, align 8, !tbaa !13
  %59 = and i32 %58, 61440
  %60 = icmp eq i32 %59, 16384
  br i1 %60, label %61, label %66

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

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

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

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

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

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

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

96:                                               ; preds = %91, %86
  %97 = getelementptr inbounds %struct.stat, ptr %11, i32 0, i32 3
  %98 = load i32, ptr %97, align 8, !tbaa !13
  %99 = and i32 %98, 61440
  %100 = icmp eq i32 %99, 8192
  br i1 %100, label %101, label %106

101:                                              ; preds = %96
  %102 = load i16, ptr %13, align 2, !tbaa !16
  %103 = zext i16 %102 to i32
  %104 = or i32 %103, 8192
  %105 = trunc i32 %104 to i16
  store i16 %105, ptr %13, align 2, !tbaa !16
  br label %106

106:                                              ; preds = %101, %96
  %107 = getelementptr inbounds %struct.stat, ptr %11, i32 0, i32 3
  %108 = load i32, ptr %107, align 8, !tbaa !13
  %109 = and i32 %108, 61440
  %110 = icmp eq i32 %109, 4096
  br i1 %110, label %111, label %116

111:                                              ; preds = %106
  %112 = load i16, ptr %13, align 2, !tbaa !16
  %113 = zext i16 %112 to i32
  %114 = or i32 %113, 4096
  %115 = trunc i32 %114 to i16
  store i16 %115, ptr %13, align 2, !tbaa !16
  br label %116

116:                                              ; preds = %111, %106
  %117 = getelementptr inbounds %struct.stat, ptr %11, i32 0, i32 3
  %118 = load i32, ptr %117, align 8, !tbaa !13
  %119 = and i32 %118, 61440
  %120 = icmp eq i32 %119, 49152
  br i1 %120, label %121, label %126

121:                                              ; preds = %116
  %122 = load i16, ptr %13, align 2, !tbaa !16
  %123 = zext i16 %122 to i32
  %124 = or i32 %123, 49152
  %125 = trunc i32 %124 to i16
  store i16 %125, ptr %13, align 2, !tbaa !16
  br label %126

126:                                              ; preds = %121, %116
  %127 = load i16, ptr %13, align 2, !tbaa !16
  %128 = zext i16 %127 to i32
  %129 = shl i32 %128, 16
  %130 = getelementptr inbounds %struct.stat, ptr %11, i32 0, i32 3
  %131 = load i32, ptr %130, align 8, !tbaa !13
  %132 = and i32 %131, 128
  %133 = icmp ne i32 %132, 0
  %134 = xor i1 %133, true
  %135 = zext i1 %134 to i32
  %136 = or i32 %129, %135
  store i32 %136, ptr %12, align 4, !tbaa !11
  %137 = getelementptr inbounds %struct.stat, ptr %11, i32 0, i32 3
  %138 = load i32, ptr %137, align 8, !tbaa !13
  %139 = and i32 %138, 61440
  %140 = icmp eq i32 %139, 16384
  br i1 %140, label %141, label %144

141:                                              ; preds = %126
  %142 = load i32, ptr %12, align 4, !tbaa !11
  %143 = or i32 %142, 16
  store i32 %143, ptr %12, align 4, !tbaa !11
  br label %144

144:                                              ; preds = %141, %126
  %145 = load ptr, ptr %15, align 8, !tbaa !5
  %146 = call ptr @zip_basename(ptr noundef %145)
  %147 = load ptr, ptr %15, align 8, !tbaa !5
  %148 = load i32, ptr %12, align 4, !tbaa !11
  %149 = call i32 @mz_zip_writer_add_file(ptr noundef %10, ptr noundef %146, ptr noundef %147, ptr noundef @.str.1, i16 noundef zeroext 0, i32 noundef 6, i32 noundef %148)
  %150 = icmp ne i32 %149, 0
  br i1 %150, label %152, label %151

151:                                              ; preds = %144
  store i32 -19, ptr %8, align 4, !tbaa !11
  store i32 2, ptr %14, align 4
  br label %153

152:                                              ; preds = %144
  store i32 0, ptr %14, align 4
  br label %153

153:                                              ; preds = %152, %151, %51, %46
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  %154 = load i32, ptr %14, align 4
  switch i32 %154, label %165 [
    i32 0, label %155
    i32 2, label %159
  ]

155:                                              ; preds = %153
  br label %156

156:                                              ; preds = %155
  %157 = load i64, ptr %9, align 8, !tbaa !9
  %158 = add i64 %157, 1
  store i64 %158, ptr %9, align 8, !tbaa !9
  br label %35, !llvm.loop !18

159:                                              ; preds = %153, %35
  %160 = call i32 @mz_zip_writer_finalize_archive(ptr noundef %10)
  %161 = call i32 @mz_zip_writer_end(ptr noundef %10)
  %162 = load i32, ptr %8, align 4, !tbaa !11
  store i32 %162, ptr %4, align 4
  store i32 1, ptr %14, align 4
  br label %163

163:                                              ; preds = %159, %33, %30, %25, %22
  call void @llvm.lifetime.end.p0(i64 2, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 144, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 112, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  %164 = load i32, ptr %4, align 4
  ret i32 %164

165:                                              ; preds = %153
  unreachable
}

; Function Attrs: nounwind uwtable
declare hidden ptr @zip_basename(ptr noundef) #3

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #2 = { 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 #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 "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 }
attributes #6 = { 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 = !{!"long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !12, i64 24}
!14 = !{!"stat", !10, i64 0, !10, i64 8, !10, i64 16, !12, i64 24, !12, i64 28, !12, i64 32, !12, i64 36, !10, i64 40, !10, i64 48, !10, i64 56, !10, i64 64, !15, i64 72, !15, i64 88, !15, i64 104, !7, i64 120}
!15 = !{!"timespec", !10, i64 0, !10, i64 8}
!16 = !{!17, !17, i64 0}
!17 = !{!"short", !7, i64 0}
!18 = distinct !{!18, !19}
!19 = !{!"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.mz_zip_archive = type { i64, i64, i32, i32, i32, i32, i64, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%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.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 nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #1

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

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local range(i32 -22, 1) i32 @zip_create(ptr noundef %0, ptr nocapture noundef readonly %1, i64 noundef %2) local_unnamed_addr #2 {
  %4 = alloca %struct.mz_zip_archive, align 8
  %5 = alloca %struct.stat, align 8
  call void @llvm.lifetime.start.p0(i64 112, ptr nonnull %4) #4
  call void @llvm.lifetime.start.p0(i64 144, ptr nonnull %5) #4
  %.not = icmp eq ptr %0, null
  br i1 %.not, label %46, label %6

6:                                                ; preds = %3
  %char0 = load i8, ptr %0, align 1
  %7 = icmp eq i8 %char0, 0
  br i1 %7, label %46, label %8

8:                                                ; preds = %6
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(112) %4, i8 0, i64 112, i1 false)
  %9 = call i32 @mz_zip_writer_init_file(ptr noundef nonnull %4, ptr noundef nonnull %0, i64 noundef 0)
  %.not33 = icmp eq i32 %9, 0
  br i1 %.not33, label %46, label %10

10:                                               ; preds = %8
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(144) %5, i8 0, i64 144, i1 false)
  %11 = getelementptr inbounds i8, ptr %5, i64 24
  %.not50 = icmp eq i64 %2, 0
  br i1 %.not50, label %.thread, label %.lr.ph

12:                                               ; preds = %18
  %13 = add nuw i64 %.02743, 1
  %exitcond.not = icmp eq i64 %13, %2
  br i1 %exitcond.not, label %.thread, label %.lr.ph, !llvm.loop !5

.lr.ph:                                           ; preds = %10, %12
  %.02743 = phi i64 [ %13, %12 ], [ 0, %10 ]
  %14 = getelementptr inbounds ptr, ptr %1, i64 %.02743
  %15 = load ptr, ptr %14, align 8, !tbaa !7
  %.not34 = icmp eq ptr %15, null
  br i1 %.not34, label %.thread, label %16

16:                                               ; preds = %.lr.ph
  %17 = call i32 @stat(ptr noundef nonnull %15, ptr noundef nonnull %5) #4
  %.not35 = icmp eq i32 %17, 0
  br i1 %.not35, label %18, label %.thread

18:                                               ; preds = %16
  %19 = load i32, ptr %11, align 8, !tbaa !11
  %20 = trunc i32 %19 to i16
  %21 = and i16 %20, 4095
  %22 = and i32 %19, 61440
  %23 = icmp eq i32 %22, 16384
  %spec.select = select i1 %23, i16 %20, i16 %21
  %24 = icmp eq i32 %22, 32768
  %25 = or i16 %spec.select, -32768
  %.1 = select i1 %24, i16 %25, i16 %spec.select
  %26 = icmp eq i32 %22, 40960
  %27 = or i16 %.1, -24576
  %.2 = select i1 %26, i16 %27, i16 %.1
  %28 = icmp eq i32 %22, 24576
  %29 = or i16 %.2, 24576
  %.3 = select i1 %28, i16 %29, i16 %.2
  %30 = icmp eq i32 %22, 8192
  %31 = or i16 %.3, 8192
  %.4 = select i1 %30, i16 %31, i16 %.3
  %32 = icmp eq i32 %22, 4096
  %33 = or i16 %.4, 4096
  %.5 = select i1 %32, i16 %33, i16 %.4
  %34 = icmp eq i32 %22, 49152
  %35 = or i16 %.5, -16384
  %.6 = select i1 %34, i16 %35, i16 %.5
  %36 = zext i16 %.6 to i32
  %37 = shl nuw i32 %36, 16
  %38 = lshr i32 %19, 7
  %.lobit = and i32 %38, 1
  %39 = or disjoint i32 %37, %.lobit
  %40 = xor i32 %39, 1
  %41 = or disjoint i32 %40, 16
  %.026 = select i1 %23, i32 %41, i32 %40
  %42 = call ptr @zip_basename(ptr noundef nonnull %15)
  %43 = call i32 @mz_zip_writer_add_file(ptr noundef nonnull %4, ptr noundef %42, ptr noundef nonnull %15, ptr noundef nonnull @.str.1, i16 noundef zeroext 0, i32 noundef 6, i32 noundef %.026)
  %.not37 = icmp eq i32 %43, 0
  br i1 %.not37, label %.thread, label %12

.thread:                                          ; preds = %12, %.lr.ph, %16, %18, %10
  %.230 = phi i32 [ 0, %10 ], [ -19, %18 ], [ -19, %16 ], [ -2, %.lr.ph ], [ 0, %12 ]
  %44 = call i32 @mz_zip_writer_finalize_archive(ptr noundef nonnull %4)
  %45 = call i32 @mz_zip_writer_end(ptr noundef nonnull %4)
  br label %46

46:                                               ; preds = %8, %3, %6, %.thread
  %.0 = phi i32 [ %.230, %.thread ], [ -22, %6 ], [ -22, %3 ], [ -1, %8 ]
  call void @llvm.lifetime.end.p0(i64 144, ptr nonnull %5) #4
  call void @llvm.lifetime.end.p0(i64 112, ptr nonnull %4) #4
  ret i32 %.0
}

; Function Attrs: nounwind uwtable
declare hidden ptr @zip_basename(ptr 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 = { 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 = { 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 #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 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}
!7 = !{!8, !8, i64 0}
!8 = !{!"any pointer", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C/C++ TBAA"}
!11 = !{!12, !14, i64 24}
!12 = !{!"stat", !13, i64 0, !13, i64 8, !13, i64 16, !14, i64 24, !14, i64 28, !14, i64 32, !14, i64 36, !13, i64 40, !13, i64 48, !13, i64 56, !13, i64 64, !15, i64 72, !15, i64 88, !15, i64 104, !9, i64 120}
!13 = !{!"long", !9, i64 0}
!14 = !{!"int", !9, i64 0}
!15 = !{!"timespec", !13, i64 0, !13, i64 8}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass