; LLVM IR from mncoppola/rpef :: utilities_src/squashfs2.1/lzma/C/7zip/Compress/LZMA (LZMADecoder)

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

%"class.NCompress::NLZMA::CState" = type { i8 }
%"class.NCompress::NLZMA::CDecoder" = type <{ %struct.ICompressCoder, %struct.ICompressSetDecoderProperties2, %class.CMyUnknownImp, [4 x i8], %class.CLZOutWindow, %"class.NCompress::NRangeCoder::CDecoder", [12 x [16 x %"class.NCompress::NRangeCoder::CBitDecoder"]], [12 x %"class.NCompress::NRangeCoder::CBitDecoder"], [12 x %"class.NCompress::NRangeCoder::CBitDecoder"], [12 x %"class.NCompress::NRangeCoder::CBitDecoder"], [12 x %"class.NCompress::NRangeCoder::CBitDecoder"], [12 x [16 x %"class.NCompress::NRangeCoder::CBitDecoder"]], [4 x %"class.NCompress::NRangeCoder::CBitTreeDecoder"], [114 x %"class.NCompress::NRangeCoder::CBitDecoder"], %"class.NCompress::NRangeCoder::CBitTreeDecoder.1", %"class.NCompress::NLZMA::NLength::CDecoder", %"class.NCompress::NLZMA::NLength::CDecoder", %"class.NCompress::NLZMA::CLiteralDecoder", i32, [4 x i32], %"class.NCompress::NLZMA::CState", [3 x i8], i32, [4 x i8], i64, i8, [7 x i8] }>
%struct.ICompressCoder = type { %struct.IUnknown }
%struct.IUnknown = type { ptr }
%struct.ICompressSetDecoderProperties2 = type { %struct.IUnknown }
%class.CMyUnknownImp = type { i32 }
%class.CLZOutWindow = type { %class.COutBuffer.base, [7 x i8] }
%class.COutBuffer.base = type <{ ptr, i32, i32, i32, i32, %class.CMyComPtr, i64, ptr, i8 }>
%class.CMyComPtr = type { ptr }
%"class.NCompress::NRangeCoder::CDecoder" = type { %class.CInBuffer, i32, i32 }
%class.CInBuffer = type <{ ptr, ptr, ptr, %class.CMyComPtr.0, i64, i32, i8, [3 x i8] }>
%class.CMyComPtr.0 = type { ptr }
%"class.NCompress::NRangeCoder::CBitDecoder" = type { %"class.NCompress::NRangeCoder::CBitModel" }
%"class.NCompress::NRangeCoder::CBitModel" = type { i32 }
%"class.NCompress::NRangeCoder::CBitTreeDecoder" = type { [64 x %"class.NCompress::NRangeCoder::CBitDecoder"] }
%"class.NCompress::NRangeCoder::CBitTreeDecoder.1" = type { [16 x %"class.NCompress::NRangeCoder::CBitDecoder"] }
%"class.NCompress::NLZMA::NLength::CDecoder" = type { %"class.NCompress::NRangeCoder::CBitDecoder", %"class.NCompress::NRangeCoder::CBitDecoder", [16 x %"class.NCompress::NRangeCoder::CBitTreeDecoder.2"], [16 x %"class.NCompress::NRangeCoder::CBitTreeDecoder.2"], %"class.NCompress::NRangeCoder::CBitTreeDecoder.3" }
%"class.NCompress::NRangeCoder::CBitTreeDecoder.2" = type { [8 x %"class.NCompress::NRangeCoder::CBitDecoder"] }
%"class.NCompress::NRangeCoder::CBitTreeDecoder.3" = type { [256 x %"class.NCompress::NRangeCoder::CBitDecoder"] }
%"class.NCompress::NLZMA::CLiteralDecoder" = type <{ ptr, i32, i32, i32, [4 x i8] }>

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN9NCompress5NLZMA8CDecoder4InitEv(ptr noundef nonnull align 8 dereferenceable(7585)) #0 align 2

; 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: mustprogress uwtable
define dso_local noundef i32 @_ZN9NCompress5NLZMA8CDecoder8CodeSpecEj(ptr noundef nonnull align 8 dereferenceable(7585) %0, i32 noundef %1) #0 align 2 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i64, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca %"class.NCompress::NLZMA::CState", align 1
  %12 = alloca i8, align 1
  %13 = alloca i64, align 8
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i32 %1, ptr %5, align 4, !tbaa !9
  %21 = load ptr, ptr %4, align 8
  %22 = getelementptr inbounds %"class.NCompress::NLZMA::CDecoder", ptr %21, i32 0, i32 25
  %23 = load i8, ptr %22, align 8, !tbaa !11, !range !32, !noundef !33
  %24 = trunc i8 %23 to i1
  br i1 %24, label %25, label %39

25:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  %26 = getelementptr inbounds %"class.NCompress::NLZMA::CDecoder", ptr %21, i32 0, i32 24
  %27 = load i64, ptr %26, align 8, !tbaa !34
  %28 = getelementptr inbounds %"class.NCompress::NLZMA::CDecoder", ptr %21, i32 0, i32 4
  %29 = call noundef i64 @_ZNK10COutBuffer16GetProcessedSizeEv(ptr noundef nonnull align 8 dereferenceable(49) %28)
  %30 = sub i64 %27, %29
  store i64 %30, ptr %6, align 8, !tbaa !35
  %31 = load i32, ptr %5, align 4, !tbaa !9
  %32 = zext i32 %31 to i64
  %33 = load i64, ptr %6, align 8, !tbaa !35
  %34 = icmp ugt i64 %32, %33
  br i1 %34, label %35, label %38

35:                                               ; preds = %25
  %36 = load i64, ptr %6, align 8, !tbaa !35
  %37 = trunc i64 %36 to i32
  store i32 %37, ptr %5, align 4, !tbaa !9
  br label %38

38:                                               ; preds = %35, %25
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  br label %39

39:                                               ; preds = %38, %2
  %40 = getelementptr inbounds %"class.NCompress::NLZMA::CDecoder", ptr %21, i32 0, i32 22
  %41 = load i32, ptr %40, align 8, !tbaa !36
  %42 = icmp eq i32 %41, -1
  br i1 %42, label %43, label %44

43:                                               ; preds = %39
  store i32 0, ptr %3, align 4
  br label %355

44:                                               ; preds = %39
  %45 = getelementptr inbounds %"class.NCompress::NLZMA::CDecoder", ptr %21, i32 0, i32 22
  %46 = load i32, ptr %45, align 8, !tbaa !36
  %47 = icmp eq i32 %46, -2
  br i1 %47, label %48, label %51

48:                                               ; preds = %44
  %49 = getelementptr inbounds %"class.NCompress::NLZMA::CDecoder", ptr %21, i32 0, i32 5
  call void @_ZN9NCompress11NRangeCoder8CDecoder4InitEv(ptr noundef nonnull align 8 dereferenceable(56) %49)
  call void @_ZN9NCompress5NLZMA8CDecoder4InitEv(ptr noundef nonnull align 8 dereferenceable(7585) %21)
  %50 = getelementptr inbounds %"class.NCompress::NLZMA::CDecoder", ptr %21, i32 0, i32 22
  store i32 0, ptr %50, align 8, !tbaa !36
  br label %51

51:                                               ; preds = %48, %44
  %52 = load i32, ptr %5, align 4, !tbaa !9
  %53 = icmp eq i32 %52, 0
  br i1 %53, label %54, label %55

54:                                               ; preds = %51
  store i32 0, ptr %3, align 4
  br label %355

55:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  %56 = getelementptr inbounds %"class.NCompress::NLZMA::CDecoder", ptr %21, i32 0, i32 19
  %57 = getelementptr inbounds [4 x i32], ptr %56, i64 0, i64 0
  %58 = load i32, ptr %57, align 4, !tbaa !9
  store i32 %58, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  %59 = getelementptr inbounds %"class.NCompress::NLZMA::CDecoder", ptr %21, i32 0, i32 19
  %60 = getelementptr inbounds [4 x i32], ptr %59, i64 0, i64 1
  %61 = load i32, ptr %60, align 4, !tbaa !9
  store i32 %61, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  %62 = getelementptr inbounds %"class.NCompress::NLZMA::CDecoder", ptr %21, i32 0, i32 19
  %63 = getelementptr inbounds [4 x i32], ptr %62, i64 0, i64 2
  %64 = load i32, ptr %63, align 4, !tbaa !9
  store i32 %64, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  %65 = getelementptr inbounds %"class.NCompress::NLZMA::CDecoder", ptr %21, i32 0, i32 19
  %66 = getelementptr inbounds [4 x i32], ptr %65, i64 0, i64 3
  %67 = load i32, ptr %66, align 4, !tbaa !9
  store i32 %67, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %11) #6
  %68 = getelementptr inbounds %"class.NCompress::NLZMA::CDecoder", ptr %21, i32 0, i32 20
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %11, ptr align 4 %68, i64 1, i1 false), !tbaa.struct !37
  call void @llvm.lifetime.start.p0(i64 1, ptr %12) #6
  br label %69

69:                                               ; preds = %78, %55
  %70 = getelementptr inbounds %"class.NCompress::NLZMA::CDecoder", ptr %21, i32 0, i32 22
  %71 = load i32, ptr %70, align 8, !tbaa !36
  %72 = icmp sgt i32 %71, 0
  br i1 %72, label %73, label %76

73:                                               ; preds = %69
  %74 = load i32, ptr %5, align 4, !tbaa !9
  %75 = icmp ugt i32 %74, 0
  br label %76

76:                                               ; preds = %73, %69
  %77 = phi i1 [ false, %69 ], [ %75, %73 ]
  br i1 %77, label %78, label %89

78:                                               ; preds = %76
  %79 = getelementptr inbounds %"class.NCompress::NLZMA::CDecoder", ptr %21, i32 0, i32 4
  %80 = load i32, ptr %7, align 4, !tbaa !9
  %81 = call noundef zeroext i8 @_ZNK12CLZOutWindow7GetByteEj(ptr noundef nonnull align 8 dereferenceable(49) %79, i32 noundef %80)
  store i8 %81, ptr %12, align 1, !tbaa !38
  %82 = getelementptr inbounds %"class.NCompress::NLZMA::CDecoder", ptr %21, i32 0, i32 4
  %83 = load i8, ptr %12, align 1, !tbaa !38
  call void @_ZN12CLZOutWindow7PutByteEh(ptr noundef nonnull align 8 dereferenceable(49) %82, i8 noundef zeroext %83)
  %84 = getelementptr inbounds %"class.NCompress::NLZMA::CDecoder", ptr %21, i32 0, i32 22
  %85 = load i32, ptr %84, align 8, !tbaa !36
  %86 = add nsw i32 %85, -1
  store i32 %86, ptr %84, align 8, !tbaa !36
  %87 = load i32, ptr %5, align 4, !tbaa !9
  %88 = add i32 %87, -1
  store i32 %88, ptr %5, align 4, !tbaa !9
  br label %69, !llvm.loop !39

89:                                               ; preds = %76
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  %90 = getelementptr inbounds %"class.NCompress::NLZMA::CDecoder", ptr %21, i32 0, i32 4
  %91 = call noundef i64 @_ZNK10COutBuffer16GetProcessedSizeEv(ptr noundef nonnull align 8 dereferenceable(49) %90)
  store i64 %91, ptr %13, align 8, !tbaa !35
  %92 = load i64, ptr %13, align 8, !tbaa !35
  %93 = icmp eq i64 %92, 0
  br i1 %93, label %94, label %95

94:                                               ; preds = %89
  store i8 0, ptr %12, align 1, !tbaa !38
  br label %98

95:                                               ; preds = %89
  %96 = getelementptr inbounds %"class.NCompress::NLZMA::CDecoder", ptr %21, i32 0, i32 4
  %97 = call noundef zeroext i8 @_ZNK12CLZOutWindow7GetByteEj(ptr noundef nonnull align 8 dereferenceable(49) %96, i32 noundef 0)
  store i8 %97, ptr %12, align 1, !tbaa !38
  br label %98

98:                                               ; preds = %95, %94
  br label %99

99:                                               ; preds = %334, %98
  %100 = load i32, ptr %5, align 4, !tbaa !9
  %101 = icmp ugt i32 %100, 0
  br i1 %101, label %102, label %335

102:                                              ; preds = %99
  %103 = getelementptr inbounds %"class.NCompress::NLZMA::CDecoder", ptr %21, i32 0, i32 5
  %104 = getelementptr inbounds %"class.NCompress::NRangeCoder::CDecoder", ptr %103, i32 0, i32 0
  %105 = call noundef zeroext i1 @_ZNK9CInBuffer11WasFinishedEv(ptr noundef nonnull align 8 dereferenceable(45) %104)
  br i1 %105, label %106, label %107

106:                                              ; preds = %102
  store i32 1, ptr %3, align 4
  store i32 1, ptr %14, align 4
  br label %354

107:                                              ; preds = %102
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  %108 = load i64, ptr %13, align 8, !tbaa !35
  %109 = trunc i64 %108 to i32
  %110 = getelementptr inbounds %"class.NCompress::NLZMA::CDecoder", ptr %21, i32 0, i32 18
  %111 = load i32, ptr %110, align 8, !tbaa !41
  %112 = and i32 %109, %111
  store i32 %112, ptr %15, align 4, !tbaa !9
  %113 = getelementptr inbounds %"class.NCompress::NLZMA::CDecoder", ptr %21, i32 0, i32 6
  %114 = getelementptr inbounds %"class.NCompress::NLZMA::CState", ptr %11, i32 0, i32 0
  %115 = load i8, ptr %114, align 1, !tbaa !42
  %116 = zext i8 %115 to i64
  %117 = getelementptr inbounds [12 x [16 x %"class.NCompress::NRangeCoder::CBitDecoder"]], ptr %113, i64 0, i64 %116
  %118 = load i32, ptr %15, align 4, !tbaa !9
  %119 = zext i32 %118 to i64
  %120 = getelementptr inbounds [16 x %"class.NCompress::NRangeCoder::CBitDecoder"], ptr %117, i64 0, i64 %119
  %121 = getelementptr inbounds %"class.NCompress::NLZMA::CDecoder", ptr %21, i32 0, i32 5
  %122 = call noundef i32 @_ZN9NCompress11NRangeCoder11CBitDecoderILi5EE6DecodeEPNS0_8CDecoderE(ptr noundef nonnull align 4 dereferenceable(4) %120, ptr noundef %121)
  %123 = icmp eq i32 %122, 0
  br i1 %123, label %124, label %150

124:                                              ; preds = %107
  %125 = call noundef zeroext i1 @_ZNK9NCompress5NLZMA6CState11IsCharStateEv(ptr noundef nonnull align 1 dereferenceable(1) %11)
  br i1 %125, label %136, label %126

126:                                              ; preds = %124
  %127 = getelementptr inbounds %"class.NCompress::NLZMA::CDecoder", ptr %21, i32 0, i32 17
  %128 = getelementptr inbounds %"class.NCompress::NLZMA::CDecoder", ptr %21, i32 0, i32 5
  %129 = load i64, ptr %13, align 8, !tbaa !35
  %130 = trunc i64 %129 to i32
  %131 = load i8, ptr %12, align 1, !tbaa !38
  %132 = getelementptr inbounds %"class.NCompress::NLZMA::CDecoder", ptr %21, i32 0, i32 4
  %133 = load i32, ptr %7, align 4, !tbaa !9
  %134 = call noundef zeroext i8 @_ZNK12CLZOutWindow7GetByteEj(ptr noundef nonnull align 8 dereferenceable(49) %132, i32 noundef %133)
  %135 = call noundef zeroext i8 @_ZN9NCompress5NLZMA15CLiteralDecoder19DecodeWithMatchByteEPNS_11NRangeCoder8CDecoderEjhh(ptr noundef nonnull align 8 dereferenceable(20) %127, ptr noundef %128, i32 noundef %130, i8 noundef zeroext %131, i8 noundef zeroext %134)
  store i8 %135, ptr %12, align 1, !tbaa !38
  br label %143

136:                                              ; preds = %124
  %137 = getelementptr inbounds %"class.NCompress::NLZMA::CDecoder", ptr %21, i32 0, i32 17
  %138 = getelementptr inbounds %"class.NCompress::NLZMA::CDecoder", ptr %21, i32 0, i32 5
  %139 = load i64, ptr %13, align 8, !tbaa !35
  %140 = trunc i64 %139 to i32
  %141 = load i8, ptr %12, align 1, !tbaa !38
  %142 = call noundef zeroext i8 @_ZN9NCompress5NLZMA15CLiteralDecoder12DecodeNormalEPNS_11NRangeCoder8CDecoderEjh(ptr noundef nonnull align 8 dereferenceable(20) %137, ptr noundef %138, i32 noundef %140, i8 noundef zeroext %141)
  store i8 %142, ptr %12, align 1, !tbaa !38
  br label %143

143:                                              ; preds = %136, %126
  %144 = getelementptr inbounds %"class.NCompress::NLZMA::CDecoder", ptr %21, i32 0, i32 4
  %145 = load i8, ptr %12, align 1, !tbaa !38
  call void @_ZN12CLZOutWindow7PutByteEh(ptr noundef nonnull align 8 dereferenceable(49) %144, i8 noundef zeroext %145)
  call void @_ZN9NCompress5NLZMA6CState10UpdateCharEv(ptr noundef nonnull align 1 dereferenceable(1) %11)
  %146 = load i32, ptr %5, align 4, !tbaa !9
  %147 = add i32 %146, -1
  store i32 %147, ptr %5, align 4, !tbaa !9
  %148 = load i64, ptr %13, align 8, !tbaa !35
  %149 = add i64 %148, 1
  store i64 %149, ptr %13, align 8, !tbaa !35
  br label %331

150:                                              ; preds = %107
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #6
  %151 = getelementptr inbounds %"class.NCompress::NLZMA::CDecoder", ptr %21, i32 0, i32 7
  %152 = getelementptr inbounds %"class.NCompress::NLZMA::CState", ptr %11, i32 0, i32 0
  %153 = load i8, ptr %152, align 1, !tbaa !42
  %154 = zext i8 %153 to i64
  %155 = getelementptr inbounds [12 x %"class.NCompress::NRangeCoder::CBitDecoder"], ptr %151, i64 0, i64 %154
  %156 = getelementptr inbounds %"class.NCompress::NLZMA::CDecoder", ptr %21, i32 0, i32 5
  %157 = call noundef i32 @_ZN9NCompress11NRangeCoder11CBitDecoderILi5EE6DecodeEPNS0_8CDecoderE(ptr noundef nonnull align 4 dereferenceable(4) %155, ptr noundef %156)
  %158 = icmp eq i32 %157, 1
  br i1 %158, label %159, label %222

159:                                              ; preds = %150
  store i32 0, ptr %16, align 4, !tbaa !9
  %160 = getelementptr inbounds %"class.NCompress::NLZMA::CDecoder", ptr %21, i32 0, i32 8
  %161 = getelementptr inbounds %"class.NCompress::NLZMA::CState", ptr %11, i32 0, i32 0
  %162 = load i8, ptr %161, align 1, !tbaa !42
  %163 = zext i8 %162 to i64
  %164 = getelementptr inbounds [12 x %"class.NCompress::NRangeCoder::CBitDecoder"], ptr %160, i64 0, i64 %163
  %165 = getelementptr inbounds %"class.NCompress::NLZMA::CDecoder", ptr %21, i32 0, i32 5
  %166 = call noundef i32 @_ZN9NCompress11NRangeCoder11CBitDecoderILi5EE6DecodeEPNS0_8CDecoderE(ptr noundef nonnull align 4 dereferenceable(4) %164, ptr noundef %165)
  %167 = icmp eq i32 %166, 0
  br i1 %167, label %168, label %182

168:                                              ; preds = %159
  %169 = getelementptr inbounds %"class.NCompress::NLZMA::CDecoder", ptr %21, i32 0, i32 11
  %170 = getelementptr inbounds %"class.NCompress::NLZMA::CState", ptr %11, i32 0, i32 0
  %171 = load i8, ptr %170, align 1, !tbaa !42
  %172 = zext i8 %171 to i64
  %173 = getelementptr inbounds [12 x [16 x %"class.NCompress::NRangeCoder::CBitDecoder"]], ptr %169, i64 0, i64 %172
  %174 = load i32, ptr %15, align 4, !tbaa !9
  %175 = zext i32 %174 to i64
  %176 = getelementptr inbounds [16 x %"class.NCompress::NRangeCoder::CBitDecoder"], ptr %173, i64 0, i64 %175
  %177 = getelementptr inbounds %"class.NCompress::NLZMA::CDecoder", ptr %21, i32 0, i32 5
  %178 = call noundef i32 @_ZN9NCompress11NRangeCoder11CBitDecoderILi5EE6DecodeEPNS0_8CDecoderE(ptr noundef nonnull align 4 dereferenceable(4) %176, ptr noundef %177)
  %179 = icmp eq i32 %178, 0
  br i1 %179, label %180, label %181

180:                                              ; preds = %168
  call void @_ZN9NCompress5NLZMA6CState14UpdateShortRepEv(ptr noundef nonnull align 1 dereferenceable(1) %11)
  store i32 1, ptr %16, align 4, !tbaa !9
  br label %181

181:                                              ; preds = %180, %168
  br label %212

182:                                              ; preds = %159
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #6
  %183 = getelementptr inbounds %"class.NCompress::NLZMA::CDecoder", ptr %21, i32 0, i32 9
  %184 = getelementptr inbounds %"class.NCompress::NLZMA::CState", ptr %11, i32 0, i32 0
  %185 = load i8, ptr %184, align 1, !tbaa !42
  %186 = zext i8 %185 to i64
  %187 = getelementptr inbounds [12 x %"class.NCompress::NRangeCoder::CBitDecoder"], ptr %183, i64 0, i64 %186
  %188 = getelementptr inbounds %"class.NCompress::NLZMA::CDecoder", ptr %21, i32 0, i32 5
  %189 = call noundef i32 @_ZN9NCompress11NRangeCoder11CBitDecoderILi5EE6DecodeEPNS0_8CDecoderE(ptr noundef nonnull align 4 dereferenceable(4) %187, ptr noundef %188)
  %190 = icmp eq i32 %189, 0
  br i1 %190, label %191, label %193

191:                                              ; preds = %182
  %192 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %192, ptr %17, align 4, !tbaa !9
  br label %209

193:                                              ; preds = %182
  %194 = getelementptr inbounds %"class.NCompress::NLZMA::CDecoder", ptr %21, i32 0, i32 10
  %195 = getelementptr inbounds %"class.NCompress::NLZMA::CState", ptr %11, i32 0, i32 0
  %196 = load i8, ptr %195, align 1, !tbaa !42
  %197 = zext i8 %196 to i64
  %198 = getelementptr inbounds [12 x %"class.NCompress::NRangeCoder::CBitDecoder"], ptr %194, i64 0, i64 %197
  %199 = getelementptr inbounds %"class.NCompress::NLZMA::CDecoder", ptr %21, i32 0, i32 5
  %200 = call noundef i32 @_ZN9NCompress11NRangeCoder11CBitDecoderILi5EE6DecodeEPNS0_8CDecoderE(ptr noundef nonnull align 4 dereferenceable(4) %198, ptr noundef %199)
  %201 = icmp eq i32 %200, 0
  br i1 %201, label %202, label %204

202:                                              ; preds = %193
  %203 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %203, ptr %17, align 4, !tbaa !9
  br label %207

204:                                              ; preds = %193
  %205 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %205, ptr %17, align 4, !tbaa !9
  %206 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %206, ptr %10, align 4, !tbaa !9
  br label %207

207:                                              ; preds = %204, %202
  %208 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %208, ptr %9, align 4, !tbaa !9
  br label %209

209:                                              ; preds = %207, %191
  %210 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %210, ptr %8, align 4, !tbaa !9
  %211 = load i32, ptr %17, align 4, !tbaa !9
  store i32 %211, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  br label %212

212:                                              ; preds = %209, %181
  %213 = load i32, ptr %16, align 4, !tbaa !9
  %214 = icmp eq i32 %213, 0
  br i1 %214, label %215, label %221

215:                                              ; preds = %212
  %216 = getelementptr inbounds %"class.NCompress::NLZMA::CDecoder", ptr %21, i32 0, i32 16
  %217 = getelementptr inbounds %"class.NCompress::NLZMA::CDecoder", ptr %21, i32 0, i32 5
  %218 = load i32, ptr %15, align 4, !tbaa !9
  %219 = call noundef i32 @_ZN9NCompress5NLZMA7NLength8CDecoder6DecodeEPNS_11NRangeCoder8CDecoderEj(ptr noundef nonnull align 4 dereferenceable(2056) %216, ptr noundef %217, i32 noundef %218)
  %220 = add i32 %219, 2
  store i32 %220, ptr %16, align 4, !tbaa !9
  call void @_ZN9NCompress5NLZMA6CState9UpdateRepEv(ptr noundef nonnull align 1 dereferenceable(1) %11)
  br label %221

221:                                              ; preds = %215, %212
  br label %295

222:                                              ; preds = %150
  %223 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %223, ptr %10, align 4, !tbaa !9
  %224 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %224, ptr %9, align 4, !tbaa !9
  %225 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %225, ptr %8, align 4, !tbaa !9
  %226 = getelementptr inbounds %"class.NCompress::NLZMA::CDecoder", ptr %21, i32 0, i32 15
  %227 = getelementptr inbounds %"class.NCompress::NLZMA::CDecoder", ptr %21, i32 0, i32 5
  %228 = load i32, ptr %15, align 4, !tbaa !9
  %229 = call noundef i32 @_ZN9NCompress5NLZMA7NLength8CDecoder6DecodeEPNS_11NRangeCoder8CDecoderEj(ptr noundef nonnull align 4 dereferenceable(2056) %226, ptr noundef %227, i32 noundef %228)
  %230 = add i32 2, %229
  store i32 %230, ptr %16, align 4, !tbaa !9
  call void @_ZN9NCompress5NLZMA6CState11UpdateMatchEv(ptr noundef nonnull align 1 dereferenceable(1) %11)
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #6
  %231 = getelementptr inbounds %"class.NCompress::NLZMA::CDecoder", ptr %21, i32 0, i32 12
  %232 = load i32, ptr %16, align 4, !tbaa !9
  %233 = call noundef i32 @_ZN9NCompress5NLZMA16GetLenToPosStateEj(i32 noundef %232)
  %234 = zext i32 %233 to i64
  %235 = getelementptr inbounds [4 x %"class.NCompress::NRangeCoder::CBitTreeDecoder"], ptr %231, i64 0, i64 %234
  %236 = getelementptr inbounds %"class.NCompress::NLZMA::CDecoder", ptr %21, i32 0, i32 5
  %237 = call noundef i32 @_ZN9NCompress11NRangeCoder15CBitTreeDecoderILi5ELi6EE6DecodeEPNS0_8CDecoderE(ptr noundef nonnull align 4 dereferenceable(256) %235, ptr noundef %236)
  store i32 %237, ptr %18, align 4, !tbaa !9
  %238 = load i32, ptr %18, align 4, !tbaa !9
  %239 = icmp uge i32 %238, 4
  br i1 %239, label %240, label %289

240:                                              ; preds = %222
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #6
  %241 = load i32, ptr %18, align 4, !tbaa !9
  %242 = lshr i32 %241, 1
  %243 = sub i32 %242, 1
  store i32 %243, ptr %19, align 4, !tbaa !9
  %244 = load i32, ptr %18, align 4, !tbaa !9
  %245 = and i32 %244, 1
  %246 = or i32 2, %245
  %247 = load i32, ptr %19, align 4, !tbaa !9
  %248 = shl i32 %246, %247
  store i32 %248, ptr %7, align 4, !tbaa !9
  %249 = load i32, ptr %18, align 4, !tbaa !9
  %250 = icmp ult i32 %249, 14
  br i1 %250, label %251, label %267

251:                                              ; preds = %240
  %252 = getelementptr inbounds %"class.NCompress::NLZMA::CDecoder", ptr %21, i32 0, i32 13
  %253 = getelementptr inbounds [114 x %"class.NCompress::NRangeCoder::CBitDecoder"], ptr %252, i64 0, i64 0
  %254 = load i32, ptr %7, align 4, !tbaa !9
  %255 = zext i32 %254 to i64
  %256 = getelementptr inbounds %"class.NCompress::NRangeCoder::CBitDecoder", ptr %253, i64 %255
  %257 = load i32, ptr %18, align 4, !tbaa !9
  %258 = zext i32 %257 to i64
  %259 = sub i64 0, %258
  %260 = getelementptr inbounds %"class.NCompress::NRangeCoder::CBitDecoder", ptr %256, i64 %259
  %261 = getelementptr inbounds %"class.NCompress::NRangeCoder::CBitDecoder", ptr %260, i64 -1
  %262 = getelementptr inbounds %"class.NCompress::NLZMA::CDecoder", ptr %21, i32 0, i32 5
  %263 = load i32, ptr %19, align 4, !tbaa !9
  %264 = call noundef i32 @_ZN9NCompress11NRangeCoder20ReverseBitTreeDecodeILi5EEEjPNS0_11CBitDecoderIXT_EEEPNS0_8CDecoderEi(ptr noundef %261, ptr noundef %262, i32 noundef %263)
  %265 = load i32, ptr %7, align 4, !tbaa !9
  %266 = add i32 %265, %264
  store i32 %266, ptr %7, align 4, !tbaa !9
  br label %285

267:                                              ; preds = %240
  %268 = getelementptr inbounds %"class.NCompress::NLZMA::CDecoder", ptr %21, i32 0, i32 5
  %269 = load i32, ptr %19, align 4, !tbaa !9
  %270 = sub i32 %269, 4
  %271 = call noundef i32 @_ZN9NCompress11NRangeCoder8CDecoder16DecodeDirectBitsEi(ptr noundef nonnull align 8 dereferenceable(56) %268, i32 noundef %270)
  %272 = shl i32 %271, 4
  %273 = load i32, ptr %7, align 4, !tbaa !9
  %274 = add i32 %273, %272
  store i32 %274, ptr %7, align 4, !tbaa !9
  %275 = getelementptr inbounds %"class.NCompress::NLZMA::CDecoder", ptr %21, i32 0, i32 14
  %276 = getelementptr inbounds %"class.NCompress::NLZMA::CDecoder", ptr %21, i32 0, i32 5
  %277 = call noundef i32 @_ZN9NCompress11NRangeCoder15CBitTreeDecoderILi5ELi4EE13ReverseDecodeEPNS0_8CDecoderE(ptr noundef nonnull align 4 dereferenceable(64) %275, ptr noundef %276)
  %278 = load i32, ptr %7, align 4, !tbaa !9
  %279 = add i32 %278, %277
  store i32 %279, ptr %7, align 4, !tbaa !9
  %280 = load i32, ptr %7, align 4, !tbaa !9
  %281 = icmp eq i32 %280, -1
  br i1 %281, label %282, label %284

282:                                              ; preds = %267
  %283 = getelementptr inbounds %"class.NCompress::NLZMA::CDecoder", ptr %21, i32 0, i32 22
  store i32 -1, ptr %283, align 8, !tbaa !36
  store i32 0, ptr %3, align 4
  store i32 1, ptr %14, align 4
  br label %286

284:                                              ; preds = %267
  br label %285

285:                                              ; preds = %284, %251
  store i32 0, ptr %14, align 4
  br label %286

286:                                              ; preds = %285, %282
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  %287 = load i32, ptr %14, align 4
  switch i32 %287, label %292 [
    i32 0, label %288
  ]

288:                                              ; preds = %286
  br label %291

289:                                              ; preds = %222
  %290 = load i32, ptr %18, align 4, !tbaa !9
  store i32 %290, ptr %7, align 4, !tbaa !9
  br label %291

291:                                              ; preds = %289, %288
  store i32 0, ptr %14, align 4
  br label %292

292:                                              ; preds = %291, %286
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #6
  %293 = load i32, ptr %14, align 4
  switch i32 %293, label %328 [
    i32 0, label %294
  ]

294:                                              ; preds = %292
  br label %295

295:                                              ; preds = %294, %221
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #6
  %296 = load i32, ptr %16, align 4, !tbaa !9
  store i32 %296, ptr %20, align 4, !tbaa !9
  %297 = load i32, ptr %16, align 4, !tbaa !9
  %298 = load i32, ptr %5, align 4, !tbaa !9
  %299 = icmp ugt i32 %297, %298
  br i1 %299, label %300, label %302

300:                                              ; preds = %295
  %301 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %301, ptr %20, align 4, !tbaa !9
  br label %302

302:                                              ; preds = %300, %295
  %303 = getelementptr inbounds %"class.NCompress::NLZMA::CDecoder", ptr %21, i32 0, i32 4
  %304 = load i32, ptr %7, align 4, !tbaa !9
  %305 = load i32, ptr %20, align 4, !tbaa !9
  %306 = call noundef zeroext i1 @_ZN12CLZOutWindow9CopyBlockEjj(ptr noundef nonnull align 8 dereferenceable(49) %303, i32 noundef %304, i32 noundef %305)
  br i1 %306, label %308, label %307

307:                                              ; preds = %302
  store i32 1, ptr %3, align 4
  store i32 1, ptr %14, align 4
  br label %327

308:                                              ; preds = %302
  %309 = getelementptr inbounds %"class.NCompress::NLZMA::CDecoder", ptr %21, i32 0, i32 4
  %310 = call noundef zeroext i8 @_ZNK12CLZOutWindow7GetByteEj(ptr noundef nonnull align 8 dereferenceable(49) %309, i32 noundef 0)
  store i8 %310, ptr %12, align 1, !tbaa !38
  %311 = load i32, ptr %20, align 4, !tbaa !9
  %312 = load i32, ptr %5, align 4, !tbaa !9
  %313 = sub i32 %312, %311
  store i32 %313, ptr %5, align 4, !tbaa !9
  %314 = load i32, ptr %20, align 4, !tbaa !9
  %315 = zext i32 %314 to i64
  %316 = load i64, ptr %13, align 8, !tbaa !35
  %317 = add i64 %316, %315
  store i64 %317, ptr %13, align 8, !tbaa !35
  %318 = load i32, ptr %20, align 4, !tbaa !9
  %319 = load i32, ptr %16, align 4, !tbaa !9
  %320 = sub i32 %319, %318
  store i32 %320, ptr %16, align 4, !tbaa !9
  %321 = load i32, ptr %16, align 4, !tbaa !9
  %322 = icmp ne i32 %321, 0
  br i1 %322, label %323, label %326

323:                                              ; preds = %308
  %324 = load i32, ptr %16, align 4, !tbaa !9
  %325 = getelementptr inbounds %"class.NCompress::NLZMA::CDecoder", ptr %21, i32 0, i32 22
  store i32 %324, ptr %325, align 8, !tbaa !36
  store i32 5, ptr %14, align 4
  br label %327

326:                                              ; preds = %308
  store i32 0, ptr %14, align 4
  br label %327

327:                                              ; preds = %326, %323, %307
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #6
  br label %328

328:                                              ; preds = %327, %292
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  %329 = load i32, ptr %14, align 4
  switch i32 %329, label %332 [
    i32 0, label %330
  ]

330:                                              ; preds = %328
  br label %331

331:                                              ; preds = %330, %143
  store i32 0, ptr %14, align 4
  br label %332

332:                                              ; preds = %331, %328
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  %333 = load i32, ptr %14, align 4
  switch i32 %333, label %354 [
    i32 0, label %334
    i32 5, label %335
  ]

334:                                              ; preds = %332
  br label %99, !llvm.loop !43

335:                                              ; preds = %332, %99
  %336 = getelementptr inbounds %"class.NCompress::NLZMA::CDecoder", ptr %21, i32 0, i32 5
  %337 = getelementptr inbounds %"class.NCompress::NRangeCoder::CDecoder", ptr %336, i32 0, i32 0
  %338 = call noundef zeroext i1 @_ZNK9CInBuffer11WasFinishedEv(ptr noundef nonnull align 8 dereferenceable(45) %337)
  br i1 %338, label %339, label %340

339:                                              ; preds = %335
  store i32 1, ptr %3, align 4
  store i32 1, ptr %14, align 4
  br label %354

340:                                              ; preds = %335
  %341 = load i32, ptr %7, align 4, !tbaa !9
  %342 = getelementptr inbounds %"class.NCompress::NLZMA::CDecoder", ptr %21, i32 0, i32 19
  %343 = getelementptr inbounds [4 x i32], ptr %342, i64 0, i64 0
  store i32 %341, ptr %343, align 4, !tbaa !9
  %344 = load i32, ptr %8, align 4, !tbaa !9
  %345 = getelementptr inbounds %"class.NCompress::NLZMA::CDecoder", ptr %21, i32 0, i32 19
  %346 = getelementptr inbounds [4 x i32], ptr %345, i64 0, i64 1
  store i32 %344, ptr %346, align 4, !tbaa !9
  %347 = load i32, ptr %9, align 4, !tbaa !9
  %348 = getelementptr inbounds %"class.NCompress::NLZMA::CDecoder", ptr %21, i32 0, i32 19
  %349 = getelementptr inbounds [4 x i32], ptr %348, i64 0, i64 2
  store i32 %347, ptr %349, align 4, !tbaa !9
  %350 = load i32, ptr %10, align 4, !tbaa !9
  %351 = getelementptr inbounds %"class.NCompress::NLZMA::CDecoder", ptr %21, i32 0, i32 19
  %352 = getelementptr inbounds [4 x i32], ptr %351, i64 0, i64 3
  store i32 %350, ptr %352, align 4, !tbaa !9
  %353 = getelementptr inbounds %"class.NCompress::NLZMA::CDecoder", ptr %21, i32 0, i32 20
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %353, ptr align 1 %11, i64 1, i1 false), !tbaa.struct !37
  store i32 0, ptr %3, align 4
  store i32 1, ptr %14, align 4
  br label %354

354:                                              ; preds = %340, %339, %332, %106
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  br label %355

355:                                              ; preds = %354, %54, %43
  %356 = load i32, ptr %3, align 4
  ret i32 %356
}

declare noundef i64 @_ZNK10COutBuffer16GetProcessedSizeEv(ptr noundef nonnull align 8 dereferenceable(49)) #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN9NCompress11NRangeCoder8CDecoder4InitEv(ptr noundef nonnull align 8 dereferenceable(56)) #0 align 2

; 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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i8 @_ZNK12CLZOutWindow7GetByteEj(ptr noundef nonnull align 8 dereferenceable(49), i32 noundef) #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN12CLZOutWindow7PutByteEh(ptr noundef nonnull align 8 dereferenceable(49), i8 noundef zeroext) #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK9CInBuffer11WasFinishedEv(ptr noundef nonnull align 8 dereferenceable(45)) #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN9NCompress11NRangeCoder11CBitDecoderILi5EE6DecodeEPNS0_8CDecoderE(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef) #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK9NCompress5NLZMA6CState11IsCharStateEv(ptr noundef nonnull align 1 dereferenceable(1)) #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i8 @_ZN9NCompress5NLZMA15CLiteralDecoder19DecodeWithMatchByteEPNS_11NRangeCoder8CDecoderEjhh(ptr noundef nonnull align 8 dereferenceable(20), ptr noundef, i32 noundef, i8 noundef zeroext, i8 noundef zeroext) #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i8 @_ZN9NCompress5NLZMA15CLiteralDecoder12DecodeNormalEPNS_11NRangeCoder8CDecoderEjh(ptr noundef nonnull align 8 dereferenceable(20), ptr noundef, i32 noundef, i8 noundef zeroext) #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN9NCompress5NLZMA6CState10UpdateCharEv(ptr noundef nonnull align 1 dereferenceable(1)) #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN9NCompress5NLZMA6CState14UpdateShortRepEv(ptr noundef nonnull align 1 dereferenceable(1)) #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN9NCompress5NLZMA7NLength8CDecoder6DecodeEPNS_11NRangeCoder8CDecoderEj(ptr noundef nonnull align 4 dereferenceable(2056), ptr noundef, i32 noundef) #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN9NCompress5NLZMA6CState9UpdateRepEv(ptr noundef nonnull align 1 dereferenceable(1)) #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN9NCompress5NLZMA6CState11UpdateMatchEv(ptr noundef nonnull align 1 dereferenceable(1)) #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN9NCompress5NLZMA16GetLenToPosStateEj(i32 noundef) #5

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN9NCompress11NRangeCoder15CBitTreeDecoderILi5ELi6EE6DecodeEPNS0_8CDecoderE(ptr noundef nonnull align 4 dereferenceable(256), ptr noundef) #0 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN9NCompress11NRangeCoder8CDecoder16DecodeDirectBitsEi(ptr noundef nonnull align 8 dereferenceable(56), i32 noundef) #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN9NCompress11NRangeCoder15CBitTreeDecoderILi5ELi4EE13ReverseDecodeEPNS0_8CDecoderE(ptr noundef nonnull align 4 dereferenceable(64), ptr noundef) #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN12CLZOutWindow9CopyBlockEjj(ptr noundef nonnull align 8 dereferenceable(49), i32 noundef, i32 noundef) #0 align 2

attributes #0 = { mustprogress 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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { mustprogress 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 #5 = { inlinehint mustprogress 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 #6 = { 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++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !21, i64 7584}
!12 = !{!"_ZTSN9NCompress5NLZMA8CDecoderE", !13, i64 0, !15, i64 8, !16, i64 16, !17, i64 24, !22, i64 80, !7, i64 136, !7, i64 904, !7, i64 952, !7, i64 1000, !7, i64 1048, !7, i64 1096, !7, i64 1864, !7, i64 2888, !25, i64 3344, !26, i64 3408, !26, i64 5464, !30, i64 7520, !10, i64 7544, !7, i64 7548, !31, i64 7564, !10, i64 7568, !20, i64 7576, !21, i64 7584}
!13 = !{!"_ZTS14ICompressCoder", !14, i64 0}
!14 = !{!"_ZTS8IUnknown"}
!15 = !{!"_ZTS30ICompressSetDecoderProperties2", !14, i64 0}
!16 = !{!"_ZTS13CMyUnknownImp", !10, i64 0}
!17 = !{!"_ZTS12CLZOutWindow", !18, i64 0}
!18 = !{!"_ZTS10COutBuffer", !6, i64 0, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !19, i64 24, !20, i64 32, !6, i64 40, !21, i64 48}
!19 = !{!"_ZTS9CMyComPtrI20ISequentialOutStreamE", !6, i64 0}
!20 = !{!"long long", !7, i64 0}
!21 = !{!"bool", !7, i64 0}
!22 = !{!"_ZTSN9NCompress11NRangeCoder8CDecoderE", !23, i64 0, !10, i64 48, !10, i64 52}
!23 = !{!"_ZTS9CInBuffer", !6, i64 0, !6, i64 8, !6, i64 16, !24, i64 24, !20, i64 32, !10, i64 40, !21, i64 44}
!24 = !{!"_ZTS9CMyComPtrI19ISequentialInStreamE", !6, i64 0}
!25 = !{!"_ZTSN9NCompress11NRangeCoder15CBitTreeDecoderILi5ELi4EEE", !7, i64 0}
!26 = !{!"_ZTSN9NCompress5NLZMA7NLength8CDecoderE", !27, i64 0, !27, i64 4, !7, i64 8, !7, i64 520, !29, i64 1032}
!27 = !{!"_ZTSN9NCompress11NRangeCoder11CBitDecoderILi5EEE", !28, i64 0}
!28 = !{!"_ZTSN9NCompress11NRangeCoder9CBitModelILi5EEE", !10, i64 0}
!29 = !{!"_ZTSN9NCompress11NRangeCoder15CBitTreeDecoderILi5ELi8EEE", !7, i64 0}
!30 = !{!"_ZTSN9NCompress5NLZMA15CLiteralDecoderE", !6, i64 0, !10, i64 8, !10, i64 12, !10, i64 16}
!31 = !{!"_ZTSN9NCompress5NLZMA6CStateE", !7, i64 0}
!32 = !{i8 0, i8 2}
!33 = !{}
!34 = !{!12, !20, i64 7576}
!35 = !{!20, !20, i64 0}
!36 = !{!12, !10, i64 7568}
!37 = !{i64 0, i64 1, !38}
!38 = !{!7, !7, i64 0}
!39 = distinct !{!39, !40}
!40 = !{!"llvm.loop.mustprogress"}
!41 = !{!12, !10, i64 7544}
!42 = !{!31, !7, i64 0}
!43 = distinct !{!43, !40}


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

%"class.NCompress::NLZMA::CState" = type { i8 }
%"class.NCompress::NRangeCoder::CBitDecoder" = type { %"class.NCompress::NRangeCoder::CBitModel" }
%"class.NCompress::NRangeCoder::CBitModel" = type { i32 }
%"class.NCompress::NRangeCoder::CBitTreeDecoder" = type { [64 x %"class.NCompress::NRangeCoder::CBitDecoder"] }

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN9NCompress5NLZMA8CDecoder4InitEv(ptr noundef nonnull align 8 dereferenceable(7585)) local_unnamed_addr #0 align 2

; 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: mustprogress uwtable
define dso_local noundef i32 @_ZN9NCompress5NLZMA8CDecoder8CodeSpecEj(ptr noundef nonnull align 8 dereferenceable(7585) %0, i32 noundef %1) local_unnamed_addr #0 align 2 {
  %3 = alloca %"class.NCompress::NLZMA::CState", align 1
  %4 = getelementptr inbounds i8, ptr %0, i64 7584
  %5 = load i8, ptr %4, align 8, !tbaa !5, !range !30, !noundef !31
  %6 = trunc nuw i8 %5 to i1
  br i1 %6, label %7, label %16

7:                                                ; preds = %2
  %8 = getelementptr inbounds i8, ptr %0, i64 7576
  %9 = load i64, ptr %8, align 8, !tbaa !32
  %10 = getelementptr inbounds i8, ptr %0, i64 24
  %11 = tail call noundef i64 @_ZNK10COutBuffer16GetProcessedSizeEv(ptr noundef nonnull align 8 dereferenceable(49) %10)
  %12 = sub i64 %9, %11
  %13 = zext i32 %1 to i64
  %14 = icmp ult i64 %12, %13
  %15 = trunc nuw i64 %12 to i32
  %spec.select = select i1 %14, i32 %15, i32 %1
  br label %16

16:                                               ; preds = %7, %2
  %.176 = phi i32 [ %spec.select, %7 ], [ %1, %2 ]
  %17 = getelementptr inbounds i8, ptr %0, i64 7568
  %18 = load i32, ptr %17, align 8, !tbaa !33
  switch i32 %18, label %21 [
    i32 -1, label %162
    i32 -2, label %19
  ]

19:                                               ; preds = %16
  %20 = getelementptr inbounds i8, ptr %0, i64 80
  tail call void @_ZN9NCompress11NRangeCoder8CDecoder4InitEv(ptr noundef nonnull align 8 dereferenceable(56) %20)
  tail call void @_ZN9NCompress5NLZMA8CDecoder4InitEv(ptr noundef nonnull align 8 dereferenceable(7585) %0)
  store i32 0, ptr %17, align 8, !tbaa !33
  br label %21

21:                                               ; preds = %16, %19
  %22 = phi i32 [ %18, %16 ], [ 0, %19 ]
  %23 = icmp eq i32 %.176, 0
  br i1 %23, label %162, label %24

24:                                               ; preds = %21
  %25 = getelementptr inbounds i8, ptr %0, i64 7548
  %26 = load i32, ptr %25, align 4, !tbaa !34
  %27 = getelementptr inbounds i8, ptr %0, i64 7552
  %28 = load i32, ptr %27, align 8, !tbaa !34
  %29 = getelementptr inbounds i8, ptr %0, i64 7556
  %30 = load i32, ptr %29, align 4, !tbaa !34
  %31 = getelementptr inbounds i8, ptr %0, i64 7560
  %32 = load i32, ptr %31, align 8, !tbaa !34
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %3) #6
  %33 = getelementptr inbounds i8, ptr %0, i64 7564
  %34 = load i8, ptr %33, align 4, !tbaa !35
  store i8 %34, ptr %3, align 1, !tbaa !35
  %35 = icmp sgt i32 %22, 0
  br i1 %35, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %24
  %36 = getelementptr inbounds i8, ptr %0, i64 24
  br label %37

37:                                               ; preds = %.lr.ph, %37
  %.277163 = phi i32 [ %.176, %.lr.ph ], [ %41, %37 ]
  %38 = tail call noundef zeroext i8 @_ZNK12CLZOutWindow7GetByteEj(ptr noundef nonnull align 8 dereferenceable(49) %36, i32 noundef %26)
  tail call void @_ZN12CLZOutWindow7PutByteEh(ptr noundef nonnull align 8 dereferenceable(49) %36, i8 noundef zeroext %38)
  %39 = load i32, ptr %17, align 8, !tbaa !33
  %40 = add nsw i32 %39, -1
  store i32 %40, ptr %17, align 8, !tbaa !33
  %41 = add i32 %.277163, -1
  %42 = icmp sgt i32 %39, 1
  %43 = icmp ne i32 %41, 0
  %44 = select i1 %42, i1 %43, i1 false
  br i1 %44, label %37, label %._crit_edge, !llvm.loop !36

._crit_edge:                                      ; preds = %37, %24
  %.277.lcssa = phi i32 [ %.176, %24 ], [ %41, %37 ]
  %45 = getelementptr inbounds i8, ptr %0, i64 24
  %46 = tail call noundef i64 @_ZNK10COutBuffer16GetProcessedSizeEv(ptr noundef nonnull align 8 dereferenceable(49) %45)
  %47 = icmp eq i64 %46, 0
  br i1 %47, label %50, label %48

48:                                               ; preds = %._crit_edge
  %49 = tail call noundef zeroext i8 @_ZNK12CLZOutWindow7GetByteEj(ptr noundef nonnull align 8 dereferenceable(49) %45, i32 noundef 0)
  br label %50

50:                                               ; preds = %._crit_edge, %48
  %.0108 = phi i8 [ %49, %48 ], [ 0, %._crit_edge ]
  %51 = getelementptr inbounds i8, ptr %0, i64 80
  %52 = getelementptr inbounds i8, ptr %0, i64 7544
  %53 = getelementptr inbounds i8, ptr %0, i64 136
  %54 = getelementptr inbounds i8, ptr %0, i64 904
  %55 = getelementptr inbounds i8, ptr %0, i64 3408
  %56 = getelementptr inbounds i8, ptr %0, i64 1864
  %57 = getelementptr inbounds i8, ptr %0, i64 3344
  %58 = getelementptr inbounds i8, ptr %0, i64 2888
  %59 = getelementptr inbounds i8, ptr %0, i64 952
  %60 = getelementptr inbounds i8, ptr %0, i64 1000
  %61 = getelementptr inbounds i8, ptr %0, i64 1048
  %62 = getelementptr inbounds i8, ptr %0, i64 1096
  %63 = getelementptr inbounds i8, ptr %0, i64 5464
  %64 = getelementptr inbounds i8, ptr %0, i64 7520
  %.not208 = icmp eq i32 %.277.lcssa, 0
  br i1 %.not208, label %.loopexit183, label %.lr.ph217

.lr.ph217:                                        ; preds = %50, %158
  %.378215 = phi i32 [ %.782, %158 ], [ %.277.lcssa, %50 ]
  %.087214 = phi i32 [ %.996, %158 ], [ %26, %50 ]
  %.0103213 = phi i64 [ %.4107, %158 ], [ %46, %50 ]
  %.1109212 = phi i8 [ %.6114, %158 ], [ %.0108, %50 ]
  %.0115211 = phi i32 [ %.7122, %158 ], [ %32, %50 ]
  %.0124210 = phi i32 [ %.6130, %158 ], [ %30, %50 ]
  %.0132209 = phi i32 [ %.5137, %158 ], [ %28, %50 ]
  %65 = call noundef zeroext i1 @_ZNK9CInBuffer11WasFinishedEv(ptr noundef nonnull align 8 dereferenceable(45) %51)
  br i1 %65, label %.loopexit, label %66

66:                                               ; preds = %.lr.ph217
  %67 = trunc i64 %.0103213 to i32
  %68 = load i32, ptr %52, align 8, !tbaa !38
  %69 = and i32 %68, %67
  %70 = load i8, ptr %3, align 1, !tbaa !39
  %71 = zext i8 %70 to i64
  %72 = zext i32 %69 to i64
  %73 = getelementptr inbounds [12 x [16 x %"class.NCompress::NRangeCoder::CBitDecoder"]], ptr %53, i64 0, i64 %71, i64 %72
  %74 = call noundef i32 @_ZN9NCompress11NRangeCoder11CBitDecoderILi5EE6DecodeEPNS0_8CDecoderE(ptr noundef nonnull align 4 dereferenceable(4) %73, ptr noundef nonnull %51)
  %75 = icmp eq i32 %74, 0
  br i1 %75, label %76, label %86

76:                                               ; preds = %66
  %77 = call noundef zeroext i1 @_ZNK9NCompress5NLZMA6CState11IsCharStateEv(ptr noundef nonnull align 1 dereferenceable(1) %3)
  br i1 %77, label %81, label %78

78:                                               ; preds = %76
  %79 = call noundef zeroext i8 @_ZNK12CLZOutWindow7GetByteEj(ptr noundef nonnull align 8 dereferenceable(49) %45, i32 noundef %.087214)
  %80 = call noundef zeroext i8 @_ZN9NCompress5NLZMA15CLiteralDecoder19DecodeWithMatchByteEPNS_11NRangeCoder8CDecoderEjhh(ptr noundef nonnull align 8 dereferenceable(20) %64, ptr noundef nonnull %51, i32 noundef %67, i8 noundef zeroext %.1109212, i8 noundef zeroext %79)
  br label %83

81:                                               ; preds = %76
  %82 = call noundef zeroext i8 @_ZN9NCompress5NLZMA15CLiteralDecoder12DecodeNormalEPNS_11NRangeCoder8CDecoderEjh(ptr noundef nonnull align 8 dereferenceable(20) %64, ptr noundef nonnull %51, i32 noundef %67, i8 noundef zeroext %.1109212)
  br label %83

83:                                               ; preds = %81, %78
  %.2110 = phi i8 [ %82, %81 ], [ %80, %78 ]
  call void @_ZN12CLZOutWindow7PutByteEh(ptr noundef nonnull align 8 dereferenceable(49) %45, i8 noundef zeroext %.2110)
  call void @_ZN9NCompress5NLZMA6CState10UpdateCharEv(ptr noundef nonnull align 1 dereferenceable(1) %3)
  %84 = add i32 %.378215, -1
  %85 = add i64 %.0103213, 1
  br label %158

86:                                               ; preds = %66
  %87 = load i8, ptr %3, align 1, !tbaa !39
  %88 = zext i8 %87 to i64
  %89 = getelementptr inbounds [12 x %"class.NCompress::NRangeCoder::CBitDecoder"], ptr %54, i64 0, i64 %88
  %90 = call noundef i32 @_ZN9NCompress11NRangeCoder11CBitDecoderILi5EE6DecodeEPNS0_8CDecoderE(ptr noundef nonnull align 4 dereferenceable(4) %89, ptr noundef nonnull %51)
  %91 = icmp eq i32 %90, 1
  br i1 %91, label %92, label %118

92:                                               ; preds = %86
  %93 = load i8, ptr %3, align 1, !tbaa !39
  %94 = zext i8 %93 to i64
  %95 = getelementptr inbounds [12 x %"class.NCompress::NRangeCoder::CBitDecoder"], ptr %59, i64 0, i64 %94
  %96 = call noundef i32 @_ZN9NCompress11NRangeCoder11CBitDecoderILi5EE6DecodeEPNS0_8CDecoderE(ptr noundef nonnull align 4 dereferenceable(4) %95, ptr noundef nonnull %51)
  %97 = icmp eq i32 %96, 0
  %98 = load i8, ptr %3, align 1, !tbaa !39
  %99 = zext i8 %98 to i64
  br i1 %97, label %100, label %104

100:                                              ; preds = %92
  %101 = getelementptr inbounds [12 x [16 x %"class.NCompress::NRangeCoder::CBitDecoder"]], ptr %62, i64 0, i64 %99, i64 %72
  %102 = call noundef i32 @_ZN9NCompress11NRangeCoder11CBitDecoderILi5EE6DecodeEPNS0_8CDecoderE(ptr noundef nonnull align 4 dereferenceable(4) %101, ptr noundef nonnull %51)
  %103 = icmp eq i32 %102, 0
  br i1 %103, label %114, label %115

104:                                              ; preds = %92
  %105 = getelementptr inbounds [12 x %"class.NCompress::NRangeCoder::CBitDecoder"], ptr %60, i64 0, i64 %99
  %106 = call noundef i32 @_ZN9NCompress11NRangeCoder11CBitDecoderILi5EE6DecodeEPNS0_8CDecoderE(ptr noundef nonnull align 4 dereferenceable(4) %105, ptr noundef nonnull %51)
  %107 = icmp eq i32 %106, 0
  br i1 %107, label %115, label %108

108:                                              ; preds = %104
  %109 = load i8, ptr %3, align 1, !tbaa !39
  %110 = zext i8 %109 to i64
  %111 = getelementptr inbounds [12 x %"class.NCompress::NRangeCoder::CBitDecoder"], ptr %61, i64 0, i64 %110
  %112 = call noundef i32 @_ZN9NCompress11NRangeCoder11CBitDecoderILi5EE6DecodeEPNS0_8CDecoderE(ptr noundef nonnull align 4 dereferenceable(4) %111, ptr noundef nonnull %51)
  %113 = icmp eq i32 %112, 0
  %.0115..0124 = select i1 %113, i32 %.0115211, i32 %.0124210
  %.0124..0115 = select i1 %113, i32 %.0124210, i32 %.0115211
  br label %115

114:                                              ; preds = %100
  call void @_ZN9NCompress5NLZMA6CState14UpdateShortRepEv(ptr noundef nonnull align 1 dereferenceable(1) %3)
  br label %.thread159

115:                                              ; preds = %100, %104, %108
  %.1133.ph = phi i32 [ %.087214, %108 ], [ %.087214, %104 ], [ %.0132209, %100 ]
  %.2126.ph = phi i32 [ %.0132209, %108 ], [ %.0124210, %104 ], [ %.0124210, %100 ]
  %.3118.ph = phi i32 [ %.0115..0124, %108 ], [ %.0115211, %104 ], [ %.0115211, %100 ]
  %.188.ph = phi i32 [ %.0124..0115, %108 ], [ %.0132209, %104 ], [ %.087214, %100 ]
  %116 = call noundef i32 @_ZN9NCompress5NLZMA7NLength8CDecoder6DecodeEPNS_11NRangeCoder8CDecoderEj(ptr noundef nonnull align 4 dereferenceable(2056) %63, ptr noundef nonnull %51, i32 noundef %69)
  %117 = add i32 %116, 2
  call void @_ZN9NCompress5NLZMA6CState9UpdateRepEv(ptr noundef nonnull align 1 dereferenceable(1) %3)
  br label %.thread159

118:                                              ; preds = %86
  %119 = call noundef i32 @_ZN9NCompress5NLZMA7NLength8CDecoder6DecodeEPNS_11NRangeCoder8CDecoderEj(ptr noundef nonnull align 4 dereferenceable(2056) %55, ptr noundef nonnull %51, i32 noundef %69)
  %120 = add i32 %119, 2
  call void @_ZN9NCompress5NLZMA6CState11UpdateMatchEv(ptr noundef nonnull align 1 dereferenceable(1) %3)
  %121 = call noundef i32 @_ZN9NCompress5NLZMA16GetLenToPosStateEj(i32 noundef %120)
  %122 = zext i32 %121 to i64
  %123 = getelementptr inbounds [4 x %"class.NCompress::NRangeCoder::CBitTreeDecoder"], ptr %56, i64 0, i64 %122
  %124 = call noundef i32 @_ZN9NCompress11NRangeCoder15CBitTreeDecoderILi5ELi6EE6DecodeEPNS0_8CDecoderE(ptr noundef nonnull align 4 dereferenceable(256) %123, ptr noundef nonnull %51)
  %125 = icmp ugt i32 %124, 3
  br i1 %125, label %126, label %.thread159

126:                                              ; preds = %118
  %127 = lshr i32 %124, 1
  %128 = add nsw i32 %127, -1
  %129 = and i32 %124, 1
  %130 = or disjoint i32 %129, 2
  %131 = shl i32 %130, %128
  %132 = icmp ult i32 %124, 14
  br i1 %132, label %133, label %142

133:                                              ; preds = %126
  %134 = zext i32 %131 to i64
  %135 = getelementptr inbounds %"class.NCompress::NRangeCoder::CBitDecoder", ptr %58, i64 %134
  %136 = zext nneg i32 %124 to i64
  %137 = sub nsw i64 0, %136
  %138 = getelementptr inbounds %"class.NCompress::NRangeCoder::CBitDecoder", ptr %135, i64 %137
  %139 = getelementptr inbounds i8, ptr %138, i64 -4
  %140 = call noundef i32 @_ZN9NCompress11NRangeCoder20ReverseBitTreeDecodeILi5EEEjPNS0_11CBitDecoderIXT_EEEPNS0_8CDecoderEi(ptr noundef nonnull %139, ptr noundef nonnull %51, i32 noundef %128)
  %141 = add i32 %140, %131
  br label %.thread159

142:                                              ; preds = %126
  %143 = add nsw i32 %127, -5
  %144 = call noundef i32 @_ZN9NCompress11NRangeCoder8CDecoder16DecodeDirectBitsEi(ptr noundef nonnull align 8 dereferenceable(56) %51, i32 noundef %143)
  %145 = shl i32 %144, 4
  %146 = add i32 %145, %131
  %147 = call noundef i32 @_ZN9NCompress11NRangeCoder15CBitTreeDecoderILi5ELi4EE13ReverseDecodeEPNS0_8CDecoderE(ptr noundef nonnull align 4 dereferenceable(64) %57, ptr noundef nonnull %51)
  %148 = add i32 %146, %147
  %149 = icmp eq i32 %148, -1
  br i1 %149, label %150, label %.thread159

150:                                              ; preds = %142
  store i32 -1, ptr %17, align 8, !tbaa !33
  br label %.loopexit

.thread159:                                       ; preds = %133, %142, %118, %114, %115
  %.2134 = phi i32 [ %.1133.ph, %115 ], [ %.0132209, %114 ], [ %.087214, %118 ], [ %.087214, %142 ], [ %.087214, %133 ]
  %.3127 = phi i32 [ %.2126.ph, %115 ], [ %.0124210, %114 ], [ %.0132209, %118 ], [ %.0132209, %142 ], [ %.0132209, %133 ]
  %.4119 = phi i32 [ %.3118.ph, %115 ], [ %.0115211, %114 ], [ %.0124210, %118 ], [ %.0124210, %142 ], [ %.0124210, %133 ]
  %.693 = phi i32 [ %.188.ph, %115 ], [ %.087214, %114 ], [ %124, %118 ], [ %148, %142 ], [ %141, %133 ]
  %.186 = phi i32 [ %117, %115 ], [ 1, %114 ], [ %120, %118 ], [ %120, %142 ], [ %120, %133 ]
  %spec.select147 = call i32 @llvm.umin.i32(i32 %.186, i32 %.378215)
  %151 = call noundef zeroext i1 @_ZN12CLZOutWindow9CopyBlockEjj(ptr noundef nonnull align 8 dereferenceable(49) %45, i32 noundef %.693, i32 noundef %spec.select147)
  br i1 %151, label %152, label %.loopexit

152:                                              ; preds = %.thread159
  %153 = call noundef zeroext i8 @_ZNK12CLZOutWindow7GetByteEj(ptr noundef nonnull align 8 dereferenceable(49) %45, i32 noundef 0)
  %154 = sub i32 %.378215, %spec.select147
  %155 = zext i32 %spec.select147 to i64
  %156 = add i64 %.0103213, %155
  %.not146.not = icmp ugt i32 %.186, %.378215
  br i1 %.not146.not, label %.thread173, label %158

.thread173:                                       ; preds = %152
  %157 = sub i32 %.186, %spec.select147
  store i32 %157, ptr %17, align 8, !tbaa !33
  br label %.loopexit183

158:                                              ; preds = %152, %83
  %.5137 = phi i32 [ %.0132209, %83 ], [ %.2134, %152 ]
  %.6130 = phi i32 [ %.0124210, %83 ], [ %.3127, %152 ]
  %.7122 = phi i32 [ %.0115211, %83 ], [ %.4119, %152 ]
  %.6114 = phi i8 [ %.2110, %83 ], [ %153, %152 ]
  %.4107 = phi i64 [ %85, %83 ], [ %156, %152 ]
  %.996 = phi i32 [ %.087214, %83 ], [ %.693, %152 ]
  %.782 = phi i32 [ %84, %83 ], [ %154, %152 ]
  %.not = icmp eq i32 %.782, 0
  br i1 %.not, label %.loopexit183, label %.lr.ph217

.loopexit183:                                     ; preds = %158, %50, %.thread173
  %.6138 = phi i32 [ %.2134, %.thread173 ], [ %28, %50 ], [ %.5137, %158 ]
  %.7131 = phi i32 [ %.3127, %.thread173 ], [ %30, %50 ], [ %.6130, %158 ]
  %.8123 = phi i32 [ %.4119, %.thread173 ], [ %32, %50 ], [ %.7122, %158 ]
  %.1097 = phi i32 [ %.693, %.thread173 ], [ %26, %50 ], [ %.996, %158 ]
  %159 = call noundef zeroext i1 @_ZNK9CInBuffer11WasFinishedEv(ptr noundef nonnull align 8 dereferenceable(45) %51)
  br i1 %159, label %.loopexit, label %160

160:                                              ; preds = %.loopexit183
  store i32 %.1097, ptr %25, align 4, !tbaa !34
  store i32 %.6138, ptr %27, align 8, !tbaa !34
  store i32 %.7131, ptr %29, align 4, !tbaa !34
  store i32 %.8123, ptr %31, align 8, !tbaa !34
  %161 = load i8, ptr %3, align 1, !tbaa !35
  store i8 %161, ptr %33, align 4, !tbaa !35
  br label %.loopexit

.loopexit:                                        ; preds = %.thread159, %.lr.ph217, %150, %.loopexit183, %160
  %.9 = phi i32 [ 0, %160 ], [ 1, %.loopexit183 ], [ 0, %150 ], [ 1, %.lr.ph217 ], [ 1, %.thread159 ]
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #6
  br label %162

162:                                              ; preds = %21, %16, %.loopexit
  %.10 = phi i32 [ %.9, %.loopexit ], [ 0, %16 ], [ 0, %21 ]
  ret i32 %.10
}

declare noundef i64 @_ZNK10COutBuffer16GetProcessedSizeEv(ptr noundef nonnull align 8 dereferenceable(49)) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN9NCompress11NRangeCoder8CDecoder4InitEv(ptr noundef nonnull align 8 dereferenceable(56)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i8 @_ZNK12CLZOutWindow7GetByteEj(ptr noundef nonnull align 8 dereferenceable(49), i32 noundef) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN12CLZOutWindow7PutByteEh(ptr noundef nonnull align 8 dereferenceable(49), i8 noundef zeroext) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK9CInBuffer11WasFinishedEv(ptr noundef nonnull align 8 dereferenceable(45)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN9NCompress11NRangeCoder11CBitDecoderILi5EE6DecodeEPNS0_8CDecoderE(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK9NCompress5NLZMA6CState11IsCharStateEv(ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i8 @_ZN9NCompress5NLZMA15CLiteralDecoder19DecodeWithMatchByteEPNS_11NRangeCoder8CDecoderEjhh(ptr noundef nonnull align 8 dereferenceable(20), ptr noundef, i32 noundef, i8 noundef zeroext, i8 noundef zeroext) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i8 @_ZN9NCompress5NLZMA15CLiteralDecoder12DecodeNormalEPNS_11NRangeCoder8CDecoderEjh(ptr noundef nonnull align 8 dereferenceable(20), ptr noundef, i32 noundef, i8 noundef zeroext) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN9NCompress5NLZMA6CState10UpdateCharEv(ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN9NCompress5NLZMA6CState14UpdateShortRepEv(ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN9NCompress5NLZMA7NLength8CDecoder6DecodeEPNS_11NRangeCoder8CDecoderEj(ptr noundef nonnull align 4 dereferenceable(2056), ptr noundef, i32 noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN9NCompress5NLZMA6CState9UpdateRepEv(ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN9NCompress5NLZMA6CState11UpdateMatchEv(ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN9NCompress5NLZMA16GetLenToPosStateEj(i32 noundef) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN9NCompress11NRangeCoder15CBitTreeDecoderILi5ELi6EE6DecodeEPNS0_8CDecoderE(ptr noundef nonnull align 4 dereferenceable(256), ptr noundef) local_unnamed_addr #0 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN9NCompress11NRangeCoder8CDecoder16DecodeDirectBitsEi(ptr noundef nonnull align 8 dereferenceable(56), i32 noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN9NCompress11NRangeCoder15CBitTreeDecoderILi5ELi4EE13ReverseDecodeEPNS0_8CDecoderE(ptr noundef nonnull align 4 dereferenceable(64), ptr noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN12CLZOutWindow9CopyBlockEjj(ptr noundef nonnull align 8 dereferenceable(49), i32 noundef, i32 noundef) local_unnamed_addr #0 align 2

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

attributes #0 = { mustprogress 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 = { mustprogress 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 #4 = { inlinehint mustprogress 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 #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { 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, !19, i64 7584}
!6 = !{!"_ZTSN9NCompress5NLZMA8CDecoderE", !7, i64 0, !9, i64 8, !10, i64 16, !14, i64 24, !20, i64 80, !12, i64 136, !12, i64 904, !12, i64 952, !12, i64 1000, !12, i64 1048, !12, i64 1096, !12, i64 1864, !12, i64 2888, !23, i64 3344, !24, i64 3408, !24, i64 5464, !28, i64 7520, !11, i64 7544, !12, i64 7548, !29, i64 7564, !11, i64 7568, !18, i64 7576, !19, i64 7584}
!7 = !{!"_ZTS14ICompressCoder", !8, i64 0}
!8 = !{!"_ZTS8IUnknown"}
!9 = !{!"_ZTS30ICompressSetDecoderProperties2", !8, i64 0}
!10 = !{!"_ZTS13CMyUnknownImp", !11, i64 0}
!11 = !{!"int", !12, i64 0}
!12 = !{!"omnipotent char", !13, i64 0}
!13 = !{!"Simple C++ TBAA"}
!14 = !{!"_ZTS12CLZOutWindow", !15, i64 0}
!15 = !{!"_ZTS10COutBuffer", !16, i64 0, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !17, i64 24, !18, i64 32, !16, i64 40, !19, i64 48}
!16 = !{!"any pointer", !12, i64 0}
!17 = !{!"_ZTS9CMyComPtrI20ISequentialOutStreamE", !16, i64 0}
!18 = !{!"long long", !12, i64 0}
!19 = !{!"bool", !12, i64 0}
!20 = !{!"_ZTSN9NCompress11NRangeCoder8CDecoderE", !21, i64 0, !11, i64 48, !11, i64 52}
!21 = !{!"_ZTS9CInBuffer", !16, i64 0, !16, i64 8, !16, i64 16, !22, i64 24, !18, i64 32, !11, i64 40, !19, i64 44}
!22 = !{!"_ZTS9CMyComPtrI19ISequentialInStreamE", !16, i64 0}
!23 = !{!"_ZTSN9NCompress11NRangeCoder15CBitTreeDecoderILi5ELi4EEE", !12, i64 0}
!24 = !{!"_ZTSN9NCompress5NLZMA7NLength8CDecoderE", !25, i64 0, !25, i64 4, !12, i64 8, !12, i64 520, !27, i64 1032}
!25 = !{!"_ZTSN9NCompress11NRangeCoder11CBitDecoderILi5EEE", !26, i64 0}
!26 = !{!"_ZTSN9NCompress11NRangeCoder9CBitModelILi5EEE", !11, i64 0}
!27 = !{!"_ZTSN9NCompress11NRangeCoder15CBitTreeDecoderILi5ELi8EEE", !12, i64 0}
!28 = !{!"_ZTSN9NCompress5NLZMA15CLiteralDecoderE", !16, i64 0, !11, i64 8, !11, i64 12, !11, i64 16}
!29 = !{!"_ZTSN9NCompress5NLZMA6CStateE", !12, i64 0}
!30 = !{i8 0, i8 2}
!31 = !{}
!32 = !{!6, !18, i64 7576}
!33 = !{!6, !11, i64 7568}
!34 = !{!11, !11, i64 0}
!35 = !{!12, !12, i64 0}
!36 = distinct !{!36, !37}
!37 = !{!"llvm.loop.mustprogress"}
!38 = !{!6, !11, i64 7544}
!39 = !{!29, !12, i64 0}


; Effective O3 passes: ADCEPass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass