; 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.mz_zip_archive_file_stat = type { i32, i32, i16, i16, i16, i16, i64, i32, i64, i64, i16, i32, i64, i32, [260 x i8], [256 x i8] }
%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] }
%struct.mz_zip_internal_state_tag = type { %struct.mz_zip_array, %struct.mz_zip_array, %struct.mz_zip_array, i32, i32, i32, ptr, i64, ptr, i64, i64 }
%struct.mz_zip_array = type { ptr, i64, i64, i32 }

; 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 @mz_zip_reader_file_stat(ptr noundef, i32 noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
declare hidden ptr @zip_strrpl(ptr noundef, i64 noundef, i8 noundef signext, i8 noundef signext) #2

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

14:                                               ; preds = %2
  store i32 -1, ptr %3, align 4
  store i32 1, ptr %11, align 4
  br label %150

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

22:                                               ; preds = %15
  store i32 -4, ptr %3, align 4
  store i32 1, ptr %11, align 4
  br label %150

23:                                               ; preds = %15
  %24 = load i32, ptr %5, align 4, !tbaa !9
  %25 = icmp slt i32 %24, 0
  br i1 %25, label %32, label %26

26:                                               ; preds = %23
  %27 = load i32, ptr %5, align 4, !tbaa !9
  %28 = load ptr, ptr %6, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct.mz_zip_archive, ptr %28, i32 0, i32 2
  %30 = load i32, ptr %29, align 8, !tbaa !14
  %31 = icmp uge i32 %27, %30
  br i1 %31, label %32, label %33

32:                                               ; preds = %26, %23
  store i32 -10, ptr %3, align 4
  store i32 1, ptr %11, align 4
  br label %150

33:                                               ; preds = %26
  %34 = load ptr, ptr %6, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct.mz_zip_archive, ptr %34, i32 0, i32 15
  %36 = load ptr, ptr %35, align 8, !tbaa !15
  %37 = getelementptr inbounds %struct.mz_zip_internal_state_tag, ptr %36, i32 0, i32 0
  %38 = getelementptr inbounds %struct.mz_zip_array, ptr %37, i32 0, i32 0
  %39 = load ptr, ptr %38, align 8, !tbaa !16
  %40 = load ptr, ptr %6, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.mz_zip_archive, ptr %40, i32 0, i32 15
  %42 = load ptr, ptr %41, align 8, !tbaa !15
  %43 = getelementptr inbounds %struct.mz_zip_internal_state_tag, ptr %42, i32 0, i32 1
  %44 = getelementptr inbounds %struct.mz_zip_array, ptr %43, i32 0, i32 0
  %45 = load ptr, ptr %44, align 8, !tbaa !20
  %46 = load i32, ptr %5, align 4, !tbaa !9
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds i32, ptr %45, i64 %47
  %49 = load i32, ptr %48, align 4, !tbaa !9
  %50 = zext i32 %49 to i64
  %51 = getelementptr inbounds i8, ptr %39, i64 %50
  store ptr %51, ptr %9, align 8, !tbaa !5
  %52 = icmp ne ptr %51, null
  br i1 %52, label %54, label %53

53:                                               ; preds = %33
  store i32 -11, ptr %3, align 4
  store i32 1, ptr %11, align 4
  br label %150

54:                                               ; preds = %33
  %55 = load ptr, ptr %9, align 8, !tbaa !5
  %56 = getelementptr inbounds i8, ptr %55, i64 28
  %57 = load i16, ptr %56, align 2, !tbaa !21
  %58 = zext i16 %57 to i32
  store i32 %58, ptr %8, align 4, !tbaa !9
  %59 = load ptr, ptr %9, align 8, !tbaa !5
  %60 = getelementptr inbounds i8, ptr %59, i64 46
  store ptr %60, ptr %10, align 8, !tbaa !5
  %61 = load ptr, ptr %4, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.zip_t, ptr %61, i32 0, i32 2
  %63 = getelementptr inbounds %struct.zip_entry_t, ptr %62, i32 0, i32 1
  %64 = load ptr, ptr %63, align 8, !tbaa !23
  %65 = icmp ne ptr %64, null
  br i1 %65, label %66, label %84

66:                                               ; preds = %54
  br label %67

67:                                               ; preds = %66
  %68 = load ptr, ptr %4, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.zip_t, ptr %68, i32 0, i32 2
  %70 = getelementptr inbounds %struct.zip_entry_t, ptr %69, i32 0, i32 1
  %71 = load ptr, ptr %70, align 8, !tbaa !23
  %72 = icmp ne ptr %71, null
  br i1 %72, label %73, label %81

73:                                               ; preds = %67
  %74 = load ptr, ptr %4, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.zip_t, ptr %74, i32 0, i32 2
  %76 = getelementptr inbounds %struct.zip_entry_t, ptr %75, i32 0, i32 1
  %77 = load ptr, ptr %76, align 8, !tbaa !23
  call void @free(ptr noundef %77) #3
  %78 = load ptr, ptr %4, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct.zip_t, ptr %78, i32 0, i32 2
  %80 = getelementptr inbounds %struct.zip_entry_t, ptr %79, i32 0, i32 1
  store ptr null, ptr %80, align 8, !tbaa !23
  br label %81

81:                                               ; preds = %73, %67
  br label %82

82:                                               ; preds = %81
  br label %83

83:                                               ; preds = %82
  br label %84

84:                                               ; preds = %83, %54
  %85 = load ptr, ptr %10, align 8, !tbaa !5
  %86 = load i32, ptr %8, align 4, !tbaa !9
  %87 = zext i32 %86 to i64
  %88 = call ptr @zip_strrpl(ptr noundef %85, i64 noundef %87, i8 noundef signext 92, i8 noundef signext 47)
  %89 = load ptr, ptr %4, 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 1
  store ptr %88, ptr %91, align 8, !tbaa !23
  %92 = load ptr, ptr %4, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct.zip_t, ptr %92, i32 0, i32 2
  %94 = getelementptr inbounds %struct.zip_entry_t, ptr %93, i32 0, i32 1
  %95 = load ptr, ptr %94, align 8, !tbaa !23
  %96 = icmp ne ptr %95, null
  br i1 %96, label %98, label %97

97:                                               ; preds = %84
  store i32 -2, ptr %3, align 4
  store i32 1, ptr %11, align 4
  br label %150

98:                                               ; preds = %84
  %99 = load ptr, ptr %6, align 8, !tbaa !5
  %100 = load i32, ptr %5, align 4, !tbaa !9
  %101 = call i32 @mz_zip_reader_file_stat(ptr noundef %99, i32 noundef %100, ptr noundef %7)
  %102 = icmp ne i32 %101, 0
  br i1 %102, label %104, label %103

103:                                              ; preds = %98
  store i32 -3, ptr %3, align 4
  store i32 1, ptr %11, align 4
  br label %150

104:                                              ; preds = %98
  %105 = load i32, ptr %5, align 4, !tbaa !9
  %106 = load ptr, ptr %4, align 8, !tbaa !5
  %107 = getelementptr inbounds %struct.zip_t, ptr %106, i32 0, i32 2
  %108 = getelementptr inbounds %struct.zip_entry_t, ptr %107, i32 0, i32 0
  store i32 %105, ptr %108, align 8, !tbaa !28
  %109 = getelementptr inbounds %struct.mz_zip_archive_file_stat, ptr %7, i32 0, i32 8
  %110 = load i64, ptr %109, align 8, !tbaa !29
  %111 = load ptr, ptr %4, align 8, !tbaa !5
  %112 = getelementptr inbounds %struct.zip_t, ptr %111, i32 0, i32 2
  %113 = getelementptr inbounds %struct.zip_entry_t, ptr %112, i32 0, i32 3
  store i64 %110, ptr %113, align 8, !tbaa !31
  %114 = getelementptr inbounds %struct.mz_zip_archive_file_stat, ptr %7, i32 0, i32 9
  %115 = load i64, ptr %114, align 8, !tbaa !32
  %116 = load ptr, ptr %4, align 8, !tbaa !5
  %117 = getelementptr inbounds %struct.zip_t, ptr %116, i32 0, i32 2
  %118 = getelementptr inbounds %struct.zip_entry_t, ptr %117, i32 0, i32 2
  store i64 %115, ptr %118, align 8, !tbaa !33
  %119 = getelementptr inbounds %struct.mz_zip_archive_file_stat, ptr %7, i32 0, i32 7
  %120 = load i32, ptr %119, align 8, !tbaa !34
  %121 = load ptr, ptr %4, 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 4
  store i32 %120, ptr %123, align 8, !tbaa !35
  %124 = getelementptr inbounds %struct.mz_zip_archive_file_stat, ptr %7, i32 0, i32 1
  %125 = load i32, ptr %124, align 4, !tbaa !36
  %126 = zext i32 %125 to i64
  %127 = load ptr, ptr %4, align 8, !tbaa !5
  %128 = getelementptr inbounds %struct.zip_t, ptr %127, i32 0, i32 2
  %129 = getelementptr inbounds %struct.zip_entry_t, ptr %128, i32 0, i32 5
  store i64 %126, ptr %129, align 8, !tbaa !37
  %130 = getelementptr inbounds %struct.mz_zip_archive_file_stat, ptr %7, i32 0, i32 12
  %131 = load i64, ptr %130, align 8, !tbaa !38
  %132 = load ptr, ptr %4, align 8, !tbaa !5
  %133 = getelementptr inbounds %struct.zip_t, ptr %132, i32 0, i32 2
  %134 = getelementptr inbounds %struct.zip_entry_t, ptr %133, i32 0, i32 7
  store i64 %131, ptr %134, align 8, !tbaa !39
  %135 = getelementptr inbounds %struct.mz_zip_archive_file_stat, ptr %7, i32 0, i32 5
  %136 = load i16, ptr %135, align 2, !tbaa !40
  %137 = load ptr, ptr %4, align 8, !tbaa !5
  %138 = getelementptr inbounds %struct.zip_t, ptr %137, i32 0, i32 2
  %139 = getelementptr inbounds %struct.zip_entry_t, ptr %138, i32 0, i32 8
  store i16 %136, ptr %139, align 8, !tbaa !41
  %140 = getelementptr inbounds %struct.mz_zip_archive_file_stat, ptr %7, i32 0, i32 11
  %141 = load i32, ptr %140, align 4, !tbaa !42
  %142 = load ptr, ptr %4, align 8, !tbaa !5
  %143 = getelementptr inbounds %struct.zip_t, ptr %142, i32 0, i32 2
  %144 = getelementptr inbounds %struct.zip_entry_t, ptr %143, i32 0, i32 11
  store i32 %141, ptr %144, align 8, !tbaa !43
  %145 = getelementptr inbounds %struct.mz_zip_archive_file_stat, ptr %7, i32 0, i32 6
  %146 = load i64, ptr %145, align 8, !tbaa !44
  %147 = load ptr, ptr %4, 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 12
  store i64 %146, ptr %149, align 8, !tbaa !45
  store i32 0, ptr %3, align 4
  store i32 1, ptr %11, align 4
  br label %150

150:                                              ; preds = %104, %103, %97, %53, %32, %22, %14
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 584, ptr %7) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #3
  %151 = load i32, ptr %3, align 4
  ret i32 %151
}

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 }

!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, !10, i64 20}
!12 = !{!"", !13, i64 0, !13, i64 8, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !13, 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}
!13 = !{!"long long", !7, i64 0}
!14 = !{!12, !10, i64 16}
!15 = !{!12, !6, i64 104}
!16 = !{!17, !6, i64 0}
!17 = !{!"mz_zip_internal_state_tag", !18, i64 0, !18, i64 32, !18, i64 64, !10, i64 96, !10, i64 100, !10, i64 104, !6, i64 112, !13, i64 120, !6, i64 128, !19, i64 136, !19, i64 144}
!18 = !{!"", !6, i64 0, !19, i64 8, !19, i64 16, !10, i64 24}
!19 = !{!"long", !7, i64 0}
!20 = !{!17, !6, i64 32}
!21 = !{!22, !22, i64 0}
!22 = !{!"short", !7, i64 0}
!23 = !{!24, !6, i64 128}
!24 = !{!"zip_t", !12, i64 0, !10, i64 112, !25, i64 120}
!25 = !{!"zip_entry_t", !10, i64 0, !6, i64 8, !13, i64 16, !13, i64 24, !10, i64 32, !13, i64 40, !7, i64 48, !13, i64 80, !22, i64 88, !26, i64 96, !27, i64 120, !10, i64 319472, !19, i64 319480}
!26 = !{!"", !6, i64 0, !13, i64 8, !13, i64 16}
!27 = !{!"", !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, !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}
!28 = !{!24, !10, i64 120}
!29 = !{!30, !13, i64 32}
!30 = !{!"", !10, i64 0, !10, i64 4, !22, i64 8, !22, i64 10, !22, i64 12, !22, i64 14, !19, i64 16, !10, i64 24, !13, i64 32, !13, i64 40, !22, i64 48, !10, i64 52, !13, i64 56, !10, i64 64, !7, i64 68, !7, i64 328}
!31 = !{!24, !13, i64 144}
!32 = !{!30, !13, i64 40}
!33 = !{!24, !13, i64 136}
!34 = !{!30, !10, i64 24}
!35 = !{!24, !10, i64 152}
!36 = !{!30, !10, i64 4}
!37 = !{!24, !13, i64 160}
!38 = !{!30, !13, i64 56}
!39 = !{!24, !13, i64 200}
!40 = !{!30, !22, i64 14}
!41 = !{!24, !22, i64 208}
!42 = !{!30, !10, i64 52}
!43 = !{!24, !10, i64 319592}
!44 = !{!30, !19, i64 16}
!45 = !{!24, !19, i64 319600}


; 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_file_stat = type { i32, i32, i16, i16, i16, i16, i64, i32, i64, i64, i16, i32, i64, i32, [260 x i8], [256 x i8] }

; 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 @mz_zip_reader_file_stat(ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare hidden ptr @zip_strrpl(ptr noundef, i64 noundef, i8 noundef signext, i8 noundef signext) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
define dso_local range(i32 -11, 1) i32 @zip_entry_openbyindex(ptr noundef %0, i32 noundef %1) local_unnamed_addr #2 {
  %3 = alloca %struct.mz_zip_archive_file_stat, align 8
  call void @llvm.lifetime.start.p0(i64 584, ptr nonnull %3) #3
  %.not = icmp eq ptr %0, null
  br i1 %.not, label %60, label %4

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

7:                                                ; preds = %4
  %8 = icmp slt i32 %1, 0
  br i1 %8, label %60, label %9

9:                                                ; preds = %7
  %10 = getelementptr inbounds i8, ptr %0, i64 16
  %11 = load i32, ptr %10, align 8, !tbaa !12
  %.not36 = icmp ugt i32 %11, %1
  br i1 %.not36, label %12, label %60

12:                                               ; preds = %9
  %13 = getelementptr inbounds i8, ptr %0, i64 104
  %14 = load ptr, ptr %13, align 8, !tbaa !13
  %15 = load ptr, ptr %14, align 8, !tbaa !14
  %.not37 = icmp eq ptr %15, null
  br i1 %.not37, label %60, label %16

16:                                               ; preds = %12
  %17 = getelementptr inbounds i8, ptr %14, i64 32
  %18 = load ptr, ptr %17, align 8, !tbaa !18
  %19 = zext nneg i32 %1 to i64
  %20 = getelementptr inbounds i32, ptr %18, i64 %19
  %21 = load i32, ptr %20, align 4, !tbaa !19
  %22 = zext i32 %21 to i64
  %23 = getelementptr inbounds i8, ptr %15, i64 %22
  %24 = getelementptr inbounds i8, ptr %23, i64 28
  %25 = load i16, ptr %24, align 2, !tbaa !20
  %26 = getelementptr inbounds i8, ptr %23, i64 46
  %27 = getelementptr inbounds i8, ptr %0, i64 120
  %28 = getelementptr inbounds i8, ptr %0, i64 128
  %29 = load ptr, ptr %28, align 8, !tbaa !22
  %.not38 = icmp eq ptr %29, null
  br i1 %.not38, label %31, label %30

30:                                               ; preds = %16
  tail call void @free(ptr noundef nonnull %29) #3
  store ptr null, ptr %28, align 8, !tbaa !22
  br label %31

31:                                               ; preds = %30, %16
  %32 = zext i16 %25 to i64
  %33 = tail call ptr @zip_strrpl(ptr noundef nonnull %26, i64 noundef %32, i8 noundef signext 92, i8 noundef signext 47)
  store ptr %33, ptr %28, align 8, !tbaa !22
  %.not39 = icmp eq ptr %33, null
  br i1 %.not39, label %60, label %34

34:                                               ; preds = %31
  %35 = call i32 @mz_zip_reader_file_stat(ptr noundef nonnull %0, i32 noundef %1, ptr noundef nonnull %3)
  %.not40 = icmp eq i32 %35, 0
  br i1 %.not40, label %60, label %36

36:                                               ; preds = %34
  store i32 %1, ptr %27, align 8, !tbaa !27
  %37 = getelementptr inbounds i8, ptr %3, i64 32
  %38 = getelementptr inbounds i8, ptr %0, i64 136
  %39 = load <2 x i64>, ptr %37, align 8, !tbaa !28
  %40 = shufflevector <2 x i64> %39, <2 x i64> poison, <2 x i32> <i32 1, i32 0>
  store <2 x i64> %40, ptr %38, align 8, !tbaa !28
  %41 = getelementptr inbounds i8, ptr %3, i64 24
  %42 = load i32, ptr %41, align 8, !tbaa !29
  %43 = getelementptr inbounds i8, ptr %0, i64 152
  store i32 %42, ptr %43, align 8, !tbaa !31
  %44 = getelementptr inbounds i8, ptr %3, i64 4
  %45 = load i32, ptr %44, align 4, !tbaa !32
  %46 = zext i32 %45 to i64
  %47 = getelementptr inbounds i8, ptr %0, i64 160
  store i64 %46, ptr %47, align 8, !tbaa !33
  %48 = getelementptr inbounds i8, ptr %3, i64 56
  %49 = load i64, ptr %48, align 8, !tbaa !34
  %50 = getelementptr inbounds i8, ptr %0, i64 200
  store i64 %49, ptr %50, align 8, !tbaa !35
  %51 = getelementptr inbounds i8, ptr %3, i64 14
  %52 = load i16, ptr %51, align 2, !tbaa !36
  %53 = getelementptr inbounds i8, ptr %0, i64 208
  store i16 %52, ptr %53, align 8, !tbaa !37
  %54 = getelementptr inbounds i8, ptr %3, i64 52
  %55 = load i32, ptr %54, align 4, !tbaa !38
  %56 = getelementptr inbounds i8, ptr %0, i64 319592
  store i32 %55, ptr %56, align 8, !tbaa !39
  %57 = getelementptr inbounds i8, ptr %3, i64 16
  %58 = load i64, ptr %57, align 8, !tbaa !40
  %59 = getelementptr inbounds i8, ptr %0, i64 319600
  store i64 %58, ptr %59, align 8, !tbaa !41
  br label %60

60:                                               ; preds = %34, %31, %12, %7, %9, %4, %2, %36
  %.0 = phi i32 [ 0, %36 ], [ -1, %2 ], [ -4, %4 ], [ -10, %9 ], [ -10, %7 ], [ -11, %12 ], [ -2, %31 ], [ -3, %34 ]
  call void @llvm.lifetime.end.p0(i64 584, ptr nonnull %3) #3
  ret i32 %.0
}

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 = { 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 20}
!6 = !{!"", !7, i64 0, !7, i64 8, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !7, i64 32, !11, i64 40, !11, i64 48, !11, i64 56, !11, i64 64, !11, i64 72, !11, i64 80, !11, i64 88, !11, i64 96, !11, i64 104}
!7 = !{!"long long", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"any pointer", !8, i64 0}
!12 = !{!6, !10, i64 16}
!13 = !{!6, !11, i64 104}
!14 = !{!15, !11, i64 0}
!15 = !{!"mz_zip_internal_state_tag", !16, i64 0, !16, i64 32, !16, i64 64, !10, i64 96, !10, i64 100, !10, i64 104, !11, i64 112, !7, i64 120, !11, i64 128, !17, i64 136, !17, i64 144}
!16 = !{!"", !11, i64 0, !17, i64 8, !17, i64 16, !10, i64 24}
!17 = !{!"long", !8, i64 0}
!18 = !{!15, !11, i64 32}
!19 = !{!10, !10, i64 0}
!20 = !{!21, !21, i64 0}
!21 = !{!"short", !8, i64 0}
!22 = !{!23, !11, i64 128}
!23 = !{!"zip_t", !6, i64 0, !10, i64 112, !24, i64 120}
!24 = !{!"zip_entry_t", !10, i64 0, !11, i64 8, !7, i64 16, !7, i64 24, !10, i64 32, !7, i64 40, !8, i64 48, !7, i64 80, !21, i64 88, !25, i64 96, !26, i64 120, !10, i64 319472, !17, i64 319480}
!25 = !{!"", !11, i64 0, !7, i64 8, !7, i64 16}
!26 = !{!"", !11, i64 0, !11, i64 8, !10, i64 16, !8, i64 20, !10, i64 28, !10, i64 32, !10, i64 36, !10, i64 40, !10, i64 44, !11, i64 48, !11, i64 56, !11, i64 64, !11, 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, !11, i64 136, !11, i64 144, !11, i64 152, !11, i64 160, !10, i64 168, !11, i64 176, !17, i64 184, !17, 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}
!27 = !{!23, !10, i64 120}
!28 = !{!7, !7, i64 0}
!29 = !{!30, !10, i64 24}
!30 = !{!"", !10, i64 0, !10, i64 4, !21, i64 8, !21, i64 10, !21, i64 12, !21, i64 14, !17, i64 16, !10, i64 24, !7, i64 32, !7, i64 40, !21, i64 48, !10, i64 52, !7, i64 56, !10, i64 64, !8, i64 68, !8, i64 328}
!31 = !{!23, !10, i64 152}
!32 = !{!30, !10, i64 4}
!33 = !{!23, !7, i64 160}
!34 = !{!30, !7, i64 56}
!35 = !{!23, !7, i64 200}
!36 = !{!30, !21, i64 14}
!37 = !{!23, !21, i64 208}
!38 = !{!30, !10, i64 52}
!39 = !{!23, !10, i64 319592}
!40 = !{!30, !17, i64 16}
!41 = !{!23, !17, i64 319600}


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