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

; 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::CEncoder" = type <{ %struct.ICompressCoder, %struct.ICompressSetOutStream, %struct.ICompressSetCoderProperties, %struct.ICompressWriteCoderProperties, %"class.NCompress::NLZMA::CBaseState", %class.CMyUnknownImp, [4096 x %"struct.NCompress::NLZMA::COptimal"], %class.CMyComPtr.5, %"class.NCompress::NRangeCoder::CEncoder", [12 x [16 x %"class.NCompress::NRangeCoder::CBitEncoder"]], [12 x %"class.NCompress::NRangeCoder::CBitEncoder"], [12 x %"class.NCompress::NRangeCoder::CBitEncoder"], [12 x %"class.NCompress::NRangeCoder::CBitEncoder"], [12 x %"class.NCompress::NRangeCoder::CBitEncoder"], [12 x [16 x %"class.NCompress::NRangeCoder::CBitEncoder"]], [4 x %"class.NCompress::NRangeCoder::CBitTreeEncoder.7"], [114 x %"class.NCompress::NRangeCoder::CBitEncoder"], %"class.NCompress::NRangeCoder::CBitTreeEncoder.8", %"class.NCompress::NLZMA::NLength::CPriceTableEncoder", %"class.NCompress::NLZMA::NLength::CPriceTableEncoder", %"class.NCompress::NLZMA::CLiteralEncoder", [274 x i32], i8, i8, [2 x i8], i32, i32, i32, i32, i32, i8, [3 x i8], [4 x [64 x i32]], [4 x [128 x i32]], [16 x i32], i32, i32, i32, i32, i32, i32, i32, i32, i32, i64, i64, i8, [7 x i8], ptr, i32, i8, i8, [2 x i8] }>
%struct.ICompressCoder = type { %struct.IUnknown }
%struct.IUnknown = type { ptr }
%struct.ICompressSetOutStream = type { %struct.IUnknown }
%struct.ICompressSetCoderProperties = type { %struct.IUnknown }
%struct.ICompressWriteCoderProperties = type { %struct.IUnknown }
%"class.NCompress::NLZMA::CBaseState" = type { %"class.NCompress::NLZMA::CState", i8, [4 x i32] }
%"class.NCompress::NLZMA::CState" = type { i8 }
%class.CMyUnknownImp = type { i32 }
%"struct.NCompress::NLZMA::COptimal" = type { %"class.NCompress::NLZMA::CState", i8, i8, i32, i32, i32, i32, i32, [4 x i32] }
%class.CMyComPtr.5 = type { ptr }
%"class.NCompress::NRangeCoder::CEncoder" = type { i32, i8, i64, i32, [4 x i8], %class.COutBuffer }
%class.COutBuffer = type <{ ptr, i32, i32, i32, i32, %class.CMyComPtr.6, i64, ptr, i8, [7 x i8] }>
%class.CMyComPtr.6 = type { ptr }
%"class.NCompress::NRangeCoder::CBitEncoder" = type { %"class.NCompress::NRangeCoder::CBitModel" }
%"class.NCompress::NRangeCoder::CBitModel" = type { i32 }
%"class.NCompress::NRangeCoder::CBitTreeEncoder.7" = type { [64 x %"class.NCompress::NRangeCoder::CBitEncoder"] }
%"class.NCompress::NRangeCoder::CBitTreeEncoder.8" = type { [16 x %"class.NCompress::NRangeCoder::CBitEncoder"] }
%"class.NCompress::NLZMA::NLength::CPriceTableEncoder" = type { %"class.NCompress::NLZMA::NLength::CEncoder", [272 x [16 x i32]], i32, [16 x i32] }
%"class.NCompress::NLZMA::NLength::CEncoder" = type { %"class.NCompress::NRangeCoder::CBitEncoder", %"class.NCompress::NRangeCoder::CBitEncoder", [16 x %"class.NCompress::NRangeCoder::CBitTreeEncoder"], [16 x %"class.NCompress::NRangeCoder::CBitTreeEncoder"], %"class.NCompress::NRangeCoder::CBitTreeEncoder.4" }
%"class.NCompress::NRangeCoder::CBitTreeEncoder" = type { [8 x %"class.NCompress::NRangeCoder::CBitEncoder"] }
%"class.NCompress::NRangeCoder::CBitTreeEncoder.4" = type { [256 x %"class.NCompress::NRangeCoder::CBitEncoder"] }
%"class.NCompress::NLZMA::CLiteralEncoder" = type <{ ptr, i32, i32, i32, [4 x i8] }>

; 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: mustprogress uwtable
declare dso_local noundef i32 @_ZN9NCompress5NLZMA8CEncoder6CreateEv(ptr noundef nonnull align 8 dereferenceable(210678)) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN9NCompress5NLZMA8CEncoder4InitEv(ptr noundef nonnull align 8 dereferenceable(210678)) #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN9NCompress5NLZMA8CEncoder10SetStreamsEP19ISequentialInStreamP20ISequentialOutStreamPKyS7_(ptr noundef nonnull align 8 dereferenceable(210678) %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4) #1 align 2 {
  %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 i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = 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
  %16 = load ptr, ptr %7, align 8
  %17 = load ptr, ptr %8, align 8, !tbaa !5
  %18 = getelementptr inbounds %"class.NCompress::NLZMA::CEncoder", ptr %16, i32 0, i32 48
  store ptr %17, ptr %18, align 8, !tbaa !9
  %19 = getelementptr inbounds %"class.NCompress::NLZMA::CEncoder", ptr %16, i32 0, i32 46
  store i8 0, ptr %19, align 8, !tbaa !33
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #3
  %20 = call noundef i32 @_ZN9NCompress5NLZMA8CEncoder6CreateEv(ptr noundef nonnull align 8 dereferenceable(210678) %16)
  store i32 %20, ptr %12, align 4, !tbaa !34
  %21 = load i32, ptr %12, align 4, !tbaa !34
  %22 = icmp ne i32 %21, 0
  br i1 %22, label %23, label %25

23:                                               ; preds = %5
  %24 = load i32, ptr %12, align 4, !tbaa !34
  store i32 %24, ptr %6, align 4
  store i32 1, ptr %13, align 4
  br label %26

25:                                               ; preds = %5
  store i32 0, ptr %13, align 4
  br label %26

26:                                               ; preds = %25, %23
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #3
  %27 = load i32, ptr %13, align 4
  switch i32 %27, label %78 [
    i32 0, label %28
    i32 1, label %76
  ]

28:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #3
  %29 = load ptr, ptr %9, align 8, !tbaa !5
  %30 = load ptr, ptr %16, align 8, !tbaa !35
  %31 = getelementptr inbounds ptr, ptr %30, i64 7
  %32 = load ptr, ptr %31, align 8
  %33 = call noundef i32 %32(ptr noundef nonnull align 8 dereferenceable(210678) %16, ptr noundef %29)
  store i32 %33, ptr %14, align 4, !tbaa !34
  %34 = load i32, ptr %14, align 4, !tbaa !34
  %35 = icmp ne i32 %34, 0
  br i1 %35, label %36, label %38

36:                                               ; preds = %28
  %37 = load i32, ptr %14, align 4, !tbaa !34
  store i32 %37, ptr %6, align 4
  store i32 1, ptr %13, align 4
  br label %39

38:                                               ; preds = %28
  store i32 0, ptr %13, align 4
  br label %39

39:                                               ; preds = %38, %36
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #3
  %40 = load i32, ptr %13, align 4
  switch i32 %40, label %78 [
    i32 0, label %41
    i32 1, label %76
  ]

41:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #3
  %42 = call noundef i32 @_ZN9NCompress5NLZMA8CEncoder4InitEv(ptr noundef nonnull align 8 dereferenceable(210678) %16)
  store i32 %42, ptr %15, align 4, !tbaa !34
  %43 = load i32, ptr %15, align 4, !tbaa !34
  %44 = icmp ne i32 %43, 0
  br i1 %44, label %45, label %47

45:                                               ; preds = %41
  %46 = load i32, ptr %15, align 4, !tbaa !34
  store i32 %46, ptr %6, align 4
  store i32 1, ptr %13, align 4
  br label %48

47:                                               ; preds = %41
  store i32 0, ptr %13, align 4
  br label %48

48:                                               ; preds = %47, %45
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #3
  %49 = load i32, ptr %13, align 4
  switch i32 %49, label %78 [
    i32 0, label %50
    i32 1, label %76
  ]

50:                                               ; preds = %48
  %51 = getelementptr inbounds %"class.NCompress::NLZMA::CEncoder", ptr %16, i32 0, i32 22
  %52 = load i8, ptr %51, align 8, !tbaa !37, !range !38, !noundef !39
  %53 = trunc i8 %52 to i1
  br i1 %53, label %55, label %54

54:                                               ; preds = %50
  call void @_ZN9NCompress5NLZMA8CEncoder17FillPosSlotPricesEv(ptr noundef nonnull align 8 dereferenceable(210678) %16)
  call void @_ZN9NCompress5NLZMA8CEncoder19FillDistancesPricesEv(ptr noundef nonnull align 8 dereferenceable(210678) %16)
  call void @_ZN9NCompress5NLZMA8CEncoder15FillAlignPricesEv(ptr noundef nonnull align 8 dereferenceable(210678) %16)
  br label %55

55:                                               ; preds = %54, %50
  %56 = getelementptr inbounds %"class.NCompress::NLZMA::CEncoder", ptr %16, i32 0, i32 18
  %57 = getelementptr inbounds %"class.NCompress::NLZMA::CEncoder", ptr %16, i32 0, i32 25
  %58 = load i32, ptr %57, align 4, !tbaa !40
  %59 = add i32 %58, 1
  %60 = sub i32 %59, 2
  call void @_ZN9NCompress5NLZMA7NLength18CPriceTableEncoder12SetTableSizeEj(ptr noundef nonnull align 4 dereferenceable(19532) %56, i32 noundef %60)
  %61 = getelementptr inbounds %"class.NCompress::NLZMA::CEncoder", ptr %16, i32 0, i32 18
  %62 = getelementptr inbounds %"class.NCompress::NLZMA::CEncoder", ptr %16, i32 0, i32 37
  %63 = load i32, ptr %62, align 4, !tbaa !41
  %64 = shl i32 1, %63
  call void @_ZN9NCompress5NLZMA7NLength18CPriceTableEncoder12UpdateTablesEj(ptr noundef nonnull align 4 dereferenceable(19532) %61, i32 noundef %64)
  %65 = getelementptr inbounds %"class.NCompress::NLZMA::CEncoder", ptr %16, i32 0, i32 19
  %66 = getelementptr inbounds %"class.NCompress::NLZMA::CEncoder", ptr %16, i32 0, i32 25
  %67 = load i32, ptr %66, align 4, !tbaa !40
  %68 = add i32 %67, 1
  %69 = sub i32 %68, 2
  call void @_ZN9NCompress5NLZMA7NLength18CPriceTableEncoder12SetTableSizeEj(ptr noundef nonnull align 4 dereferenceable(19532) %65, i32 noundef %69)
  %70 = getelementptr inbounds %"class.NCompress::NLZMA::CEncoder", ptr %16, i32 0, i32 19
  %71 = getelementptr inbounds %"class.NCompress::NLZMA::CEncoder", ptr %16, i32 0, i32 37
  %72 = load i32, ptr %71, align 4, !tbaa !41
  %73 = shl i32 1, %72
  call void @_ZN9NCompress5NLZMA7NLength18CPriceTableEncoder12UpdateTablesEj(ptr noundef nonnull align 4 dereferenceable(19532) %70, i32 noundef %73)
  %74 = getelementptr inbounds %"class.NCompress::NLZMA::CEncoder", ptr %16, i32 0, i32 44
  store i64 0, ptr %74, align 8, !tbaa !42
  %75 = getelementptr inbounds %"class.NCompress::NLZMA::CEncoder", ptr %16, i32 0, i32 45
  store i64 0, ptr %75, align 8, !tbaa !43
  store i32 0, ptr %6, align 4
  br label %76

76:                                               ; preds = %55, %48, %39, %26
  %77 = load i32, ptr %6, align 4
  ret i32 %77

78:                                               ; preds = %48, %39, %26
  unreachable
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN9NCompress5NLZMA8CEncoder17FillPosSlotPricesEv(ptr noundef nonnull align 8 dereferenceable(210678)) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN9NCompress5NLZMA8CEncoder19FillDistancesPricesEv(ptr noundef nonnull align 8 dereferenceable(210678)) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN9NCompress5NLZMA8CEncoder15FillAlignPricesEv(ptr noundef nonnull align 8 dereferenceable(210678)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN9NCompress5NLZMA7NLength18CPriceTableEncoder12SetTableSizeEj(ptr noundef nonnull align 4 dereferenceable(19532), i32 noundef) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN9NCompress5NLZMA7NLength18CPriceTableEncoder12UpdateTablesEj(ptr noundef nonnull align 4 dereferenceable(19532), i32 noundef) #1 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #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++ TBAA"}
!9 = !{!10, !6, i64 210664}
!10 = !{!"_ZTSN9NCompress5NLZMA8CEncoderE", !11, i64 0, !13, i64 8, !14, i64 16, !15, i64 24, !16, i64 32, !18, i64 52, !7, i64 56, !20, i64 163896, !21, i64 163904, !7, i64 163984, !7, i64 164752, !7, i64 164800, !7, i64 164848, !7, i64 164896, !7, i64 164944, !7, i64 165712, !7, i64 166736, !26, i64 167192, !27, i64 167256, !27, i64 186788, !32, i64 206320, !7, i64 206344, !25, i64 207440, !25, i64 207441, !19, i64 207444, !19, i64 207448, !19, i64 207452, !19, i64 207456, !19, i64 207460, !25, i64 207464, !7, i64 207468, !7, i64 208492, !7, i64 210540, !19, i64 210604, !19, i64 210608, !19, i64 210612, !19, i64 210616, !19, i64 210620, !19, i64 210624, !19, i64 210628, !19, i64 210632, !19, i64 210636, !22, i64 210640, !22, i64 210648, !25, i64 210656, !6, i64 210664, !19, i64 210672, !25, i64 210676, !25, i64 210677}
!11 = !{!"_ZTS14ICompressCoder", !12, i64 0}
!12 = !{!"_ZTS8IUnknown"}
!13 = !{!"_ZTS21ICompressSetOutStream", !12, i64 0}
!14 = !{!"_ZTS27ICompressSetCoderProperties", !12, i64 0}
!15 = !{!"_ZTS29ICompressWriteCoderProperties", !12, i64 0}
!16 = !{!"_ZTSN9NCompress5NLZMA10CBaseStateE", !17, i64 0, !7, i64 1, !7, i64 4}
!17 = !{!"_ZTSN9NCompress5NLZMA6CStateE", !7, i64 0}
!18 = !{!"_ZTS13CMyUnknownImp", !19, i64 0}
!19 = !{!"int", !7, i64 0}
!20 = !{!"_ZTS9CMyComPtrI12IMatchFinderE", !6, i64 0}
!21 = !{!"_ZTSN9NCompress11NRangeCoder8CEncoderE", !19, i64 0, !7, i64 4, !22, i64 8, !19, i64 16, !23, i64 24}
!22 = !{!"long long", !7, i64 0}
!23 = !{!"_ZTS10COutBuffer", !6, i64 0, !19, i64 8, !19, i64 12, !19, i64 16, !19, i64 20, !24, i64 24, !22, i64 32, !6, i64 40, !25, i64 48}
!24 = !{!"_ZTS9CMyComPtrI20ISequentialOutStreamE", !6, i64 0}
!25 = !{!"bool", !7, i64 0}
!26 = !{!"_ZTSN9NCompress11NRangeCoder15CBitTreeEncoderILi5ELi4EEE", !7, i64 0}
!27 = !{!"_ZTSN9NCompress5NLZMA7NLength18CPriceTableEncoderE", !28, i64 0, !7, i64 2056, !19, i64 19464, !7, i64 19468}
!28 = !{!"_ZTSN9NCompress5NLZMA7NLength8CEncoderE", !29, i64 0, !29, i64 4, !7, i64 8, !7, i64 520, !31, i64 1032}
!29 = !{!"_ZTSN9NCompress11NRangeCoder11CBitEncoderILi5EEE", !30, i64 0}
!30 = !{!"_ZTSN9NCompress11NRangeCoder9CBitModelILi5EEE", !19, i64 0}
!31 = !{!"_ZTSN9NCompress11NRangeCoder15CBitTreeEncoderILi5ELi8EEE", !7, i64 0}
!32 = !{!"_ZTSN9NCompress5NLZMA15CLiteralEncoderE", !6, i64 0, !19, i64 8, !19, i64 12, !19, i64 16}
!33 = !{!10, !25, i64 210656}
!34 = !{!19, !19, i64 0}
!35 = !{!36, !36, i64 0}
!36 = !{!"vtable pointer", !8, i64 0}
!37 = !{!10, !25, i64 207440}
!38 = !{i8 0, i8 2}
!39 = !{}
!40 = !{!10, !19, i64 207444}
!41 = !{!10, !19, i64 210612}
!42 = !{!10, !22, i64 210640}
!43 = !{!10, !22, i64 210648}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN9NCompress5NLZMA8CEncoder10SetStreamsEP19ISequentialInStreamP20ISequentialOutStreamPKyS7_(ptr noundef nonnull align 8 dereferenceable(210678) %0, ptr noundef %1, ptr noundef %2, ptr nocapture noundef readnone %3, ptr nocapture noundef readnone %4) local_unnamed_addr #0 align 2 {
  %6 = getelementptr inbounds i8, ptr %0, i64 210664
  store ptr %1, ptr %6, align 8, !tbaa !5
  %7 = getelementptr inbounds i8, ptr %0, i64 210656
  store i8 0, ptr %7, align 8, !tbaa !32
  %8 = tail call noundef i32 @_ZN9NCompress5NLZMA8CEncoder6CreateEv(ptr noundef nonnull align 8 dereferenceable(210678) %0)
  %.not.not = icmp eq i32 %8, 0
  br i1 %.not.not, label %9, label %35

9:                                                ; preds = %5
  %10 = load ptr, ptr %0, align 8, !tbaa !33
  %11 = getelementptr inbounds i8, ptr %10, i64 56
  %12 = load ptr, ptr %11, align 8
  %13 = tail call noundef i32 %12(ptr noundef nonnull align 8 dereferenceable(210678) %0, ptr noundef %2)
  %.not16.not = icmp eq i32 %13, 0
  br i1 %.not16.not, label %14, label %35

14:                                               ; preds = %9
  %15 = tail call noundef i32 @_ZN9NCompress5NLZMA8CEncoder4InitEv(ptr noundef nonnull align 8 dereferenceable(210678) %0)
  %.not17.not = icmp eq i32 %15, 0
  br i1 %.not17.not, label %16, label %35

16:                                               ; preds = %14
  %17 = getelementptr inbounds i8, ptr %0, i64 207440
  %18 = load i8, ptr %17, align 8, !tbaa !35, !range !36, !noundef !37
  %19 = trunc nuw i8 %18 to i1
  br i1 %19, label %21, label %20

20:                                               ; preds = %16
  tail call void @_ZN9NCompress5NLZMA8CEncoder17FillPosSlotPricesEv(ptr noundef nonnull align 8 dereferenceable(210678) %0)
  tail call void @_ZN9NCompress5NLZMA8CEncoder19FillDistancesPricesEv(ptr noundef nonnull align 8 dereferenceable(210678) %0)
  tail call void @_ZN9NCompress5NLZMA8CEncoder15FillAlignPricesEv(ptr noundef nonnull align 8 dereferenceable(210678) %0)
  br label %21

21:                                               ; preds = %20, %16
  %22 = getelementptr inbounds i8, ptr %0, i64 167256
  %23 = getelementptr inbounds i8, ptr %0, i64 207444
  %24 = load i32, ptr %23, align 4, !tbaa !38
  %25 = add i32 %24, -1
  tail call void @_ZN9NCompress5NLZMA7NLength18CPriceTableEncoder12SetTableSizeEj(ptr noundef nonnull align 4 dereferenceable(19532) %22, i32 noundef %25)
  %26 = getelementptr inbounds i8, ptr %0, i64 210612
  %27 = load i32, ptr %26, align 4, !tbaa !39
  %28 = shl nuw i32 1, %27
  tail call void @_ZN9NCompress5NLZMA7NLength18CPriceTableEncoder12UpdateTablesEj(ptr noundef nonnull align 4 dereferenceable(19532) %22, i32 noundef %28)
  %29 = getelementptr inbounds i8, ptr %0, i64 186788
  %30 = load i32, ptr %23, align 4, !tbaa !38
  %31 = add i32 %30, -1
  tail call void @_ZN9NCompress5NLZMA7NLength18CPriceTableEncoder12SetTableSizeEj(ptr noundef nonnull align 4 dereferenceable(19532) %29, i32 noundef %31)
  %32 = load i32, ptr %26, align 4, !tbaa !39
  %33 = shl nuw i32 1, %32
  tail call void @_ZN9NCompress5NLZMA7NLength18CPriceTableEncoder12UpdateTablesEj(ptr noundef nonnull align 4 dereferenceable(19532) %29, i32 noundef %33)
  %34 = getelementptr inbounds i8, ptr %0, i64 210640
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %34, i8 0, i64 16, i1 false)
  br label %35

35:                                               ; preds = %14, %9, %5, %21
  %.3 = phi i32 [ %8, %5 ], [ %13, %9 ], [ %15, %14 ], [ 0, %21 ]
  ret i32 %.3
}

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN9NCompress5NLZMA7NLength18CPriceTableEncoder12SetTableSizeEj(ptr noundef nonnull align 4 dereferenceable(19532), i32 noundef) local_unnamed_addr #1 align 2

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #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 = { 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 #2 = { nocallback nofree nounwind willreturn memory(argmem: write) }

!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 210664}
!6 = !{!"_ZTSN9NCompress5NLZMA8CEncoderE", !7, i64 0, !9, i64 8, !10, i64 16, !11, i64 24, !12, i64 32, !16, i64 52, !14, i64 56, !18, i64 163896, !20, i64 163904, !14, i64 163984, !14, i64 164752, !14, i64 164800, !14, i64 164848, !14, i64 164896, !14, i64 164944, !14, i64 165712, !14, i64 166736, !25, i64 167192, !26, i64 167256, !26, i64 186788, !31, i64 206320, !14, i64 206344, !24, i64 207440, !24, i64 207441, !17, i64 207444, !17, i64 207448, !17, i64 207452, !17, i64 207456, !17, i64 207460, !24, i64 207464, !14, i64 207468, !14, i64 208492, !14, i64 210540, !17, i64 210604, !17, i64 210608, !17, i64 210612, !17, i64 210616, !17, i64 210620, !17, i64 210624, !17, i64 210628, !17, i64 210632, !17, i64 210636, !21, i64 210640, !21, i64 210648, !24, i64 210656, !19, i64 210664, !17, i64 210672, !24, i64 210676, !24, i64 210677}
!7 = !{!"_ZTS14ICompressCoder", !8, i64 0}
!8 = !{!"_ZTS8IUnknown"}
!9 = !{!"_ZTS21ICompressSetOutStream", !8, i64 0}
!10 = !{!"_ZTS27ICompressSetCoderProperties", !8, i64 0}
!11 = !{!"_ZTS29ICompressWriteCoderProperties", !8, i64 0}
!12 = !{!"_ZTSN9NCompress5NLZMA10CBaseStateE", !13, i64 0, !14, i64 1, !14, i64 4}
!13 = !{!"_ZTSN9NCompress5NLZMA6CStateE", !14, i64 0}
!14 = !{!"omnipotent char", !15, i64 0}
!15 = !{!"Simple C++ TBAA"}
!16 = !{!"_ZTS13CMyUnknownImp", !17, i64 0}
!17 = !{!"int", !14, i64 0}
!18 = !{!"_ZTS9CMyComPtrI12IMatchFinderE", !19, i64 0}
!19 = !{!"any pointer", !14, i64 0}
!20 = !{!"_ZTSN9NCompress11NRangeCoder8CEncoderE", !17, i64 0, !14, i64 4, !21, i64 8, !17, i64 16, !22, i64 24}
!21 = !{!"long long", !14, i64 0}
!22 = !{!"_ZTS10COutBuffer", !19, i64 0, !17, i64 8, !17, i64 12, !17, i64 16, !17, i64 20, !23, i64 24, !21, i64 32, !19, i64 40, !24, i64 48}
!23 = !{!"_ZTS9CMyComPtrI20ISequentialOutStreamE", !19, i64 0}
!24 = !{!"bool", !14, i64 0}
!25 = !{!"_ZTSN9NCompress11NRangeCoder15CBitTreeEncoderILi5ELi4EEE", !14, i64 0}
!26 = !{!"_ZTSN9NCompress5NLZMA7NLength18CPriceTableEncoderE", !27, i64 0, !14, i64 2056, !17, i64 19464, !14, i64 19468}
!27 = !{!"_ZTSN9NCompress5NLZMA7NLength8CEncoderE", !28, i64 0, !28, i64 4, !14, i64 8, !14, i64 520, !30, i64 1032}
!28 = !{!"_ZTSN9NCompress11NRangeCoder11CBitEncoderILi5EEE", !29, i64 0}
!29 = !{!"_ZTSN9NCompress11NRangeCoder9CBitModelILi5EEE", !17, i64 0}
!30 = !{!"_ZTSN9NCompress11NRangeCoder15CBitTreeEncoderILi5ELi8EEE", !14, i64 0}
!31 = !{!"_ZTSN9NCompress5NLZMA15CLiteralEncoderE", !19, i64 0, !17, i64 8, !17, i64 12, !17, i64 16}
!32 = !{!6, !24, i64 210656}
!33 = !{!34, !34, i64 0}
!34 = !{!"vtable pointer", !15, i64 0}
!35 = !{!6, !24, i64 207440}
!36 = !{i8 0, i8 2}
!37 = !{}
!38 = !{!6, !17, i64 207444}
!39 = !{!6, !17, i64 210612}


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