; 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.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.59 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.60 = external hidden unnamed_addr constant [54 x i8], align 1
@__PRETTY_FUNCTION__.zip_entry_noallocreadwithoffset = external hidden unnamed_addr constant [80 x i8], align 1
@.str.61 = external hidden unnamed_addr constant [18 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: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #1

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

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

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

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

22:                                               ; preds = %4
  store i64 -1, ptr %5, align 8
  store i32 1, ptr %11, align 4
  br label %160

23:                                               ; preds = %4
  %24 = load i64, ptr %7, align 8, !tbaa !9
  %25 = load ptr, ptr %6, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct.zip_t, ptr %25, i32 0, i32 2
  %27 = getelementptr inbounds %struct.zip_entry_t, ptr %26, i32 0, i32 2
  %28 = load i64, ptr %27, align 8, !tbaa !11
  %29 = icmp uge i64 %24, %28
  br i1 %29, label %30, label %31

30:                                               ; preds = %23
  store i64 -33, ptr %5, align 8
  store i32 1, ptr %11, align 4
  br label %160

31:                                               ; preds = %23
  %32 = load i64, ptr %7, align 8, !tbaa !9
  %33 = load i64, ptr %8, align 8, !tbaa !9
  %34 = add i64 %32, %33
  %35 = load ptr, ptr %6, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.zip_t, ptr %35, i32 0, i32 2
  %37 = getelementptr inbounds %struct.zip_entry_t, ptr %36, i32 0, i32 2
  %38 = load i64, ptr %37, align 8, !tbaa !11
  %39 = icmp ugt i64 %34, %38
  br i1 %39, label %40, label %47

40:                                               ; preds = %31
  %41 = load ptr, ptr %6, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct.zip_t, ptr %41, i32 0, i32 2
  %43 = getelementptr inbounds %struct.zip_entry_t, ptr %42, i32 0, i32 2
  %44 = load i64, ptr %43, align 8, !tbaa !11
  %45 = load i64, ptr %7, align 8, !tbaa !9
  %46 = sub i64 %44, %45
  store i64 %46, ptr %8, align 8, !tbaa !9
  br label %47

47:                                               ; preds = %40, %31
  %48 = load ptr, ptr %6, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.zip_t, ptr %48, i32 0, i32 0
  store ptr %49, ptr %10, align 8, !tbaa !5
  %50 = load ptr, ptr %10, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.mz_zip_archive, ptr %50, i32 0, i32 3
  %52 = load i32, ptr %51, align 4, !tbaa !19
  %53 = icmp ne i32 %52, 1
  br i1 %53, label %60, label %54

54:                                               ; preds = %47
  %55 = load ptr, ptr %6, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.zip_t, ptr %55, i32 0, i32 2
  %57 = getelementptr inbounds %struct.zip_entry_t, ptr %56, i32 0, i32 0
  %58 = load i64, ptr %57, align 8, !tbaa !20
  %59 = icmp slt i64 %58, 0
  br i1 %59, label %60, label %61

60:                                               ; preds = %54, %47
  store i64 -3, ptr %5, align 8
  store i32 1, ptr %11, align 4
  br label %160

61:                                               ; preds = %54
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  %62 = load ptr, ptr %10, align 8, !tbaa !5
  %63 = load ptr, ptr %6, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct.zip_t, ptr %63, i32 0, i32 2
  %65 = getelementptr inbounds %struct.zip_entry_t, ptr %64, i32 0, i32 0
  %66 = load i64, ptr %65, align 8, !tbaa !20
  %67 = trunc i64 %66 to i32
  %68 = call ptr @mz_zip_reader_extract_iter_new(ptr noundef %62, i32 noundef %67, i32 noundef 0)
  store ptr %68, ptr %12, align 8, !tbaa !5
  %69 = load ptr, ptr %12, align 8, !tbaa !5
  %70 = icmp ne ptr %69, null
  br i1 %70, label %72, label %71

71:                                               ; preds = %61
  store i64 -34, ptr %5, align 8
  store i32 1, ptr %11, align 4
  br label %159

72:                                               ; preds = %61
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  %73 = load ptr, ptr %9, align 8, !tbaa !5
  store ptr %73, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  store i64 0, ptr %14, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #4
  store i64 0, ptr %15, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #4
  %74 = load i64, ptr %8, align 8, !tbaa !9
  store i64 %74, ptr %16, align 8, !tbaa !9
  br label %75

75:                                               ; preds = %154, %72
  %76 = load i64, ptr %14, align 8, !tbaa !9
  %77 = load ptr, ptr %6, align 8, !tbaa !5
  %78 = getelementptr inbounds %struct.zip_t, ptr %77, i32 0, i32 2
  %79 = getelementptr inbounds %struct.zip_entry_t, ptr %78, i32 0, i32 2
  %80 = load i64, ptr %79, align 8, !tbaa !11
  %81 = icmp ult i64 %76, %80
  br i1 %81, label %82, label %85

82:                                               ; preds = %75
  %83 = load i64, ptr %16, align 8, !tbaa !9
  %84 = icmp ugt i64 %83, 0
  br label %85

85:                                               ; preds = %82, %75
  %86 = phi i1 [ false, %75 ], [ %84, %82 ]
  br i1 %86, label %87, label %155

87:                                               ; preds = %85
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #4
  %88 = load ptr, ptr %12, align 8, !tbaa !5
  %89 = load ptr, ptr %13, align 8, !tbaa !5
  %90 = load i64, ptr %15, align 8, !tbaa !9
  %91 = getelementptr inbounds i8, ptr %89, i64 %90
  %92 = load i64, ptr %16, align 8, !tbaa !9
  %93 = call i64 @mz_zip_reader_extract_iter_read(ptr noundef %88, ptr noundef %91, i64 noundef %92)
  store i64 %93, ptr %17, align 8, !tbaa !9
  %94 = load i64, ptr %17, align 8, !tbaa !9
  %95 = icmp eq i64 %94, 0
  br i1 %95, label %96, label %97

96:                                               ; preds = %87
  store i32 3, ptr %11, align 4
  br label %152

97:                                               ; preds = %87
  %98 = load i64, ptr %7, align 8, !tbaa !9
  %99 = load i64, ptr %14, align 8, !tbaa !9
  %100 = load i64, ptr %17, align 8, !tbaa !9
  %101 = add i64 %99, %100
  %102 = icmp ult i64 %98, %101
  br i1 %102, label %103, label %148

103:                                              ; preds = %97
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #4
  %104 = load i64, ptr %7, align 8, !tbaa !9
  %105 = load i64, ptr %14, align 8, !tbaa !9
  %106 = sub i64 %104, %105
  store i64 %106, ptr %18, align 8, !tbaa !9
  %107 = load i64, ptr %18, align 8, !tbaa !9
  %108 = load i64, ptr %8, align 8, !tbaa !9
  %109 = icmp ult i64 %107, %108
  br i1 %109, label %110, label %111

110:                                              ; preds = %103
  br label %112

111:                                              ; preds = %103
  call void @__assert_fail(ptr noundef @.str.59, ptr noundef @.str.60, i32 noundef 1704, ptr noundef @__PRETTY_FUNCTION__.zip_entry_noallocreadwithoffset) #5
  unreachable

112:                                              ; preds = %110
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #4
  %113 = load i64, ptr %17, align 8, !tbaa !9
  %114 = load i64, ptr %18, align 8, !tbaa !9
  %115 = sub i64 %113, %114
  store i64 %115, ptr %19, align 8, !tbaa !9
  %116 = load i64, ptr %16, align 8, !tbaa !9
  %117 = load i64, ptr %19, align 8, !tbaa !9
  %118 = icmp ult i64 %116, %117
  br i1 %118, label %119, label %121

119:                                              ; preds = %112
  %120 = load i64, ptr %16, align 8, !tbaa !9
  store i64 %120, ptr %19, align 8, !tbaa !9
  br label %121

121:                                              ; preds = %119, %112
  %122 = load i64, ptr %19, align 8, !tbaa !9
  %123 = load i64, ptr %8, align 8, !tbaa !9
  %124 = icmp ule i64 %122, %123
  br i1 %124, label %125, label %126

125:                                              ; preds = %121
  br label %127

126:                                              ; preds = %121
  call void @__assert_fail(ptr noundef @.str.61, ptr noundef @.str.60, i32 noundef 1709, ptr noundef @__PRETTY_FUNCTION__.zip_entry_noallocreadwithoffset) #5
  unreachable

127:                                              ; preds = %125
  %128 = load i64, ptr %18, align 8, !tbaa !9
  %129 = icmp ne i64 %128, 0
  br i1 %129, label %130, label %138

130:                                              ; preds = %127
  %131 = load ptr, ptr %13, align 8, !tbaa !5
  %132 = load i64, ptr %15, align 8, !tbaa !9
  %133 = getelementptr inbounds i8, ptr %131, i64 %132
  %134 = load ptr, ptr %13, align 8, !tbaa !5
  %135 = load i64, ptr %18, align 8, !tbaa !9
  %136 = getelementptr inbounds i8, ptr %134, i64 %135
  %137 = load i64, ptr %19, align 8, !tbaa !9
  call void @llvm.memmove.p0.p0.i64(ptr align 1 %133, ptr align 1 %136, i64 %137, i1 false)
  br label %138

138:                                              ; preds = %130, %127
  %139 = load i64, ptr %19, align 8, !tbaa !9
  %140 = load i64, ptr %15, align 8, !tbaa !9
  %141 = add i64 %140, %139
  store i64 %141, ptr %15, align 8, !tbaa !9
  %142 = load i64, ptr %19, align 8, !tbaa !9
  %143 = load i64, ptr %7, align 8, !tbaa !9
  %144 = add i64 %143, %142
  store i64 %144, ptr %7, align 8, !tbaa !9
  %145 = load i64, ptr %19, align 8, !tbaa !9
  %146 = load i64, ptr %16, align 8, !tbaa !9
  %147 = sub i64 %146, %145
  store i64 %147, ptr %16, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #4
  br label %148

148:                                              ; preds = %138, %97
  %149 = load i64, ptr %17, align 8, !tbaa !9
  %150 = load i64, ptr %14, align 8, !tbaa !9
  %151 = add i64 %150, %149
  store i64 %151, ptr %14, align 8, !tbaa !9
  store i32 0, ptr %11, align 4
  br label %152

152:                                              ; preds = %148, %96
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #4
  %153 = load i32, ptr %11, align 4
  switch i32 %153, label %162 [
    i32 0, label %154
    i32 3, label %155
  ]

154:                                              ; preds = %152
  br label %75, !llvm.loop !21

155:                                              ; preds = %152, %85
  %156 = load ptr, ptr %12, align 8, !tbaa !5
  %157 = call i32 @mz_zip_reader_extract_iter_free(ptr noundef %156)
  %158 = load i64, ptr %15, align 8, !tbaa !9
  store i64 %158, ptr %5, align 8
  store i32 1, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  br label %159

159:                                              ; preds = %155, %71
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  br label %160

160:                                              ; preds = %159, %60, %30, %22
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  %161 = load i64, ptr %5, align 8
  ret i64 %161

162:                                              ; preds = %152
  unreachable
}

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memmove.p0.p0.i64(ptr nocapture writeonly, ptr nocapture readonly, i64, i1 immarg) #3

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { noreturn 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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { nounwind }
attributes #5 = { noreturn 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 = !{!"long", !7, i64 0}
!11 = !{!12, !10, i64 136}
!12 = !{!"zip_t", !13, i64 0, !14, i64 112, !15, i64 120}
!13 = !{!"", !10, i64 0, !10, i64 8, !14, i64 16, !14, i64 20, !14, i64 24, !14, i64 28, !10, 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}
!14 = !{!"int", !7, i64 0}
!15 = !{!"zip_entry_t", !10, i64 0, !6, i64 8, !10, i64 16, !10, i64 24, !14, i64 32, !10, i64 40, !7, i64 48, !10, i64 80, !16, i64 88, !17, i64 96, !18, i64 120, !14, i64 319472, !10, i64 319480}
!16 = !{!"short", !7, i64 0}
!17 = !{!"", !6, i64 0, !10, i64 8, !10, i64 16}
!18 = !{!"", !6, i64 0, !6, i64 8, !14, i64 16, !7, i64 20, !14, i64 28, !14, i64 32, !14, i64 36, !14, i64 40, !14, i64 44, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !14, i64 80, !14, i64 84, !14, i64 88, !14, i64 92, !14, i64 96, !14, i64 100, !14, i64 104, !14, i64 108, !14, i64 112, !14, i64 116, !14, i64 120, !14, i64 124, !14, i64 128, !14, i64 132, !6, i64 136, !6, i64 144, !6, i64 152, !6, i64 160, !14, i64 168, !6, i64 176, !10, i64 184, !10, 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 = !{!13, !14, i64 20}
!20 = !{!12, !10, i64 120}
!21 = distinct !{!21, !22}
!22 = !{!"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"

@.str.59 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.60 = external hidden unnamed_addr constant [54 x i8], align 1
@__PRETTY_FUNCTION__.zip_entry_noallocreadwithoffset = external hidden unnamed_addr constant [80 x i8], align 1
@.str.61 = external hidden unnamed_addr constant [18 x i8], align 1

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local ptr @mz_zip_reader_extract_iter_new(ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local i64 @mz_zip_reader_extract_iter_read(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #1

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

; Function Attrs: nounwind uwtable
define dso_local i64 @zip_entry_noallocreadwithoffset(ptr noundef %0, i64 noundef %1, i64 noundef %2, ptr noundef %3) local_unnamed_addr #1 {
  %.not = icmp eq ptr %0, null
  br i1 %.not, label %51, label %5

5:                                                ; preds = %4
  %6 = getelementptr inbounds i8, ptr %0, i64 120
  %7 = getelementptr inbounds i8, ptr %0, i64 136
  %8 = load i64, ptr %7, align 8, !tbaa !5
  %.not76 = icmp ugt i64 %8, %1
  br i1 %.not76, label %9, label %51

9:                                                ; preds = %5
  %10 = add i64 %2, %1
  %11 = icmp ugt i64 %10, %8
  %12 = sub i64 %8, %1
  %spec.select = select i1 %11, i64 %12, i64 %2
  %13 = getelementptr inbounds i8, ptr %0, i64 20
  %14 = load i32, ptr %13, align 4, !tbaa !17
  %.not77 = icmp eq i32 %14, 1
  br i1 %.not77, label %15, label %51

15:                                               ; preds = %9
  %16 = load i64, ptr %6, align 8, !tbaa !18
  %17 = icmp slt i64 %16, 0
  br i1 %17, label %51, label %18

18:                                               ; preds = %15
  %19 = trunc i64 %16 to i32
  %20 = tail call ptr @mz_zip_reader_extract_iter_new(ptr noundef nonnull %0, i32 noundef %19, i32 noundef 0)
  %.not78 = icmp eq ptr %20, null
  br i1 %.not78, label %51, label %.preheader

.preheader:                                       ; preds = %18
  %21 = load i64, ptr %7, align 8, !tbaa !5
  %22 = icmp ne i64 %21, 0
  %23 = icmp ne i64 %spec.select, 0
  %24 = and i1 %22, %23
  br i1 %24, label %.lr.ph, label %.thread

.lr.ph:                                           ; preds = %.preheader, %45
  %.05693 = phi i64 [ %.2, %45 ], [ %1, %.preheader ]
  %.05892 = phi i64 [ %.260, %45 ], [ %spec.select, %.preheader ]
  %.06191 = phi i64 [ %.263, %45 ], [ 0, %.preheader ]
  %.06490 = phi i64 [ %29, %45 ], [ 0, %.preheader ]
  %25 = getelementptr inbounds i8, ptr %3, i64 %.06191
  %26 = tail call i64 @mz_zip_reader_extract_iter_read(ptr noundef nonnull %20, ptr noundef %25, i64 noundef %.05892)
  %27 = icmp eq i64 %26, 0
  br i1 %27, label %.thread, label %28

28:                                               ; preds = %.lr.ph
  %29 = add i64 %26, %.06490
  %30 = icmp ult i64 %.05693, %29
  br i1 %30, label %31, label %45

31:                                               ; preds = %28
  %32 = sub i64 %.05693, %.06490
  %33 = icmp ult i64 %32, %spec.select
  br i1 %33, label %35, label %34

34:                                               ; preds = %31
  tail call void @__assert_fail(ptr noundef nonnull @.str.59, ptr noundef nonnull @.str.60, i32 noundef 1704, ptr noundef nonnull @__PRETTY_FUNCTION__.zip_entry_noallocreadwithoffset) #4
  unreachable

35:                                               ; preds = %31
  %36 = sub i64 %26, %32
  %spec.select81 = tail call i64 @llvm.umin.i64(i64 %.05892, i64 %36)
  %.not79 = icmp ugt i64 %spec.select81, %spec.select
  br i1 %.not79, label %37, label %38

37:                                               ; preds = %35
  tail call void @__assert_fail(ptr noundef nonnull @.str.61, ptr noundef nonnull @.str.60, i32 noundef 1709, ptr noundef nonnull @__PRETTY_FUNCTION__.zip_entry_noallocreadwithoffset) #4
  unreachable

38:                                               ; preds = %35
  %.not80 = icmp eq i64 %.05693, %.06490
  br i1 %.not80, label %41, label %39

39:                                               ; preds = %38
  %40 = getelementptr inbounds i8, ptr %3, i64 %32
  tail call void @llvm.memmove.p0.p0.i64(ptr align 1 %25, ptr align 1 %40, i64 %spec.select81, i1 false)
  br label %41

41:                                               ; preds = %39, %38
  %42 = add i64 %spec.select81, %.06191
  %43 = add i64 %spec.select81, %.05693
  %44 = sub i64 %.05892, %spec.select81
  br label %45

45:                                               ; preds = %28, %41
  %.263 = phi i64 [ %42, %41 ], [ %.06191, %28 ]
  %.260 = phi i64 [ %44, %41 ], [ %.05892, %28 ]
  %.2 = phi i64 [ %43, %41 ], [ %.05693, %28 ]
  %46 = load i64, ptr %7, align 8, !tbaa !5
  %47 = icmp ult i64 %29, %46
  %48 = icmp ne i64 %.260, 0
  %49 = and i1 %47, %48
  br i1 %49, label %.lr.ph, label %.thread

.thread:                                          ; preds = %45, %.lr.ph, %.preheader
  %.061.lcssa = phi i64 [ 0, %.preheader ], [ %.06191, %.lr.ph ], [ %.263, %45 ]
  %50 = tail call i32 @mz_zip_reader_extract_iter_free(ptr noundef nonnull %20)
  br label %51

51:                                               ; preds = %.thread, %18, %9, %15, %5, %4
  %.1 = phi i64 [ -1, %4 ], [ -33, %5 ], [ -3, %15 ], [ -3, %9 ], [ %.061.lcssa, %.thread ], [ -34, %18 ]
  ret i64 %.1
}

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memmove.p0.p0.i64(ptr nocapture writeonly, ptr nocapture readonly, i64, i1 immarg) #2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.umin.i64(i64, i64) #3

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


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LCSSAPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass