; LLVM IR from SSBMTonberry/pocketlzma :: ref_spec/lzma1900/C (XzIn)

; 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.CXzStream = type { i16, i64, ptr, i64 }
%struct.ILookInStream = type { ptr, ptr, ptr, ptr }
%struct.CXzs = type { i64, i64, ptr }
%struct.ISzAlloc = type { ptr, ptr }
%struct.ICompressProgress = type { ptr }

; 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 uwtable
define dso_local i32 @Xzs_ReadBackward(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4) #1 {
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i64, align 8
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca %struct.CXzStream, align 8
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i64, align 8
  %19 = alloca ptr, align 8
  %20 = alloca i32, align 4
  store ptr %0, ptr %7, align 8, !tbaa !5
  store ptr %1, ptr %8, align 8, !tbaa !5
  store ptr %2, ptr %9, align 8, !tbaa !5
  store ptr %3, ptr %10, align 8, !tbaa !5
  store ptr %4, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  store i64 0, ptr %12, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  %21 = load ptr, ptr %8, align 8, !tbaa !5
  %22 = getelementptr inbounds %struct.ILookInStream, ptr %21, i32 0, i32 3
  %23 = load ptr, ptr %22, align 8, !tbaa !11
  %24 = load ptr, ptr %8, align 8, !tbaa !5
  %25 = call i32 %23(ptr noundef %24, ptr noundef %12, i32 noundef 2)
  store i32 %25, ptr %13, align 4, !tbaa !13
  %26 = load i32, ptr %13, align 4, !tbaa !13
  %27 = icmp ne i32 %26, 0
  br i1 %27, label %28, label %30

28:                                               ; preds = %5
  %29 = load i32, ptr %13, align 4, !tbaa !13
  store i32 %29, ptr %6, align 4
  store i32 1, ptr %14, align 4
  br label %31

30:                                               ; preds = %5
  store i32 0, ptr %14, align 4
  br label %31

31:                                               ; preds = %30, %28
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  %32 = load i32, ptr %14, align 4
  switch i32 %32, label %156 [
    i32 0, label %33
  ]

33:                                               ; preds = %31
  %34 = load i64, ptr %12, align 8, !tbaa !9
  %35 = load ptr, ptr %9, align 8, !tbaa !5
  store i64 %34, ptr %35, align 8, !tbaa !9
  br label %36

36:                                               ; preds = %154, %33
  call void @llvm.lifetime.start.p0(i64 32, ptr %15) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #4
  call void @Xz_Construct(ptr noundef %15)
  %37 = load ptr, ptr %8, align 8, !tbaa !5
  %38 = load ptr, ptr %9, align 8, !tbaa !5
  %39 = load ptr, ptr %11, align 8, !tbaa !5
  %40 = call i32 @Xz_ReadBackward(ptr noundef %15, ptr noundef %37, ptr noundef %38, ptr noundef %39)
  store i32 %40, ptr %16, align 4, !tbaa !13
  %41 = load ptr, ptr %9, align 8, !tbaa !5
  %42 = load i64, ptr %41, align 8, !tbaa !9
  %43 = getelementptr inbounds %struct.CXzStream, ptr %15, i32 0, i32 3
  store i64 %42, ptr %43, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #4
  %44 = load i32, ptr %16, align 4, !tbaa !13
  store i32 %44, ptr %17, align 4, !tbaa !13
  %45 = load i32, ptr %17, align 4, !tbaa !13
  %46 = icmp ne i32 %45, 0
  br i1 %46, label %47, label %49

47:                                               ; preds = %36
  %48 = load i32, ptr %17, align 4, !tbaa !13
  store i32 %48, ptr %6, align 4
  store i32 1, ptr %14, align 4
  br label %50

49:                                               ; preds = %36
  store i32 0, ptr %14, align 4
  br label %50

50:                                               ; preds = %49, %47
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #4
  %51 = load i32, ptr %14, align 4
  switch i32 %51, label %152 [
    i32 0, label %52
  ]

52:                                               ; preds = %50
  %53 = load ptr, ptr %7, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.CXzs, ptr %53, i32 0, i32 0
  %55 = load i64, ptr %54, align 8, !tbaa !19
  %56 = load ptr, ptr %7, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.CXzs, ptr %56, i32 0, i32 1
  %58 = load i64, ptr %57, align 8, !tbaa !21
  %59 = icmp eq i64 %55, %58
  br i1 %59, label %60, label %111

60:                                               ; preds = %52
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #4
  %61 = load ptr, ptr %7, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.CXzs, ptr %61, i32 0, i32 0
  %63 = load i64, ptr %62, align 8, !tbaa !19
  %64 = load ptr, ptr %7, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct.CXzs, ptr %64, i32 0, i32 0
  %66 = load i64, ptr %65, align 8, !tbaa !19
  %67 = udiv i64 %66, 4
  %68 = add i64 %63, %67
  %69 = add i64 %68, 1
  store i64 %69, ptr %18, align 8, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #4
  %70 = load ptr, ptr %11, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct.ISzAlloc, ptr %70, i32 0, i32 0
  %72 = load ptr, ptr %71, align 8, !tbaa !23
  %73 = load ptr, ptr %11, align 8, !tbaa !5
  %74 = load i64, ptr %18, align 8, !tbaa !22
  %75 = mul i64 %74, 32
  %76 = call ptr %72(ptr noundef %73, i64 noundef %75)
  store ptr %76, ptr %19, align 8, !tbaa !5
  %77 = load ptr, ptr %19, align 8, !tbaa !5
  %78 = icmp ne ptr %77, null
  br i1 %78, label %80, label %79

79:                                               ; preds = %60
  store i32 2, ptr %6, align 4
  store i32 1, ptr %14, align 4
  br label %108

80:                                               ; preds = %60
  %81 = load i64, ptr %18, align 8, !tbaa !22
  %82 = load ptr, ptr %7, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct.CXzs, ptr %82, i32 0, i32 1
  store i64 %81, ptr %83, align 8, !tbaa !21
  %84 = load ptr, ptr %7, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct.CXzs, ptr %84, i32 0, i32 0
  %86 = load i64, ptr %85, align 8, !tbaa !19
  %87 = icmp ne i64 %86, 0
  br i1 %87, label %88, label %97

88:                                               ; preds = %80
  %89 = load ptr, ptr %19, align 8, !tbaa !5
  %90 = load ptr, ptr %7, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct.CXzs, ptr %90, i32 0, i32 2
  %92 = load ptr, ptr %91, align 8, !tbaa !25
  %93 = load ptr, ptr %7, align 8, !tbaa !5
  %94 = getelementptr inbounds %struct.CXzs, ptr %93, i32 0, i32 0
  %95 = load i64, ptr %94, align 8, !tbaa !19
  %96 = mul i64 %95, 32
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %89, ptr align 8 %92, i64 %96, i1 false)
  br label %97

97:                                               ; preds = %88, %80
  %98 = load ptr, ptr %11, align 8, !tbaa !5
  %99 = getelementptr inbounds %struct.ISzAlloc, ptr %98, i32 0, i32 1
  %100 = load ptr, ptr %99, align 8, !tbaa !26
  %101 = load ptr, ptr %11, align 8, !tbaa !5
  %102 = load ptr, ptr %7, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct.CXzs, ptr %102, i32 0, i32 2
  %104 = load ptr, ptr %103, align 8, !tbaa !25
  call void %100(ptr noundef %101, ptr noundef %104)
  %105 = load ptr, ptr %19, align 8, !tbaa !5
  %106 = load ptr, ptr %7, align 8, !tbaa !5
  %107 = getelementptr inbounds %struct.CXzs, ptr %106, i32 0, i32 2
  store ptr %105, ptr %107, align 8, !tbaa !25
  store i32 0, ptr %14, align 4
  br label %108

108:                                              ; preds = %97, %79
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #4
  %109 = load i32, ptr %14, align 4
  switch i32 %109, label %152 [
    i32 0, label %110
  ]

110:                                              ; preds = %108
  br label %111

111:                                              ; preds = %110, %52
  %112 = load ptr, ptr %7, align 8, !tbaa !5
  %113 = getelementptr inbounds %struct.CXzs, ptr %112, i32 0, i32 2
  %114 = load ptr, ptr %113, align 8, !tbaa !25
  %115 = load ptr, ptr %7, align 8, !tbaa !5
  %116 = getelementptr inbounds %struct.CXzs, ptr %115, i32 0, i32 0
  %117 = load i64, ptr %116, align 8, !tbaa !19
  %118 = add i64 %117, 1
  store i64 %118, ptr %116, align 8, !tbaa !19
  %119 = getelementptr inbounds %struct.CXzStream, ptr %114, i64 %117
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %119, ptr align 8 %15, i64 32, i1 false), !tbaa.struct !27
  %120 = load ptr, ptr %9, align 8, !tbaa !5
  %121 = load i64, ptr %120, align 8, !tbaa !9
  %122 = icmp eq i64 %121, 0
  br i1 %122, label %123, label %124

123:                                              ; preds = %111
  store i32 2, ptr %14, align 4
  br label %152

124:                                              ; preds = %111
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #4
  %125 = load ptr, ptr %8, align 8, !tbaa !5
  %126 = load ptr, ptr %9, align 8, !tbaa !5
  %127 = load i64, ptr %126, align 8, !tbaa !9
  %128 = call i32 @LookInStream_SeekTo(ptr noundef %125, i64 noundef %127)
  store i32 %128, ptr %20, align 4, !tbaa !13
  %129 = load i32, ptr %20, align 4, !tbaa !13
  %130 = icmp ne i32 %129, 0
  br i1 %130, label %131, label %133

131:                                              ; preds = %124
  %132 = load i32, ptr %20, align 4, !tbaa !13
  store i32 %132, ptr %6, align 4
  store i32 1, ptr %14, align 4
  br label %134

133:                                              ; preds = %124
  store i32 0, ptr %14, align 4
  br label %134

134:                                              ; preds = %133, %131
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #4
  %135 = load i32, ptr %14, align 4
  switch i32 %135, label %152 [
    i32 0, label %136
  ]

136:                                              ; preds = %134
  %137 = load ptr, ptr %10, align 8, !tbaa !5
  %138 = icmp ne ptr %137, null
  br i1 %138, label %139, label %151

139:                                              ; preds = %136
  %140 = load ptr, ptr %10, align 8, !tbaa !5
  %141 = getelementptr inbounds %struct.ICompressProgress, ptr %140, i32 0, i32 0
  %142 = load ptr, ptr %141, align 8, !tbaa !29
  %143 = load ptr, ptr %10, align 8, !tbaa !5
  %144 = load i64, ptr %12, align 8, !tbaa !9
  %145 = load ptr, ptr %9, align 8, !tbaa !5
  %146 = load i64, ptr %145, align 8, !tbaa !9
  %147 = sub nsw i64 %144, %146
  %148 = call i32 %142(ptr noundef %143, i64 noundef %147, i64 noundef -1)
  %149 = icmp ne i32 %148, 0
  br i1 %149, label %150, label %151

150:                                              ; preds = %139
  store i32 10, ptr %6, align 4
  store i32 1, ptr %14, align 4
  br label %152

151:                                              ; preds = %139, %136
  store i32 0, ptr %14, align 4
  br label %152

152:                                              ; preds = %151, %150, %134, %123, %108, %50
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %15) #4
  %153 = load i32, ptr %14, align 4
  switch i32 %153, label %156 [
    i32 0, label %154
    i32 2, label %155
  ]

154:                                              ; preds = %152
  br label %36

155:                                              ; preds = %152
  store i32 0, ptr %6, align 4
  store i32 1, ptr %14, align 4
  br label %156

156:                                              ; preds = %155, %152, %31
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  %157 = load i32, ptr %6, align 4
  ret i32 %157
}

declare void @Xz_Construct(ptr noundef) #2

; Function Attrs: nounwind uwtable
declare hidden i32 @Xz_ReadBackward(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #1

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

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

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

!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 long", !7, i64 0}
!11 = !{!12, !6, i64 24}
!12 = !{!"ILookInStream", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!13 = !{!14, !14, i64 0}
!14 = !{!"int", !7, i64 0}
!15 = !{!16, !10, i64 24}
!16 = !{!"", !17, i64 0, !18, i64 8, !6, i64 16, !10, i64 24}
!17 = !{!"short", !7, i64 0}
!18 = !{!"long", !7, i64 0}
!19 = !{!20, !18, i64 0}
!20 = !{!"", !18, i64 0, !18, i64 8, !6, i64 16}
!21 = !{!20, !18, i64 8}
!22 = !{!18, !18, i64 0}
!23 = !{!24, !6, i64 0}
!24 = !{!"ISzAlloc", !6, i64 0, !6, i64 8}
!25 = !{!20, !6, i64 16}
!26 = !{!24, !6, i64 8}
!27 = !{i64 0, i64 2, !28, i64 8, i64 8, !22, i64 16, i64 8, !5, i64 24, i64 8, !9}
!28 = !{!17, !17, i64 0}
!29 = !{!30, !6, i64 0}
!30 = !{!"ICompressProgress", !6, i64 0}


; 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.CXzStream = type { i16, i64, ptr, i64 }

; 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: nounwind uwtable
define dso_local i32 @Xzs_ReadBackward(ptr nocapture noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4) local_unnamed_addr #1 {
  %6 = alloca i64, align 8
  %7 = alloca %struct.CXzStream, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #4
  store i64 0, ptr %6, align 8, !tbaa !5
  %8 = getelementptr inbounds i8, ptr %1, i64 24
  %9 = load ptr, ptr %8, align 8, !tbaa !9
  %10 = call i32 %9(ptr noundef %1, ptr noundef nonnull %6, i32 noundef 2) #4
  %.not = icmp eq i32 %10, 0
  br i1 %.not, label %11, label %58

11:                                               ; preds = %5
  %12 = load i64, ptr %6, align 8, !tbaa !5
  store i64 %12, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #4
  call void @Xz_Construct(ptr noundef nonnull %7) #4
  %13 = call i32 @Xz_ReadBackward(ptr noundef nonnull %7, ptr noundef nonnull %1, ptr noundef nonnull %2, ptr noundef %4)
  %14 = load i64, ptr %2, align 8, !tbaa !5
  %15 = getelementptr inbounds i8, ptr %7, i64 24
  store i64 %14, ptr %15, align 8, !tbaa !12
  %.not6174 = icmp eq i32 %13, 0
  br i1 %.not6174, label %.lr.ph, label %.thread68

.lr.ph:                                           ; preds = %11
  %16 = getelementptr inbounds i8, ptr %0, i64 8
  %17 = getelementptr inbounds i8, ptr %0, i64 16
  %18 = getelementptr inbounds i8, ptr %4, i64 8
  %.not65 = icmp eq ptr %3, null
  br label %19

19:                                               ; preds = %.lr.ph, %54
  %20 = load i64, ptr %0, align 8, !tbaa !16
  %21 = load i64, ptr %16, align 8, !tbaa !18
  %22 = icmp eq i64 %20, %21
  br i1 %22, label %23, label %._crit_edge

._crit_edge:                                      ; preds = %19
  %.pre = load ptr, ptr %17, align 8, !tbaa !19
  br label %38

23:                                               ; preds = %19
  %24 = lshr i64 %20, 2
  %25 = add i64 %20, 1
  %26 = add i64 %25, %24
  %27 = load ptr, ptr %4, align 8, !tbaa !20
  %28 = shl i64 %26, 5
  %29 = call ptr %27(ptr noundef nonnull %4, i64 noundef %28) #4
  %.not62.not = icmp eq ptr %29, null
  br i1 %.not62.not, label %.thread68, label %30

30:                                               ; preds = %23
  store i64 %26, ptr %16, align 8, !tbaa !18
  %31 = load i64, ptr %0, align 8, !tbaa !16
  %.not63 = icmp eq i64 %31, 0
  br i1 %.not63, label %35, label %32

32:                                               ; preds = %30
  %33 = load ptr, ptr %17, align 8, !tbaa !19
  %34 = shl i64 %31, 5
  call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 1 %29, ptr align 8 %33, i64 %34, i1 false)
  br label %35

35:                                               ; preds = %30, %32
  %36 = load ptr, ptr %18, align 8, !tbaa !22
  %37 = load ptr, ptr %17, align 8, !tbaa !19
  call void %36(ptr noundef nonnull %4, ptr noundef %37) #4
  store ptr %29, ptr %17, align 8, !tbaa !19
  %.pre81 = load i64, ptr %0, align 8, !tbaa !16
  br label %38

38:                                               ; preds = %._crit_edge, %35
  %39 = phi i64 [ %20, %._crit_edge ], [ %.pre81, %35 ]
  %40 = phi ptr [ %.pre, %._crit_edge ], [ %29, %35 ]
  %41 = add i64 %39, 1
  store i64 %41, ptr %0, align 8, !tbaa !16
  %42 = getelementptr inbounds %struct.CXzStream, ptr %40, i64 %39
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(32) %42, ptr noundef nonnull align 8 dereferenceable(32) %7, i64 32, i1 false), !tbaa.struct !23
  %43 = load i64, ptr %2, align 8, !tbaa !5
  %44 = icmp eq i64 %43, 0
  br i1 %44, label %57, label %45

45:                                               ; preds = %38
  %46 = call i32 @LookInStream_SeekTo(ptr noundef %1, i64 noundef %43) #4
  %.not64 = icmp eq i32 %46, 0
  br i1 %.not64, label %47, label %.thread68

47:                                               ; preds = %45
  br i1 %.not65, label %54, label %48

48:                                               ; preds = %47
  %49 = load ptr, ptr %3, align 8, !tbaa !27
  %50 = load i64, ptr %6, align 8, !tbaa !5
  %51 = load i64, ptr %2, align 8, !tbaa !5
  %52 = sub nsw i64 %50, %51
  %53 = call i32 %49(ptr noundef nonnull %3, i64 noundef %52, i64 noundef -1) #4
  %.not66 = icmp eq i32 %53, 0
  br i1 %.not66, label %54, label %.thread68

.thread68:                                        ; preds = %23, %48, %54, %45, %11
  %.6.ph = phi i32 [ %13, %11 ], [ %46, %45 ], [ %55, %54 ], [ 10, %48 ], [ 2, %23 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #4
  br label %58

54:                                               ; preds = %47, %48
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #4
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #4
  call void @Xz_Construct(ptr noundef nonnull %7) #4
  %55 = call i32 @Xz_ReadBackward(ptr noundef nonnull %7, ptr noundef %1, ptr noundef nonnull %2, ptr noundef %4)
  %56 = load i64, ptr %2, align 8, !tbaa !5
  store i64 %56, ptr %15, align 8, !tbaa !12
  %.not61 = icmp eq i32 %55, 0
  br i1 %.not61, label %19, label %.thread68

57:                                               ; preds = %38
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #4
  br label %58

58:                                               ; preds = %.thread68, %5, %57
  %.7 = phi i32 [ 0, %57 ], [ %10, %5 ], [ %.6.ph, %.thread68 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #4
  ret i32 %.7
}

declare void @Xz_Construct(ptr noundef) local_unnamed_addr #2

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

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { "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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = !{!"long long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !11, i64 24}
!10 = !{!"ILookInStream", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24}
!11 = !{!"any pointer", !7, i64 0}
!12 = !{!13, !6, i64 24}
!13 = !{!"", !14, i64 0, !15, i64 8, !11, i64 16, !6, i64 24}
!14 = !{!"short", !7, i64 0}
!15 = !{!"long", !7, i64 0}
!16 = !{!17, !15, i64 0}
!17 = !{!"", !15, i64 0, !15, i64 8, !11, i64 16}
!18 = !{!17, !15, i64 8}
!19 = !{!17, !11, i64 16}
!20 = !{!21, !11, i64 0}
!21 = !{!"ISzAlloc", !11, i64 0, !11, i64 8}
!22 = !{!21, !11, i64 8}
!23 = !{i64 0, i64 2, !24, i64 8, i64 8, !25, i64 16, i64 8, !26, i64 24, i64 8, !5}
!24 = !{!14, !14, i64 0}
!25 = !{!15, !15, i64 0}
!26 = !{!11, !11, i64 0}
!27 = !{!28, !11, i64 0}
!28 = !{!"ICompressProgress", !11, i64 0}


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