; LLVM IR from mncoppola/rpef :: utilities_src/squashfs2.1/lzma/C/7zip/Archive/7z_C (7zIn)

; 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._ISzAlloc = type { ptr, ptr }
%struct._CArchiveDatabase = type { i32, ptr, ptr, ptr, i32, ptr, i32, ptr }
%struct._ISzInStream = type { ptr, ptr }
%struct._CSzByteBuffer = type { i64, ptr }
%struct._CFolder = type { i32, ptr, i32, ptr, i32, ptr, ptr, i32, i32, i32 }

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

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

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

declare i32 @SzByteBufferCreate(ptr noundef, i64 noundef, ptr noundef) #2

declare i32 @SzFolderGetUnPackSize(ptr noundef) #2

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

; Function Attrs: nounwind uwtable
define dso_local i32 @SzReadAndDecodePackedStreams2(ptr noundef %0, ptr noundef %1, ptr noundef %2, i32 noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7, ptr noundef %8, ptr noundef %9) #0 {
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  %20 = alloca ptr, align 8
  %21 = alloca ptr, align 8
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca ptr, align 8
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  %27 = alloca i32, align 4
  %28 = alloca i64, align 8
  %29 = alloca i32, align 4
  %30 = alloca i32, align 4
  %31 = alloca i32, align 4
  %32 = alloca i32, align 4
  %33 = alloca i32, align 4
  %34 = alloca i32, align 4
  %35 = alloca i32, align 4
  store ptr %0, ptr %12, align 8, !tbaa !5
  store ptr %1, ptr %13, align 8, !tbaa !5
  store ptr %2, ptr %14, align 8, !tbaa !5
  store i32 %3, ptr %15, align 4, !tbaa !9
  store ptr %4, ptr %16, align 8, !tbaa !5
  store ptr %5, ptr %17, align 8, !tbaa !5
  store ptr %6, ptr %18, align 8, !tbaa !5
  store ptr %7, ptr %19, align 8, !tbaa !5
  store ptr %8, ptr %20, align 8, !tbaa !5
  store ptr %9, ptr %21, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #3
  store i32 0, ptr %22, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #3
  store i32 0, ptr %25, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #3
  store i32 0, ptr %26, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #3
  %36 = load ptr, ptr %13, align 8, !tbaa !5
  %37 = load ptr, ptr %16, align 8, !tbaa !5
  %38 = load ptr, ptr %17, align 8, !tbaa !5
  %39 = load ptr, ptr %18, align 8, !tbaa !5
  %40 = load ptr, ptr %19, align 8, !tbaa !5
  %41 = load ptr, ptr %21, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct._ISzAlloc, ptr %41, i32 0, i32 0
  %43 = load ptr, ptr %42, align 8, !tbaa !11
  %44 = load ptr, ptr %21, align 8, !tbaa !5
  %45 = call i32 @SzReadStreamsInfo(ptr noundef %36, ptr noundef %23, ptr noundef %37, ptr noundef %22, ptr noundef %38, ptr noundef %39, ptr noundef %40, ptr noundef %43, ptr noundef %44)
  store i32 %45, ptr %30, align 4, !tbaa !9
  %46 = load i32, ptr %30, align 4, !tbaa !9
  %47 = icmp ne i32 %46, 0
  br i1 %47, label %48, label %50

48:                                               ; preds = %10
  %49 = load i32, ptr %30, align 4, !tbaa !9
  store i32 %49, ptr %11, align 4
  store i32 1, ptr %31, align 4
  br label %51

50:                                               ; preds = %10
  store i32 0, ptr %31, align 4
  br label %51

51:                                               ; preds = %50, %48
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #3
  %52 = load i32, ptr %31, align 4
  switch i32 %52, label %187 [
    i32 0, label %53
  ]

53:                                               ; preds = %51
  %54 = load i32, ptr %15, align 4, !tbaa !9
  %55 = load i32, ptr %23, align 4, !tbaa !9
  %56 = add i32 %55, %54
  store i32 %56, ptr %23, align 4, !tbaa !9
  %57 = load ptr, ptr %16, align 8, !tbaa !5
  %58 = getelementptr inbounds %struct._CArchiveDatabase, ptr %57, i32 0, i32 4
  %59 = load i32, ptr %58, align 8, !tbaa !13
  %60 = icmp ne i32 %59, 1
  br i1 %60, label %61, label %62

61:                                               ; preds = %53
  store i32 6, ptr %11, align 4
  store i32 1, ptr %31, align 4
  br label %187

62:                                               ; preds = %53
  %63 = load ptr, ptr %16, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct._CArchiveDatabase, ptr %63, i32 0, i32 5
  %65 = load ptr, ptr %64, align 8, !tbaa !15
  store ptr %65, ptr %24, align 8, !tbaa !5
  %66 = load ptr, ptr %24, align 8, !tbaa !5
  %67 = call i32 @SzFolderGetUnPackSize(ptr noundef %66)
  store i32 %67, ptr %27, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #3
  %68 = load ptr, ptr %12, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct._ISzInStream, ptr %68, i32 0, i32 1
  %70 = load ptr, ptr %69, align 8, !tbaa !16
  %71 = load ptr, ptr %12, align 8, !tbaa !5
  %72 = load i32, ptr %23, align 4, !tbaa !9
  %73 = call i32 %70(ptr noundef %71, i32 noundef %72)
  store i32 %73, ptr %32, align 4, !tbaa !9
  %74 = load i32, ptr %32, align 4, !tbaa !9
  %75 = icmp ne i32 %74, 0
  br i1 %75, label %76, label %78

76:                                               ; preds = %62
  %77 = load i32, ptr %32, align 4, !tbaa !9
  store i32 %77, ptr %11, align 4
  store i32 1, ptr %31, align 4
  br label %79

78:                                               ; preds = %62
  store i32 0, ptr %31, align 4
  br label %79

79:                                               ; preds = %78, %76
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #3
  %80 = load i32, ptr %31, align 4
  switch i32 %80, label %187 [
    i32 0, label %81
  ]

81:                                               ; preds = %79
  store i32 0, ptr %26, align 4, !tbaa !9
  br label %82

82:                                               ; preds = %98, %81
  %83 = load i32, ptr %26, align 4, !tbaa !9
  %84 = load ptr, ptr %16, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct._CArchiveDatabase, ptr %84, i32 0, i32 0
  %86 = load i32, ptr %85, align 8, !tbaa !18
  %87 = icmp ult i32 %83, %86
  br i1 %87, label %88, label %101

88:                                               ; preds = %82
  %89 = load ptr, ptr %16, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct._CArchiveDatabase, ptr %89, i32 0, i32 1
  %91 = load ptr, ptr %90, align 8, !tbaa !19
  %92 = load i32, ptr %26, align 4, !tbaa !9
  %93 = zext i32 %92 to i64
  %94 = getelementptr inbounds i32, ptr %91, i64 %93
  %95 = load i32, ptr %94, align 4, !tbaa !9
  %96 = load i32, ptr %25, align 4, !tbaa !9
  %97 = add i32 %96, %95
  store i32 %97, ptr %25, align 4, !tbaa !9
  br label %98

98:                                               ; preds = %88
  %99 = load i32, ptr %26, align 4, !tbaa !9
  %100 = add i32 %99, 1
  store i32 %100, ptr %26, align 4, !tbaa !9
  br label %82, !llvm.loop !20

101:                                              ; preds = %82
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #3
  %102 = load ptr, ptr %20, align 8, !tbaa !5
  %103 = load i32, ptr %25, align 4, !tbaa !9
  %104 = zext i32 %103 to i64
  %105 = load ptr, ptr %21, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct._ISzAlloc, ptr %105, i32 0, i32 0
  %107 = load ptr, ptr %106, align 8, !tbaa !11
  %108 = call i32 @MySzInAlloc(ptr noundef %102, i64 noundef %104, ptr noundef %107)
  store i32 %108, ptr %33, align 4, !tbaa !9
  %109 = load i32, ptr %33, align 4, !tbaa !9
  %110 = icmp ne i32 %109, 0
  br i1 %110, label %111, label %113

111:                                              ; preds = %101
  %112 = load i32, ptr %33, align 4, !tbaa !9
  store i32 %112, ptr %11, align 4
  store i32 1, ptr %31, align 4
  br label %114

113:                                              ; preds = %101
  store i32 0, ptr %31, align 4
  br label %114

114:                                              ; preds = %113, %111
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #3
  %115 = load i32, ptr %31, align 4
  switch i32 %115, label %187 [
    i32 0, label %116
  ]

116:                                              ; preds = %114
  call void @llvm.lifetime.start.p0(i64 4, ptr %34) #3
  %117 = load ptr, ptr %12, align 8, !tbaa !5
  %118 = load ptr, ptr %20, align 8, !tbaa !5
  %119 = load ptr, ptr %118, align 8, !tbaa !5
  %120 = load i32, ptr %25, align 4, !tbaa !9
  %121 = zext i32 %120 to i64
  %122 = call i32 @SafeReadDirect(ptr noundef %117, ptr noundef %119, i64 noundef %121)
  store i32 %122, ptr %34, align 4, !tbaa !9
  %123 = load i32, ptr %34, align 4, !tbaa !9
  %124 = icmp ne i32 %123, 0
  br i1 %124, label %125, label %127

125:                                              ; preds = %116
  %126 = load i32, ptr %34, align 4, !tbaa !9
  store i32 %126, ptr %11, align 4
  store i32 1, ptr %31, align 4
  br label %128

127:                                              ; preds = %116
  store i32 0, ptr %31, align 4
  br label %128

128:                                              ; preds = %127, %125
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #3
  %129 = load i32, ptr %31, align 4
  switch i32 %129, label %187 [
    i32 0, label %130
  ]

130:                                              ; preds = %128
  %131 = load ptr, ptr %14, align 8, !tbaa !5
  %132 = load i32, ptr %27, align 4, !tbaa !9
  %133 = zext i32 %132 to i64
  %134 = load ptr, ptr %21, align 8, !tbaa !5
  %135 = getelementptr inbounds %struct._ISzAlloc, ptr %134, i32 0, i32 0
  %136 = load ptr, ptr %135, align 8, !tbaa !11
  %137 = call i32 @SzByteBufferCreate(ptr noundef %131, i64 noundef %133, ptr noundef %136)
  %138 = icmp ne i32 %137, 0
  br i1 %138, label %140, label %139

139:                                              ; preds = %130
  store i32 2, ptr %11, align 4
  store i32 1, ptr %31, align 4
  br label %187

140:                                              ; preds = %130
  %141 = load ptr, ptr %16, align 8, !tbaa !5
  %142 = getelementptr inbounds %struct._CArchiveDatabase, ptr %141, i32 0, i32 1
  %143 = load ptr, ptr %142, align 8, !tbaa !19
  %144 = load ptr, ptr %24, align 8, !tbaa !5
  %145 = load ptr, ptr %20, align 8, !tbaa !5
  %146 = load ptr, ptr %145, align 8, !tbaa !5
  %147 = load ptr, ptr %14, align 8, !tbaa !5
  %148 = getelementptr inbounds %struct._CSzByteBuffer, ptr %147, i32 0, i32 1
  %149 = load ptr, ptr %148, align 8, !tbaa !22
  %150 = load i32, ptr %27, align 4, !tbaa !9
  %151 = zext i32 %150 to i64
  %152 = load ptr, ptr %21, align 8, !tbaa !5
  %153 = call i32 @SzDecode(ptr noundef %143, ptr noundef %144, ptr noundef %146, ptr noundef %149, i64 noundef %151, ptr noundef %28, ptr noundef %152)
  store i32 %153, ptr %29, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %35) #3
  %154 = load i32, ptr %29, align 4, !tbaa !9
  store i32 %154, ptr %35, align 4, !tbaa !9
  %155 = load i32, ptr %35, align 4, !tbaa !9
  %156 = icmp ne i32 %155, 0
  br i1 %156, label %157, label %159

157:                                              ; preds = %140
  %158 = load i32, ptr %35, align 4, !tbaa !9
  store i32 %158, ptr %11, align 4
  store i32 1, ptr %31, align 4
  br label %160

159:                                              ; preds = %140
  store i32 0, ptr %31, align 4
  br label %160

160:                                              ; preds = %159, %157
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #3
  %161 = load i32, ptr %31, align 4
  switch i32 %161, label %187 [
    i32 0, label %162
  ]

162:                                              ; preds = %160
  %163 = load i64, ptr %28, align 8, !tbaa !25
  %164 = load i32, ptr %27, align 4, !tbaa !9
  %165 = zext i32 %164 to i64
  %166 = icmp ne i64 %163, %165
  br i1 %166, label %167, label %168

167:                                              ; preds = %162
  store i32 5, ptr %11, align 4
  store i32 1, ptr %31, align 4
  br label %187

168:                                              ; preds = %162
  %169 = load ptr, ptr %24, align 8, !tbaa !5
  %170 = getelementptr inbounds %struct._CFolder, ptr %169, i32 0, i32 7
  %171 = load i32, ptr %170, align 8, !tbaa !26
  %172 = icmp ne i32 %171, 0
  br i1 %172, label %173, label %186

173:                                              ; preds = %168
  %174 = load ptr, ptr %24, align 8, !tbaa !5
  %175 = getelementptr inbounds %struct._CFolder, ptr %174, i32 0, i32 8
  %176 = load i32, ptr %175, align 4, !tbaa !28
  %177 = load ptr, ptr %14, align 8, !tbaa !5
  %178 = getelementptr inbounds %struct._CSzByteBuffer, ptr %177, i32 0, i32 1
  %179 = load ptr, ptr %178, align 8, !tbaa !22
  %180 = load i32, ptr %27, align 4, !tbaa !9
  %181 = zext i32 %180 to i64
  %182 = call i32 @CrcVerifyDigest(i32 noundef %176, ptr noundef %179, i64 noundef %181)
  %183 = icmp ne i32 %182, 0
  br i1 %183, label %185, label %184

184:                                              ; preds = %173
  store i32 5, ptr %11, align 4
  store i32 1, ptr %31, align 4
  br label %187

185:                                              ; preds = %173
  br label %186

186:                                              ; preds = %185, %168
  store i32 0, ptr %11, align 4
  store i32 1, ptr %31, align 4
  br label %187

187:                                              ; preds = %186, %184, %167, %160, %139, %128, %114, %79, %61, %51
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #3
  %188 = load i32, ptr %11, align 4
  ret i32 %188
}

declare i32 @SzDecode(ptr noundef, ptr noundef, ptr noundef, ptr noundef, i64 noundef, ptr noundef, ptr noundef) #2

declare i32 @CrcVerifyDigest(i32 noundef, ptr noundef, i64 noundef) #2

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

!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, !6, i64 0}
!12 = !{!"_ISzAlloc", !6, i64 0, !6, i64 8}
!13 = !{!14, !10, i64 32}
!14 = !{!"_CArchiveDatabase", !10, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !10, i64 32, !6, i64 40, !10, i64 48, !6, i64 56}
!15 = !{!14, !6, i64 40}
!16 = !{!17, !6, i64 8}
!17 = !{!"_ISzInStream", !6, i64 0, !6, i64 8}
!18 = !{!14, !10, i64 0}
!19 = !{!14, !6, i64 8}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}
!22 = !{!23, !6, i64 8}
!23 = !{!"_CSzByteBuffer", !24, i64 0, !6, i64 8}
!24 = !{!"long", !7, i64 0}
!25 = !{!24, !24, i64 0}
!26 = !{!27, !10, i64 56}
!27 = !{!"_CFolder", !10, i64 0, !6, i64 8, !10, i64 16, !6, i64 24, !10, i64 32, !6, i64 40, !6, i64 48, !10, i64 56, !10, i64 60, !10, i64 64}
!28 = !{!27, !10, i64 60}


; 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"

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

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

declare i32 @SzByteBufferCreate(ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #2

declare i32 @SzFolderGetUnPackSize(ptr noundef) local_unnamed_addr #2

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

; Function Attrs: nounwind uwtable
define dso_local i32 @SzReadAndDecodePackedStreams2(ptr noundef %0, ptr noundef %1, ptr noundef %2, i32 noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7, ptr noundef %8, ptr noundef %9) local_unnamed_addr #0 {
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i64, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #4
  store i32 0, ptr %11, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #4
  %14 = load ptr, ptr %9, align 8, !tbaa !9
  %15 = call i32 @SzReadStreamsInfo(ptr noundef %1, ptr noundef nonnull %12, ptr noundef %4, ptr noundef nonnull %11, ptr noundef %5, ptr noundef %6, ptr noundef %7, ptr noundef %14, ptr noundef nonnull %9)
  %.not = icmp eq i32 %15, 0
  br i1 %.not, label %16, label %69

16:                                               ; preds = %10
  %17 = load i32, ptr %12, align 4, !tbaa !5
  %18 = add i32 %17, %3
  store i32 %18, ptr %12, align 4, !tbaa !5
  %19 = getelementptr inbounds i8, ptr %4, i64 32
  %20 = load i32, ptr %19, align 8, !tbaa !12
  %.not70 = icmp eq i32 %20, 1
  br i1 %.not70, label %21, label %69

21:                                               ; preds = %16
  %22 = getelementptr inbounds i8, ptr %4, i64 40
  %23 = load ptr, ptr %22, align 8, !tbaa !14
  %24 = call i32 @SzFolderGetUnPackSize(ptr noundef %23) #4
  %25 = getelementptr inbounds i8, ptr %0, i64 8
  %26 = load ptr, ptr %25, align 8, !tbaa !15
  %27 = load i32, ptr %12, align 4, !tbaa !5
  %28 = call i32 %26(ptr noundef %0, i32 noundef %27) #4
  %.not71 = icmp eq i32 %28, 0
  br i1 %.not71, label %.preheader, label %69

.preheader:                                       ; preds = %21
  %29 = load i32, ptr %4, align 8, !tbaa !17
  %.not81 = icmp eq i32 %29, 0
  br i1 %.not81, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader
  %30 = getelementptr inbounds i8, ptr %4, i64 8
  %31 = load ptr, ptr %30, align 8, !tbaa !18
  %wide.trip.count = zext i32 %29 to i64
  %min.iters.check = icmp ult i32 %29, 8
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.ph

vector.ph:                                        ; preds = %.lr.ph
  %n.vec = and i64 %wide.trip.count, 4294967288
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vec.phi = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %34, %vector.body ]
  %vec.phi83 = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %35, %vector.body ]
  %32 = getelementptr inbounds i32, ptr %31, i64 %index
  %33 = getelementptr inbounds i8, ptr %32, i64 16
  %wide.load = load <4 x i32>, ptr %32, align 4, !tbaa !5
  %wide.load84 = load <4 x i32>, ptr %33, align 4, !tbaa !5
  %34 = add <4 x i32> %wide.load, %vec.phi
  %35 = add <4 x i32> %wide.load84, %vec.phi83
  %index.next = add nuw i64 %index, 8
  %36 = icmp eq i64 %index.next, %n.vec
  br i1 %36, label %middle.block, label %vector.body, !llvm.loop !19

middle.block:                                     ; preds = %vector.body
  %bin.rdx = add <4 x i32> %35, %34
  %37 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx)
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count
  br i1 %cmp.n, label %._crit_edge.loopexit, label %scalar.ph.preheader

scalar.ph.preheader:                              ; preds = %middle.block, %.lr.ph
  %indvars.iv.ph = phi i64 [ 0, %.lr.ph ], [ %n.vec, %middle.block ]
  %.05980.ph = phi i32 [ 0, %.lr.ph ], [ %37, %middle.block ]
  br label %scalar.ph

scalar.ph:                                        ; preds = %scalar.ph.preheader, %scalar.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %scalar.ph ], [ %indvars.iv.ph, %scalar.ph.preheader ]
  %.05980 = phi i32 [ %40, %scalar.ph ], [ %.05980.ph, %scalar.ph.preheader ]
  %38 = getelementptr inbounds i32, ptr %31, i64 %indvars.iv
  %39 = load i32, ptr %38, align 4, !tbaa !5
  %40 = add i32 %39, %.05980
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge.loopexit, label %scalar.ph, !llvm.loop !23

._crit_edge.loopexit:                             ; preds = %scalar.ph, %middle.block
  %.lcssa = phi i32 [ %37, %middle.block ], [ %40, %scalar.ph ]
  %41 = zext i32 %.lcssa to i64
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.preheader
  %.059.lcssa = phi i64 [ 0, %.preheader ], [ %41, %._crit_edge.loopexit ]
  %42 = load ptr, ptr %9, align 8, !tbaa !9
  %43 = call i32 @MySzInAlloc(ptr noundef %8, i64 noundef %.059.lcssa, ptr noundef %42)
  %.not72 = icmp eq i32 %43, 0
  br i1 %.not72, label %44, label %69

44:                                               ; preds = %._crit_edge
  %45 = load ptr, ptr %8, align 8, !tbaa !24
  %46 = call i32 @SafeReadDirect(ptr noundef %0, ptr noundef %45, i64 noundef %.059.lcssa)
  %.not73 = icmp eq i32 %46, 0
  br i1 %.not73, label %47, label %69

47:                                               ; preds = %44
  %48 = zext i32 %24 to i64
  %49 = load ptr, ptr %9, align 8, !tbaa !9
  %50 = call i32 @SzByteBufferCreate(ptr noundef %2, i64 noundef %48, ptr noundef %49) #4
  %.not74 = icmp eq i32 %50, 0
  br i1 %.not74, label %69, label %51

51:                                               ; preds = %47
  %52 = getelementptr inbounds i8, ptr %4, i64 8
  %53 = load ptr, ptr %52, align 8, !tbaa !18
  %54 = load ptr, ptr %8, align 8, !tbaa !24
  %55 = getelementptr inbounds i8, ptr %2, i64 8
  %56 = load ptr, ptr %55, align 8, !tbaa !25
  %57 = call i32 @SzDecode(ptr noundef %53, ptr noundef %23, ptr noundef %54, ptr noundef %56, i64 noundef %48, ptr noundef nonnull %13, ptr noundef nonnull %9) #4
  %.not75 = icmp eq i32 %57, 0
  br i1 %.not75, label %58, label %69

58:                                               ; preds = %51
  %59 = load i64, ptr %13, align 8, !tbaa !28
  %.not76 = icmp eq i64 %59, %48
  br i1 %.not76, label %60, label %69

60:                                               ; preds = %58
  %61 = getelementptr inbounds i8, ptr %23, i64 56
  %62 = load i32, ptr %61, align 8, !tbaa !29
  %.not77 = icmp eq i32 %62, 0
  br i1 %.not77, label %68, label %63

63:                                               ; preds = %60
  %64 = getelementptr inbounds i8, ptr %23, i64 60
  %65 = load i32, ptr %64, align 4, !tbaa !31
  %66 = load ptr, ptr %55, align 8, !tbaa !25
  %67 = call i32 @CrcVerifyDigest(i32 noundef %65, ptr noundef %66, i64 noundef %48) #4
  %.not78 = icmp eq i32 %67, 0
  br i1 %.not78, label %69, label %68

68:                                               ; preds = %63, %60
  br label %69

69:                                               ; preds = %63, %58, %47, %16, %51, %44, %._crit_edge, %21, %10, %68
  %.5 = phi i32 [ 0, %68 ], [ %57, %51 ], [ %46, %44 ], [ %43, %._crit_edge ], [ %28, %21 ], [ %15, %10 ], [ 6, %16 ], [ 2, %47 ], [ 5, %58 ], [ 5, %63 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #4
  ret i32 %.5
}

declare i32 @SzDecode(ptr noundef, ptr noundef, ptr noundef, ptr noundef, i64 noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

declare i32 @CrcVerifyDigest(i32 noundef, ptr noundef, i64 noundef) local_unnamed_addr #2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.vector.reduce.add.v4i32(<4 x i32>) #3

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !11, i64 0}
!10 = !{!"_ISzAlloc", !11, i64 0, !11, i64 8}
!11 = !{!"any pointer", !7, i64 0}
!12 = !{!13, !6, i64 32}
!13 = !{!"_CArchiveDatabase", !6, i64 0, !11, i64 8, !11, i64 16, !11, i64 24, !6, i64 32, !11, i64 40, !6, i64 48, !11, i64 56}
!14 = !{!13, !11, i64 40}
!15 = !{!16, !11, i64 8}
!16 = !{!"_ISzInStream", !11, i64 0, !11, i64 8}
!17 = !{!13, !6, i64 0}
!18 = !{!13, !11, i64 8}
!19 = distinct !{!19, !20, !21, !22}
!20 = !{!"llvm.loop.mustprogress"}
!21 = !{!"llvm.loop.isvectorized", i32 1}
!22 = !{!"llvm.loop.unroll.runtime.disable"}
!23 = distinct !{!23, !20, !22, !21}
!24 = !{!11, !11, i64 0}
!25 = !{!26, !11, i64 8}
!26 = !{!"_CSzByteBuffer", !27, i64 0, !11, i64 8}
!27 = !{!"long", !7, i64 0}
!28 = !{!27, !27, i64 0}
!29 = !{!30, !6, i64 56}
!30 = !{!"_CFolder", !6, i64 0, !11, i64 8, !6, i64 16, !11, i64 24, !6, i64 32, !11, i64 40, !11, i64 48, !6, i64 56, !6, i64 60, !6, i64 64}
!31 = !{!30, !6, i64 60}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,LCSSAPass,LICMPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,ReassociatePass,SROAPass,SimplifyCFGPass