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

; 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._CMethodID = type { [15 x i8], i8 }
%struct._CLzmaDecoderState = type { %struct._CLzmaProperties, ptr }
%struct._CLzmaProperties = type { i32, i32, i32 }
%struct._CFolder = type { i32, ptr, i32, ptr, i32, ptr, ptr, i32, i32, i32 }
%struct._CCoderInfo = type { i32, i32, %struct._CMethodID, %struct._CSzByteBuffer }
%struct._CSzByteBuffer = type { i64, ptr }
%struct._ISzAlloc = type { ptr, ptr }

@k_Copy = external dso_local global %struct._CMethodID, align 1
@k_LZMA = external dso_local global { <{ i8, i8, i8, [12 x i8] }>, i8 }, align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @SzDecode(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, i64 noundef %4, ptr noundef %5, ptr noundef %6) #0 {
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i64, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca i32, align 4
  %17 = alloca i64, align 8
  %18 = alloca ptr, align 8
  %19 = alloca i32, align 4
  %20 = alloca i64, align 8
  %21 = alloca i32, align 4
  %22 = alloca %struct._CLzmaDecoderState, align 8
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  store ptr %0, ptr %9, align 8, !tbaa !5
  store ptr %1, ptr %10, align 8, !tbaa !5
  store ptr %2, ptr %11, align 8, !tbaa !5
  store ptr %3, ptr %12, align 8, !tbaa !5
  store i64 %4, ptr %13, align 8, !tbaa !9
  store ptr %5, ptr %14, align 8, !tbaa !5
  store ptr %6, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #3
  store i64 0, ptr %17, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #3
  %25 = load ptr, ptr %10, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct._CFolder, ptr %25, i32 0, i32 4
  %27 = load i32, ptr %26, align 8, !tbaa !11
  %28 = icmp ne i32 %27, 1
  br i1 %28, label %29, label %30

29:                                               ; preds = %7
  store i32 4, ptr %8, align 4
  store i32 1, ptr %19, align 4
  br label %155

30:                                               ; preds = %7
  %31 = load ptr, ptr %10, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct._CFolder, ptr %31, i32 0, i32 0
  %33 = load i32, ptr %32, align 8, !tbaa !14
  %34 = icmp ne i32 %33, 1
  br i1 %34, label %35, label %36

35:                                               ; preds = %30
  store i32 4, ptr %8, align 4
  store i32 1, ptr %19, align 4
  br label %155

36:                                               ; preds = %30
  %37 = load ptr, ptr %10, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct._CFolder, ptr %37, i32 0, i32 1
  %39 = load ptr, ptr %38, align 8, !tbaa !15
  store ptr %39, ptr %18, align 8, !tbaa !5
  %40 = load ptr, ptr %14, align 8, !tbaa !5
  store i64 0, ptr %40, align 8, !tbaa !9
  store i32 0, ptr %16, align 4, !tbaa !16
  br label %41

41:                                               ; preds = %56, %36
  %42 = load i32, ptr %16, align 4, !tbaa !16
  %43 = load ptr, ptr %10, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct._CFolder, ptr %43, i32 0, i32 4
  %45 = load i32, ptr %44, align 8, !tbaa !11
  %46 = icmp ult i32 %42, %45
  br i1 %46, label %47, label %59

47:                                               ; preds = %41
  %48 = load ptr, ptr %9, align 8, !tbaa !5
  %49 = load i32, ptr %16, align 4, !tbaa !16
  %50 = zext i32 %49 to i64
  %51 = getelementptr inbounds i32, ptr %48, i64 %50
  %52 = load i32, ptr %51, align 4, !tbaa !16
  %53 = zext i32 %52 to i64
  %54 = load i64, ptr %17, align 8, !tbaa !9
  %55 = add i64 %54, %53
  store i64 %55, ptr %17, align 8, !tbaa !9
  br label %56

56:                                               ; preds = %47
  %57 = load i32, ptr %16, align 4, !tbaa !16
  %58 = add i32 %57, 1
  store i32 %58, ptr %16, align 4, !tbaa !16
  br label %41, !llvm.loop !17

59:                                               ; preds = %41
  %60 = load ptr, ptr %18, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct._CCoderInfo, ptr %60, i32 0, i32 2
  %62 = call i32 @AreMethodsEqual(ptr noundef %61, ptr noundef @k_Copy)
  %63 = icmp ne i32 %62, 0
  br i1 %63, label %64, label %89

64:                                               ; preds = %59
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #3
  %65 = load i64, ptr %17, align 8, !tbaa !9
  %66 = load i64, ptr %13, align 8, !tbaa !9
  %67 = icmp ne i64 %65, %66
  br i1 %67, label %68, label %69

68:                                               ; preds = %64
  store i32 1, ptr %8, align 4
  store i32 1, ptr %19, align 4
  br label %88

69:                                               ; preds = %64
  store i64 0, ptr %20, align 8, !tbaa !9
  br label %70

70:                                               ; preds = %82, %69
  %71 = load i64, ptr %20, align 8, !tbaa !9
  %72 = load i64, ptr %17, align 8, !tbaa !9
  %73 = icmp ult i64 %71, %72
  br i1 %73, label %74, label %85

74:                                               ; preds = %70
  %75 = load ptr, ptr %11, align 8, !tbaa !5
  %76 = load i64, ptr %20, align 8, !tbaa !9
  %77 = getelementptr inbounds i8, ptr %75, i64 %76
  %78 = load i8, ptr %77, align 1, !tbaa !19
  %79 = load ptr, ptr %12, align 8, !tbaa !5
  %80 = load i64, ptr %20, align 8, !tbaa !9
  %81 = getelementptr inbounds i8, ptr %79, i64 %80
  store i8 %78, ptr %81, align 1, !tbaa !19
  br label %82

82:                                               ; preds = %74
  %83 = load i64, ptr %20, align 8, !tbaa !9
  %84 = add i64 %83, 1
  store i64 %84, ptr %20, align 8, !tbaa !9
  br label %70, !llvm.loop !20

85:                                               ; preds = %70
  %86 = load i64, ptr %17, align 8, !tbaa !9
  %87 = load ptr, ptr %14, align 8, !tbaa !5
  store i64 %86, ptr %87, align 8, !tbaa !9
  store i32 0, ptr %8, align 4
  store i32 1, ptr %19, align 4
  br label %88

88:                                               ; preds = %85, %68
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #3
  br label %155

89:                                               ; preds = %59
  %90 = load ptr, ptr %18, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct._CCoderInfo, ptr %90, i32 0, i32 2
  %92 = call i32 @AreMethodsEqual(ptr noundef %91, ptr noundef @k_LZMA)
  %93 = icmp ne i32 %92, 0
  br i1 %93, label %94, label %154

94:                                               ; preds = %89
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #3
  call void @llvm.lifetime.start.p0(i64 24, ptr %22) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #3
  %95 = getelementptr inbounds %struct._CLzmaDecoderState, ptr %22, i32 0, i32 0
  %96 = load ptr, ptr %18, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct._CCoderInfo, ptr %96, i32 0, i32 3
  %98 = getelementptr inbounds %struct._CSzByteBuffer, ptr %97, i32 0, i32 1
  %99 = load ptr, ptr %98, align 8, !tbaa !21
  %100 = load ptr, ptr %18, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct._CCoderInfo, ptr %100, i32 0, i32 3
  %102 = getelementptr inbounds %struct._CSzByteBuffer, ptr %101, i32 0, i32 0
  %103 = load i64, ptr %102, align 8, !tbaa !25
  %104 = trunc i64 %103 to i32
  %105 = call i32 @LzmaDecodeProperties(ptr noundef %95, ptr noundef %99, i32 noundef %104)
  %106 = icmp ne i32 %105, 0
  br i1 %106, label %107, label %108

107:                                              ; preds = %94
  store i32 5, ptr %8, align 4
  store i32 1, ptr %19, align 4
  br label %153

108:                                              ; preds = %94
  %109 = load ptr, ptr %15, align 8, !tbaa !5
  %110 = getelementptr inbounds %struct._ISzAlloc, ptr %109, i32 0, i32 0
  %111 = load ptr, ptr %110, align 8, !tbaa !26
  %112 = getelementptr inbounds %struct._CLzmaDecoderState, ptr %22, i32 0, i32 0
  %113 = getelementptr inbounds %struct._CLzmaProperties, ptr %112, i32 0, i32 0
  %114 = load i32, ptr %113, align 8, !tbaa !28
  %115 = getelementptr inbounds %struct._CLzmaDecoderState, ptr %22, i32 0, i32 0
  %116 = getelementptr inbounds %struct._CLzmaProperties, ptr %115, i32 0, i32 1
  %117 = load i32, ptr %116, align 4, !tbaa !31
  %118 = add nsw i32 %114, %117
  %119 = shl i32 768, %118
  %120 = add nsw i32 1846, %119
  %121 = sext i32 %120 to i64
  %122 = mul i64 %121, 2
  %123 = call ptr %111(i64 noundef %122)
  %124 = getelementptr inbounds %struct._CLzmaDecoderState, ptr %22, i32 0, i32 1
  store ptr %123, ptr %124, align 8, !tbaa !32
  %125 = getelementptr inbounds %struct._CLzmaDecoderState, ptr %22, i32 0, i32 1
  %126 = load ptr, ptr %125, align 8, !tbaa !32
  %127 = icmp eq ptr %126, null
  br i1 %127, label %128, label %129

128:                                              ; preds = %108
  store i32 2, ptr %8, align 4
  store i32 1, ptr %19, align 4
  br label %153

129:                                              ; preds = %108
  %130 = load ptr, ptr %11, align 8, !tbaa !5
  %131 = load i64, ptr %17, align 8, !tbaa !9
  %132 = trunc i64 %131 to i32
  %133 = load ptr, ptr %12, align 8, !tbaa !5
  %134 = load i64, ptr %13, align 8, !tbaa !9
  %135 = trunc i64 %134 to i32
  %136 = call i32 @LzmaDecode(ptr noundef %22, ptr noundef %130, i32 noundef %132, ptr noundef %21, ptr noundef %133, i32 noundef %135, ptr noundef %24)
  store i32 %136, ptr %23, align 4, !tbaa !16
  %137 = load i32, ptr %24, align 4, !tbaa !16
  %138 = zext i32 %137 to i64
  %139 = load ptr, ptr %14, align 8, !tbaa !5
  store i64 %138, ptr %139, align 8, !tbaa !9
  %140 = load ptr, ptr %15, align 8, !tbaa !5
  %141 = getelementptr inbounds %struct._ISzAlloc, ptr %140, i32 0, i32 1
  %142 = load ptr, ptr %141, align 8, !tbaa !33
  %143 = getelementptr inbounds %struct._CLzmaDecoderState, ptr %22, i32 0, i32 1
  %144 = load ptr, ptr %143, align 8, !tbaa !32
  call void %142(ptr noundef %144)
  %145 = load i32, ptr %23, align 4, !tbaa !16
  %146 = icmp eq i32 %145, 1
  br i1 %146, label %147, label %148

147:                                              ; preds = %129
  store i32 1, ptr %8, align 4
  store i32 1, ptr %19, align 4
  br label %153

148:                                              ; preds = %129
  %149 = load i32, ptr %23, align 4, !tbaa !16
  %150 = icmp ne i32 %149, 0
  br i1 %150, label %151, label %152

151:                                              ; preds = %148
  store i32 5, ptr %8, align 4
  store i32 1, ptr %19, align 4
  br label %153

152:                                              ; preds = %148
  store i32 0, ptr %8, align 4
  store i32 1, ptr %19, align 4
  br label %153

153:                                              ; preds = %152, %151, %147, %128, %107
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #3
  call void @llvm.lifetime.end.p0(i64 24, ptr %22) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #3
  br label %155

154:                                              ; preds = %89
  store i32 4, ptr %8, align 4
  store i32 1, ptr %19, align 4
  br label %155

155:                                              ; preds = %154, %153, %88, %35, %29
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #3
  %156 = load i32, ptr %8, align 4
  ret i32 %156
}

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

declare i32 @AreMethodsEqual(ptr noundef, ptr noundef) #2

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

declare i32 @LzmaDecodeProperties(ptr noundef, ptr noundef, i32 noundef) #2

declare i32 @LzmaDecode(ptr noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef, i32 noundef, ptr 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 = !{!"long", !7, i64 0}
!11 = !{!12, !13, i64 32}
!12 = !{!"_CFolder", !13, i64 0, !6, i64 8, !13, i64 16, !6, i64 24, !13, i64 32, !6, i64 40, !6, i64 48, !13, i64 56, !13, i64 60, !13, i64 64}
!13 = !{!"int", !7, i64 0}
!14 = !{!12, !13, i64 0}
!15 = !{!12, !6, i64 8}
!16 = !{!13, !13, i64 0}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = !{!7, !7, i64 0}
!20 = distinct !{!20, !18}
!21 = !{!22, !6, i64 32}
!22 = !{!"_CCoderInfo", !13, i64 0, !13, i64 4, !23, i64 8, !24, i64 24}
!23 = !{!"_CMethodID", !7, i64 0, !7, i64 15}
!24 = !{!"_CSzByteBuffer", !10, i64 0, !6, i64 8}
!25 = !{!22, !10, i64 24}
!26 = !{!27, !6, i64 0}
!27 = !{!"_ISzAlloc", !6, i64 0, !6, i64 8}
!28 = !{!29, !13, i64 0}
!29 = !{!"_CLzmaDecoderState", !30, i64 0, !6, i64 16}
!30 = !{!"_CLzmaProperties", !13, i64 0, !13, i64 4, !13, i64 8}
!31 = !{!29, !13, i64 4}
!32 = !{!29, !6, i64 16}
!33 = !{!27, !6, i64 8}


; 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._CMethodID = type { [15 x i8], i8 }
%struct._CLzmaDecoderState = type { %struct._CLzmaProperties, ptr }
%struct._CLzmaProperties = type { i32, i32, i32 }

@k_Copy = external dso_local global %struct._CMethodID, align 1
@k_LZMA = external dso_local global { <{ i8, i8, i8, [12 x i8] }>, i8 }, align 1

; Function Attrs: nounwind uwtable
define dso_local range(i32 0, 6) i32 @SzDecode(ptr nocapture noundef readonly %0, ptr nocapture noundef readonly %1, ptr noundef %2, ptr noundef %3, i64 noundef %4, ptr nocapture noundef writeonly %5, ptr nocapture noundef readonly %6) local_unnamed_addr #0 {
  %8 = ptrtoint ptr %2 to i64
  %9 = ptrtoint ptr %3 to i64
  %10 = alloca i32, align 4
  %11 = alloca %struct._CLzmaDecoderState, align 8
  %12 = alloca i32, align 4
  %13 = getelementptr inbounds i8, ptr %1, i64 32
  %14 = load i32, ptr %13, align 8, !tbaa !5
  %.not = icmp eq i32 %14, 1
  br i1 %.not, label %15, label %86

15:                                               ; preds = %7
  %16 = load i32, ptr %1, align 8, !tbaa !11
  %.not38 = icmp eq i32 %16, 1
  br i1 %.not38, label %17, label %86

17:                                               ; preds = %15
  %18 = getelementptr inbounds i8, ptr %1, i64 8
  %19 = load ptr, ptr %18, align 8, !tbaa !12
  store i64 0, ptr %5, align 8, !tbaa !13
  %.pre = load i32, ptr %0, align 4, !tbaa !15
  %20 = getelementptr inbounds i8, ptr %19, i64 8
  %21 = tail call i32 @AreMethodsEqual(ptr noundef nonnull %20, ptr noundef nonnull @k_Copy) #3
  %.not39 = icmp eq i32 %21, 0
  br i1 %.not39, label %55, label %22

22:                                               ; preds = %17
  %23 = zext i32 %.pre to i64
  %.not43 = icmp eq i64 %23, %4
  br i1 %.not43, label %.preheader, label %86

.preheader:                                       ; preds = %22
  %.not49 = icmp eq i64 %4, 0
  br i1 %.not49, label %._crit_edge, label %iter.check

iter.check:                                       ; preds = %.preheader
  %min.iters.check = icmp ult i64 %4, 8
  %24 = sub i64 %9, %8
  %diff.check = icmp ult i64 %24, 32
  %or.cond = or i1 %min.iters.check, %diff.check
  br i1 %or.cond, label %.lr.ph.preheader, label %vector.main.loop.iter.check

vector.main.loop.iter.check:                      ; preds = %iter.check
  %min.iters.check52 = icmp ult i64 %4, 32
  br i1 %min.iters.check52, label %vec.epilog.ph, label %vector.ph

vector.ph:                                        ; preds = %vector.main.loop.iter.check
  %n.vec = and i64 %4, -32
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %25 = getelementptr inbounds i8, ptr %2, i64 %index
  %26 = getelementptr inbounds i8, ptr %25, i64 16
  %wide.load = load <16 x i8>, ptr %25, align 1, !tbaa !16
  %wide.load53 = load <16 x i8>, ptr %26, align 1, !tbaa !16
  %27 = getelementptr inbounds i8, ptr %3, i64 %index
  %28 = getelementptr inbounds i8, ptr %27, i64 16
  store <16 x i8> %wide.load, ptr %27, align 1, !tbaa !16
  store <16 x i8> %wide.load53, ptr %28, align 1, !tbaa !16
  %index.next = add nuw i64 %index, 32
  %29 = icmp eq i64 %index.next, %n.vec
  br i1 %29, label %middle.block, label %vector.body, !llvm.loop !17

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %4
  br i1 %cmp.n, label %._crit_edge, label %vec.epilog.iter.check

vec.epilog.iter.check:                            ; preds = %middle.block
  %n.vec.remaining = and i64 %4, 24
  %min.epilog.iters.check = icmp eq i64 %n.vec.remaining, 0
  br i1 %min.epilog.iters.check, label %.lr.ph.preheader, label %vec.epilog.ph

vec.epilog.ph:                                    ; preds = %vector.main.loop.iter.check, %vec.epilog.iter.check
  %vec.epilog.resume.val = phi i64 [ %n.vec, %vec.epilog.iter.check ], [ 0, %vector.main.loop.iter.check ]
  %n.vec55 = and i64 %4, -8
  br label %vec.epilog.vector.body

vec.epilog.vector.body:                           ; preds = %vec.epilog.vector.body, %vec.epilog.ph
  %index56 = phi i64 [ %vec.epilog.resume.val, %vec.epilog.ph ], [ %index.next58, %vec.epilog.vector.body ]
  %30 = getelementptr inbounds i8, ptr %2, i64 %index56
  %wide.load57 = load <8 x i8>, ptr %30, align 1, !tbaa !16
  %31 = getelementptr inbounds i8, ptr %3, i64 %index56
  store <8 x i8> %wide.load57, ptr %31, align 1, !tbaa !16
  %index.next58 = add nuw i64 %index56, 8
  %32 = icmp eq i64 %index.next58, %n.vec55
  br i1 %32, label %vec.epilog.middle.block, label %vec.epilog.vector.body, !llvm.loop !21

vec.epilog.middle.block:                          ; preds = %vec.epilog.vector.body
  %cmp.n59 = icmp eq i64 %n.vec55, %4
  br i1 %cmp.n59, label %._crit_edge, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %vec.epilog.middle.block, %iter.check, %vec.epilog.iter.check
  %.03448.ph = phi i64 [ 0, %iter.check ], [ %n.vec, %vec.epilog.iter.check ], [ %n.vec55, %vec.epilog.middle.block ]
  %xtraiter = and i64 %4, 3
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.lr.ph.prol.loopexit, label %.lr.ph.prol

.lr.ph.prol:                                      ; preds = %.lr.ph.preheader, %.lr.ph.prol
  %.03448.prol = phi i64 [ %36, %.lr.ph.prol ], [ %.03448.ph, %.lr.ph.preheader ]
  %prol.iter = phi i64 [ %prol.iter.next, %.lr.ph.prol ], [ 0, %.lr.ph.preheader ]
  %33 = getelementptr inbounds i8, ptr %2, i64 %.03448.prol
  %34 = load i8, ptr %33, align 1, !tbaa !16
  %35 = getelementptr inbounds i8, ptr %3, i64 %.03448.prol
  store i8 %34, ptr %35, align 1, !tbaa !16
  %36 = add nuw nsw i64 %.03448.prol, 1
  %prol.iter.next = add i64 %prol.iter, 1
  %prol.iter.cmp.not = icmp eq i64 %prol.iter.next, %xtraiter
  br i1 %prol.iter.cmp.not, label %.lr.ph.prol.loopexit, label %.lr.ph.prol, !llvm.loop !22

.lr.ph.prol.loopexit:                             ; preds = %.lr.ph.prol, %.lr.ph.preheader
  %.03448.unr = phi i64 [ %.03448.ph, %.lr.ph.preheader ], [ %36, %.lr.ph.prol ]
  %37 = sub i64 %.03448.ph, %4
  %38 = icmp ugt i64 %37, -4
  br i1 %38, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.prol.loopexit, %.lr.ph
  %.03448 = phi i64 [ %54, %.lr.ph ], [ %.03448.unr, %.lr.ph.prol.loopexit ]
  %39 = getelementptr inbounds i8, ptr %2, i64 %.03448
  %40 = load i8, ptr %39, align 1, !tbaa !16
  %41 = getelementptr inbounds i8, ptr %3, i64 %.03448
  store i8 %40, ptr %41, align 1, !tbaa !16
  %42 = add nuw nsw i64 %.03448, 1
  %43 = getelementptr inbounds i8, ptr %2, i64 %42
  %44 = load i8, ptr %43, align 1, !tbaa !16
  %45 = getelementptr inbounds i8, ptr %3, i64 %42
  store i8 %44, ptr %45, align 1, !tbaa !16
  %46 = add nuw nsw i64 %.03448, 2
  %47 = getelementptr inbounds i8, ptr %2, i64 %46
  %48 = load i8, ptr %47, align 1, !tbaa !16
  %49 = getelementptr inbounds i8, ptr %3, i64 %46
  store i8 %48, ptr %49, align 1, !tbaa !16
  %50 = add nuw nsw i64 %.03448, 3
  %51 = getelementptr inbounds i8, ptr %2, i64 %50
  %52 = load i8, ptr %51, align 1, !tbaa !16
  %53 = getelementptr inbounds i8, ptr %3, i64 %50
  store i8 %52, ptr %53, align 1, !tbaa !16
  %54 = add nuw nsw i64 %.03448, 4
  %exitcond.not.3 = icmp eq i64 %54, %4
  br i1 %exitcond.not.3, label %._crit_edge, label %.lr.ph, !llvm.loop !24

._crit_edge:                                      ; preds = %.lr.ph.prol.loopexit, %.lr.ph, %middle.block, %vec.epilog.middle.block, %.preheader
  store i64 %4, ptr %5, align 8, !tbaa !13
  br label %86

55:                                               ; preds = %17
  %56 = tail call i32 @AreMethodsEqual(ptr noundef nonnull %20, ptr noundef nonnull @k_LZMA) #3
  %.not40 = icmp eq i32 %56, 0
  br i1 %.not40, label %86, label %57

57:                                               ; preds = %55
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #3
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %11) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #3
  %58 = getelementptr inbounds i8, ptr %19, i64 24
  %59 = getelementptr inbounds i8, ptr %19, i64 32
  %60 = load ptr, ptr %59, align 8, !tbaa !25
  %61 = load i64, ptr %58, align 8, !tbaa !29
  %62 = trunc i64 %61 to i32
  %63 = call i32 @LzmaDecodeProperties(ptr noundef nonnull %11, ptr noundef %60, i32 noundef %62) #3
  %.not41 = icmp eq i32 %63, 0
  br i1 %.not41, label %64, label %85

64:                                               ; preds = %57
  %65 = load ptr, ptr %6, align 8, !tbaa !30
  %66 = load i32, ptr %11, align 8, !tbaa !32
  %67 = getelementptr inbounds i8, ptr %11, i64 4
  %68 = load i32, ptr %67, align 4, !tbaa !35
  %69 = add nsw i32 %68, %66
  %70 = shl i32 768, %69
  %71 = add nuw nsw i32 %70, 1846
  %72 = sext i32 %71 to i64
  %73 = shl nsw i64 %72, 1
  %74 = call ptr %65(i64 noundef %73) #3
  %75 = getelementptr inbounds i8, ptr %11, i64 16
  store ptr %74, ptr %75, align 8, !tbaa !36
  %76 = icmp eq ptr %74, null
  br i1 %76, label %85, label %77

77:                                               ; preds = %64
  %78 = trunc i64 %4 to i32
  %79 = call i32 @LzmaDecode(ptr noundef nonnull %11, ptr noundef %2, i32 noundef %.pre, ptr noundef nonnull %10, ptr noundef %3, i32 noundef %78, ptr noundef nonnull %12) #3
  %80 = load i32, ptr %12, align 4, !tbaa !15
  %81 = zext i32 %80 to i64
  store i64 %81, ptr %5, align 8, !tbaa !13
  %82 = getelementptr inbounds i8, ptr %6, i64 8
  %83 = load ptr, ptr %82, align 8, !tbaa !37
  %84 = load ptr, ptr %75, align 8, !tbaa !36
  call void %83(ptr noundef %84) #3
  %switch.selectcmp = icmp eq i32 %79, 0
  %switch.select = select i1 %switch.selectcmp, i32 0, i32 5
  %switch.selectcmp44 = icmp eq i32 %79, 1
  %switch.select45 = select i1 %switch.selectcmp44, i32 1, i32 %switch.select
  br label %85

85:                                               ; preds = %77, %64, %57
  %.1 = phi i32 [ 5, %57 ], [ 2, %64 ], [ %switch.select45, %77 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #3
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %11) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #3
  br label %86

86:                                               ; preds = %55, %._crit_edge, %22, %15, %7, %85
  %.2 = phi i32 [ %.1, %85 ], [ 4, %7 ], [ 4, %15 ], [ 0, %._crit_edge ], [ 1, %22 ], [ 4, %55 ]
  ret i32 %.2
}

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

declare i32 @AreMethodsEqual(ptr noundef, ptr noundef) local_unnamed_addr #2

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

declare i32 @LzmaDecodeProperties(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #2

declare i32 @LzmaDecode(ptr noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #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 = { 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 = { 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, !7, i64 32}
!6 = !{!"_CFolder", !7, i64 0, !10, i64 8, !7, i64 16, !10, i64 24, !7, i64 32, !10, i64 40, !10, i64 48, !7, i64 56, !7, i64 60, !7, i64 64}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!6, !7, i64 0}
!12 = !{!6, !10, i64 8}
!13 = !{!14, !14, i64 0}
!14 = !{!"long", !8, i64 0}
!15 = !{!7, !7, i64 0}
!16 = !{!8, !8, i64 0}
!17 = distinct !{!17, !18, !19, !20}
!18 = !{!"llvm.loop.mustprogress"}
!19 = !{!"llvm.loop.isvectorized", i32 1}
!20 = !{!"llvm.loop.unroll.runtime.disable"}
!21 = distinct !{!21, !18, !19, !20}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.unroll.disable"}
!24 = distinct !{!24, !18, !19}
!25 = !{!26, !10, i64 32}
!26 = !{!"_CCoderInfo", !7, i64 0, !7, i64 4, !27, i64 8, !28, i64 24}
!27 = !{!"_CMethodID", !8, i64 0, !8, i64 15}
!28 = !{!"_CSzByteBuffer", !14, i64 0, !10, i64 8}
!29 = !{!26, !14, i64 24}
!30 = !{!31, !10, i64 0}
!31 = !{!"_ISzAlloc", !10, i64 0, !10, i64 8}
!32 = !{!33, !7, i64 0}
!33 = !{!"_CLzmaDecoderState", !34, i64 0, !10, i64 16}
!34 = !{!"_CLzmaProperties", !7, i64 0, !7, i64 4, !7, i64 8}
!35 = !{!33, !7, i64 4}
!36 = !{!33, !10, i64 16}
!37 = !{!31, !10, i64 8}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,PostOrderFunctionAttrsPass,ReassociatePass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass