; LLVM IR from SSBMTonberry/pocketlzma :: ref_spec/lzma1900/CPP/7zip/Archive (LzmaHandler)

; 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.CMyComPtr.0 = type { ptr }
%"class.NArchive::NLzma::CDecoder" = type { %class.CMyComPtr, ptr, %class.CMyComPtr.0, ptr }
%class.CMyComPtr = type { ptr }
%"class.NCompress::NLzma::CDecoder" = type { %struct.ICompressCoder, %struct.ICompressSetDecoderProperties2, %struct.ICompressSetFinishMode, %struct.ICompressGetInStreamProcessedSize, %struct.ICompressSetBufSize, %struct.ICompressSetInStream, %struct.ICompressSetOutStreamSize, %struct.ISequentialInStream, %class.CMyUnknownImp, ptr, i32, i32, i32, i8, i8, i8, i64, i64, i64, i32, i32, i32, %struct.CLzmaDec, %class.CMyComPtr.1 }
%struct.ICompressCoder = type { %struct.IUnknown }
%struct.IUnknown = type { ptr }
%struct.ICompressSetDecoderProperties2 = type { %struct.IUnknown }
%struct.ICompressSetFinishMode = type { %struct.IUnknown }
%struct.ICompressGetInStreamProcessedSize = type { %struct.IUnknown }
%struct.ICompressSetBufSize = type { %struct.IUnknown }
%struct.ICompressSetInStream = type { %struct.IUnknown }
%struct.ICompressSetOutStreamSize = type { %struct.IUnknown }
%struct.ISequentialInStream = type { %struct.IUnknown }
%class.CMyUnknownImp = type { i32 }
%struct.CLzmaDec = type { %struct._CLzmaProps, ptr, ptr, ptr, i64, i64, ptr, i32, i32, i32, i32, [4 x i32], i32, i32, i32, i32, [20 x i8] }
%struct._CLzmaProps = type { i8, i8, i8, i8, i32 }
%class.CMyComPtr.1 = type { ptr }
%class.CFilterCoder = type { %struct.ICompressCoder, %struct.ICompressSetOutStreamSize, %struct.ICompressInitEncoder, %struct.ICompressSetInStream, %struct.ISequentialInStream, %struct.ICompressSetOutStream, %struct.ISequentialOutStream, %struct.IOutStreamFinish, %struct.ICompressSetBufSize, %struct.ICryptoSetPassword, %struct.ICryptoProperties, %struct.ICompressSetCoderProperties, %struct.ICompressWriteCoderProperties, %struct.ICryptoResetInitVector, %struct.ICompressSetDecoderProperties2, %class.CMyUnknownImp, %struct.CAlignedMidBuffer, i32, i32, i32, i8, i8, i64, i64, %class.CMyComPtr.1, %class.CMyComPtr, i32, i32, i32, %class.CMyComPtr.2, %class.CMyComPtr.3, %class.CMyComPtr.4, %class.CMyComPtr.5, %class.CMyComPtr.6, %class.CMyComPtr.7, %class.CMyComPtr.8 }
%struct.ICompressInitEncoder = type { %struct.IUnknown }
%struct.ICompressSetOutStream = type { %struct.IUnknown }
%struct.ISequentialOutStream = type { %struct.IUnknown }
%struct.IOutStreamFinish = type { %struct.IUnknown }
%struct.ICryptoSetPassword = type { %struct.IUnknown }
%struct.ICryptoProperties = type { %struct.IUnknown }
%struct.ICompressSetCoderProperties = type { %struct.IUnknown }
%struct.ICompressWriteCoderProperties = type { %struct.IUnknown }
%struct.ICryptoResetInitVector = type { %struct.IUnknown }
%struct.CAlignedMidBuffer = type { ptr }
%class.CMyComPtr.2 = type { ptr }
%class.CMyComPtr.3 = type { ptr }
%class.CMyComPtr.4 = type { ptr }
%class.CMyComPtr.5 = type { ptr }
%class.CMyComPtr.6 = type { ptr }
%class.CMyComPtr.7 = type { ptr }
%class.CMyComPtr.8 = type { ptr }

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN8NArchive5NLzma8CDecoder6CreateEbP19ISequentialInStream(ptr noundef nonnull align 8 dereferenceable(32) %0, i1 noundef zeroext %1, ptr noundef %2) #1 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca i8, align 1
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca %class.CMyComPtr.0, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  %10 = zext i1 %1 to i8
  store i8 %10, ptr %5, align 1, !tbaa !9
  store ptr %2, ptr %6, align 8, !tbaa !5
  %11 = load ptr, ptr %4, align 8
  %12 = getelementptr inbounds %"class.NArchive::NLzma::CDecoder", ptr %11, i32 0, i32 2
  %13 = call noundef zeroext i1 @_ZNK9CMyComPtrI14ICompressCoderEntEv(ptr noundef nonnull align 8 dereferenceable(8) %12)
  br i1 %13, label %14, label %29

14:                                               ; preds = %3
  %15 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 272) #6
  invoke void @_ZN9NCompress5NLzma8CDecoderC1Ev(ptr noundef nonnull align 8 dereferenceable(272) %15)
          to label %16 unwind label %25

16:                                               ; preds = %14
  %17 = getelementptr inbounds %"class.NArchive::NLzma::CDecoder", ptr %11, i32 0, i32 3
  store ptr %15, ptr %17, align 8, !tbaa !11
  %18 = getelementptr inbounds %"class.NArchive::NLzma::CDecoder", ptr %11, i32 0, i32 3
  %19 = load ptr, ptr %18, align 8, !tbaa !11
  %20 = getelementptr inbounds %"class.NCompress::NLzma::CDecoder", ptr %19, i32 0, i32 13
  store i8 1, ptr %20, align 4, !tbaa !15
  %21 = getelementptr inbounds %"class.NArchive::NLzma::CDecoder", ptr %11, i32 0, i32 3
  %22 = load ptr, ptr %21, align 8, !tbaa !11
  %23 = getelementptr inbounds %"class.NArchive::NLzma::CDecoder", ptr %11, i32 0, i32 2
  %24 = call noundef ptr @_ZN9CMyComPtrI14ICompressCoderEaSEPS0_(ptr noundef nonnull align 8 dereferenceable(8) %23, ptr noundef %22)
  br label %29

25:                                               ; preds = %14
  %26 = landingpad { ptr, i32 }
          cleanup
  %27 = extractvalue { ptr, i32 } %26, 0
  store ptr %27, ptr %7, align 8
  %28 = extractvalue { ptr, i32 } %26, 1
  store i32 %28, ptr %8, align 4
  call void @_ZdlPvm(ptr noundef %15, i64 noundef 272) #7
  br label %81

29:                                               ; preds = %16, %3
  %30 = load i8, ptr %5, align 1, !tbaa !9, !range !34, !noundef !35
  %31 = trunc i8 %30 to i1
  br i1 %31, label %32, label %73

32:                                               ; preds = %29
  %33 = getelementptr inbounds %"class.NArchive::NLzma::CDecoder", ptr %11, i32 0, i32 0
  %34 = call noundef zeroext i1 @_ZNK9CMyComPtrI20ISequentialOutStreamEntEv(ptr noundef nonnull align 8 dereferenceable(8) %33)
  br i1 %34, label %35, label %72

35:                                               ; preds = %32
  %36 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 256) #6
  invoke void @_ZN12CFilterCoderC1Eb(ptr noundef nonnull align 8 dereferenceable(256) %36, i1 noundef zeroext false)
          to label %37 unwind label %59

37:                                               ; preds = %35
  %38 = getelementptr inbounds %"class.NArchive::NLzma::CDecoder", ptr %11, i32 0, i32 1
  store ptr %36, ptr %38, align 8, !tbaa !36
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #8
  %39 = getelementptr inbounds %"class.NArchive::NLzma::CDecoder", ptr %11, i32 0, i32 1
  %40 = load ptr, ptr %39, align 8, !tbaa !36
  call void @_ZN9CMyComPtrI14ICompressCoderEC2EPS0_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef %40) #8
  %41 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 24) #6
          to label %42 unwind label %63

42:                                               ; preds = %37
  invoke void @_ZN9NCompress4NBcj6CCoderC2Ei(ptr noundef nonnull align 8 dereferenceable(24) %41, i32 noundef 0)
          to label %43 unwind label %67

43:                                               ; preds = %42
  %44 = getelementptr inbounds %"class.NArchive::NLzma::CDecoder", ptr %11, i32 0, i32 1
  %45 = load ptr, ptr %44, align 8, !tbaa !36
  %46 = getelementptr inbounds %class.CFilterCoder, ptr %45, i32 0, i32 35
  %47 = invoke noundef ptr @_ZN9CMyComPtrI15ICompressFilterEaSEPS0_(ptr noundef nonnull align 8 dereferenceable(8) %46, ptr noundef %41)
          to label %48 unwind label %63

48:                                               ; preds = %43
  %49 = getelementptr inbounds %"class.NArchive::NLzma::CDecoder", ptr %11, i32 0, i32 1
  %50 = load ptr, ptr %49, align 8, !tbaa !36
  %51 = icmp eq ptr %50, null
  br i1 %51, label %54, label %52

52:                                               ; preds = %48
  %53 = getelementptr inbounds i8, ptr %50, i64 48
  br label %54

54:                                               ; preds = %52, %48
  %55 = phi ptr [ %53, %52 ], [ null, %48 ]
  %56 = getelementptr inbounds %"class.NArchive::NLzma::CDecoder", ptr %11, i32 0, i32 0
  %57 = invoke noundef ptr @_ZN9CMyComPtrI20ISequentialOutStreamEaSEPS0_(ptr noundef nonnull align 8 dereferenceable(8) %56, ptr noundef %55)
          to label %58 unwind label %63

58:                                               ; preds = %54
  call void @_ZN9CMyComPtrI14ICompressCoderED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %9) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #8
  br label %72

59:                                               ; preds = %35
  %60 = landingpad { ptr, i32 }
          cleanup
  %61 = extractvalue { ptr, i32 } %60, 0
  store ptr %61, ptr %7, align 8
  %62 = extractvalue { ptr, i32 } %60, 1
  store i32 %62, ptr %8, align 4
  call void @_ZdlPvm(ptr noundef %36, i64 noundef 256) #7
  br label %81

63:                                               ; preds = %54, %43, %37
  %64 = landingpad { ptr, i32 }
          cleanup
  %65 = extractvalue { ptr, i32 } %64, 0
  store ptr %65, ptr %7, align 8
  %66 = extractvalue { ptr, i32 } %64, 1
  store i32 %66, ptr %8, align 4
  br label %71

67:                                               ; preds = %42
  %68 = landingpad { ptr, i32 }
          cleanup
  %69 = extractvalue { ptr, i32 } %68, 0
  store ptr %69, ptr %7, align 8
  %70 = extractvalue { ptr, i32 } %68, 1
  store i32 %70, ptr %8, align 4
  call void @_ZdlPvm(ptr noundef %41, i64 noundef 24) #7
  br label %71

71:                                               ; preds = %67, %63
  call void @_ZN9CMyComPtrI14ICompressCoderED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %9) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #8
  br label %81

72:                                               ; preds = %58, %32
  br label %73

73:                                               ; preds = %72, %29
  %74 = getelementptr inbounds %"class.NArchive::NLzma::CDecoder", ptr %11, i32 0, i32 3
  %75 = load ptr, ptr %74, align 8, !tbaa !11
  %76 = load ptr, ptr %6, align 8, !tbaa !5
  %77 = load ptr, ptr %75, align 8, !tbaa !37
  %78 = getelementptr inbounds ptr, ptr %77, i64 12
  %79 = load ptr, ptr %78, align 8
  %80 = call noundef i32 %79(ptr noundef nonnull align 8 dereferenceable(272) %75, ptr noundef %76)
  ret i32 %80

81:                                               ; preds = %71, %59, %25
  %82 = load ptr, ptr %7, align 8
  %83 = load i32, ptr %8, align 4
  %84 = insertvalue { ptr, i32 } poison, ptr %82, 0
  %85 = insertvalue { ptr, i32 } %84, i32 %83, 1
  resume { ptr, i32 } %85
}

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

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) #3

declare void @_ZN9NCompress5NLzma8CDecoderC1Ev(ptr noundef nonnull align 8 dereferenceable(272)) unnamed_addr #4

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) #5

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

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

declare void @_ZN12CFilterCoderC1Eb(ptr noundef nonnull align 8 dereferenceable(256), i1 noundef zeroext) unnamed_addr #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN9CMyComPtrI14ICompressCoderEC2EPS0_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN9NCompress4NBcj6CCoderC2Ei(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef) unnamed_addr #1 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN9CMyComPtrI14ICompressCoderED2Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #2 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 = { nobuiltin allocsize(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 = { "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 = { nobuiltin nounwind "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 = { builtin allocsize(0) }
attributes #7 = { builtin nounwind }
attributes #8 = { 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 = !{!"bool", !7, i64 0}
!11 = !{!12, !6, i64 24}
!12 = !{!"_ZTSN8NArchive5NLzma8CDecoderE", !13, i64 0, !6, i64 8, !14, i64 16, !6, i64 24}
!13 = !{!"_ZTS9CMyComPtrI20ISequentialOutStreamE", !6, i64 0}
!14 = !{!"_ZTS9CMyComPtrI14ICompressCoderE", !6, i64 0}
!15 = !{!16, !10, i64 92}
!16 = !{!"_ZTSN9NCompress5NLzma8CDecoderE", !17, i64 0, !19, i64 8, !20, i64 16, !21, i64 24, !22, i64 32, !23, i64 40, !24, i64 48, !25, i64 56, !26, i64 64, !6, i64 72, !27, i64 80, !27, i64 84, !28, i64 88, !10, i64 92, !10, i64 93, !10, i64 94, !29, i64 96, !29, i64 104, !29, i64 112, !27, i64 120, !27, i64 124, !27, i64 128, !30, i64 136, !33, i64 264}
!17 = !{!"_ZTS14ICompressCoder", !18, i64 0}
!18 = !{!"_ZTS8IUnknown"}
!19 = !{!"_ZTS30ICompressSetDecoderProperties2", !18, i64 0}
!20 = !{!"_ZTS22ICompressSetFinishMode", !18, i64 0}
!21 = !{!"_ZTS33ICompressGetInStreamProcessedSize", !18, i64 0}
!22 = !{!"_ZTS19ICompressSetBufSize", !18, i64 0}
!23 = !{!"_ZTS20ICompressSetInStream", !18, i64 0}
!24 = !{!"_ZTS25ICompressSetOutStreamSize", !18, i64 0}
!25 = !{!"_ZTS19ISequentialInStream", !18, i64 0}
!26 = !{!"_ZTS13CMyUnknownImp", !27, i64 0}
!27 = !{!"int", !7, i64 0}
!28 = !{!"_ZTS11ELzmaStatus", !7, i64 0}
!29 = !{!"long long", !7, i64 0}
!30 = !{!"_ZTS8CLzmaDec", !31, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !32, i64 32, !32, i64 40, !6, i64 48, !27, i64 56, !27, i64 60, !27, i64 64, !27, i64 68, !7, i64 72, !27, i64 88, !27, i64 92, !27, i64 96, !27, i64 100, !7, i64 104}
!31 = !{!"_ZTS11_CLzmaProps", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3, !27, i64 4}
!32 = !{!"long", !7, i64 0}
!33 = !{!"_ZTS9CMyComPtrI19ISequentialInStreamE", !6, i64 0}
!34 = !{i8 0, i8 2}
!35 = !{}
!36 = !{!12, !6, i64 8}
!37 = !{!38, !38, i64 0}
!38 = !{!"vtable pointer", !8, i64 0}


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

%class.CMyComPtr.0 = type { ptr }

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN8NArchive5NLzma8CDecoder6CreateEbP19ISequentialInStream(ptr noundef nonnull align 8 dereferenceable(32) %0, i1 noundef zeroext %1, ptr noundef %2) local_unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %class.CMyComPtr.0, align 8
  %5 = getelementptr inbounds i8, ptr %0, i64 16
  %6 = tail call noundef zeroext i1 @_ZNK9CMyComPtrI14ICompressCoderEntEv(ptr noundef nonnull align 8 dereferenceable(8) %5)
  br i1 %6, label %7, label %15

7:                                                ; preds = %3
  %8 = tail call noalias noundef nonnull dereferenceable(272) ptr @_Znwm(i64 noundef 272) #6
  invoke void @_ZN9NCompress5NLzma8CDecoderC1Ev(ptr noundef nonnull align 8 dereferenceable(272) %8)
          to label %9 unwind label %13

9:                                                ; preds = %7
  %10 = getelementptr inbounds i8, ptr %0, i64 24
  store ptr %8, ptr %10, align 8, !tbaa !5
  %11 = getelementptr inbounds i8, ptr %8, i64 92
  store i8 1, ptr %11, align 4, !tbaa !12
  %12 = tail call noundef ptr @_ZN9CMyComPtrI14ICompressCoderEaSEPS0_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull %8)
  br label %15

13:                                               ; preds = %7
  %14 = landingpad { ptr, i32 }
          cleanup
  tail call void @_ZdlPvm(ptr noundef nonnull %8, i64 noundef 272) #7
  br label %48

15:                                               ; preds = %9, %3
  br i1 %1, label %16, label %41

16:                                               ; preds = %15
  %17 = tail call noundef zeroext i1 @_ZNK9CMyComPtrI20ISequentialOutStreamEntEv(ptr noundef nonnull align 8 dereferenceable(8) %0)
  br i1 %17, label %18, label %41

18:                                               ; preds = %16
  %19 = tail call noalias noundef nonnull dereferenceable(256) ptr @_Znwm(i64 noundef 256) #6
  invoke void @_ZN12CFilterCoderC1Eb(ptr noundef nonnull align 8 dereferenceable(256) %19, i1 noundef zeroext false)
          to label %20 unwind label %34

20:                                               ; preds = %18
  %21 = getelementptr inbounds i8, ptr %0, i64 8
  store ptr %19, ptr %21, align 8, !tbaa !32
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #8
  call void @_ZN9CMyComPtrI14ICompressCoderEC2EPS0_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull %19) #8
  %22 = invoke noalias noundef nonnull dereferenceable(24) ptr @_Znwm(i64 noundef 24) #6
          to label %23 unwind label %36

23:                                               ; preds = %20
  invoke void @_ZN9NCompress4NBcj6CCoderC2Ei(ptr noundef nonnull align 8 dereferenceable(24) %22, i32 noundef 0)
          to label %24 unwind label %38

24:                                               ; preds = %23
  %25 = load ptr, ptr %21, align 8, !tbaa !32
  %26 = getelementptr inbounds i8, ptr %25, i64 248
  %27 = invoke noundef ptr @_ZN9CMyComPtrI15ICompressFilterEaSEPS0_(ptr noundef nonnull align 8 dereferenceable(8) %26, ptr noundef nonnull %22)
          to label %28 unwind label %36

28:                                               ; preds = %24
  %29 = load ptr, ptr %21, align 8, !tbaa !32
  %30 = icmp eq ptr %29, null
  %31 = getelementptr inbounds i8, ptr %29, i64 48
  %spec.select = select i1 %30, ptr null, ptr %31
  %32 = invoke noundef ptr @_ZN9CMyComPtrI20ISequentialOutStreamEaSEPS0_(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef %spec.select)
          to label %33 unwind label %36

33:                                               ; preds = %28
  call void @_ZN9CMyComPtrI14ICompressCoderED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #8
  br label %41

34:                                               ; preds = %18
  %35 = landingpad { ptr, i32 }
          cleanup
  tail call void @_ZdlPvm(ptr noundef nonnull %19, i64 noundef 256) #7
  br label %48

36:                                               ; preds = %28, %24, %20
  %37 = landingpad { ptr, i32 }
          cleanup
  br label %40

38:                                               ; preds = %23
  %39 = landingpad { ptr, i32 }
          cleanup
  call void @_ZdlPvm(ptr noundef nonnull %22, i64 noundef 24) #7
  br label %40

40:                                               ; preds = %38, %36
  %.pn = phi { ptr, i32 } [ %37, %36 ], [ %39, %38 ]
  call void @_ZN9CMyComPtrI14ICompressCoderED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #8
  br label %48

41:                                               ; preds = %16, %33, %15
  %42 = getelementptr inbounds i8, ptr %0, i64 24
  %43 = load ptr, ptr %42, align 8, !tbaa !5
  %44 = load ptr, ptr %43, align 8, !tbaa !33
  %45 = getelementptr inbounds i8, ptr %44, i64 96
  %46 = load ptr, ptr %45, align 8
  %47 = call noundef i32 %46(ptr noundef nonnull align 8 dereferenceable(272) %43, ptr noundef %2)
  ret i32 %47

48:                                               ; preds = %40, %34, %13
  %.pn.pn = phi { ptr, i32 } [ %.pn, %40 ], [ %35, %34 ], [ %14, %13 ]
  resume { ptr, i32 } %.pn.pn
}

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

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) local_unnamed_addr #3

declare void @_ZN9NCompress5NLzma8CDecoderC1Ev(ptr noundef nonnull align 8 dereferenceable(272)) unnamed_addr #4

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) local_unnamed_addr #5

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN9CMyComPtrI14ICompressCoderEaSEPS0_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #1 align 2

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

declare void @_ZN12CFilterCoderC1Eb(ptr noundef nonnull align 8 dereferenceable(256), i1 noundef zeroext) unnamed_addr #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN9CMyComPtrI14ICompressCoderEC2EPS0_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN9NCompress4NBcj6CCoderC2Ei(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN9CMyComPtrI15ICompressFilterEaSEPS0_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN9CMyComPtrI20ISequentialOutStreamEaSEPS0_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN9CMyComPtrI14ICompressCoderED2Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #2 align 2

attributes #0 = { mustprogress 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 = { nobuiltin allocsize(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 = { "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 = { nobuiltin nounwind "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 = { builtin allocsize(0) }
attributes #7 = { builtin nounwind }
attributes #8 = { 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, !8, i64 24}
!6 = !{!"_ZTSN8NArchive5NLzma8CDecoderE", !7, i64 0, !8, i64 8, !11, i64 16, !8, i64 24}
!7 = !{!"_ZTS9CMyComPtrI20ISequentialOutStreamE", !8, i64 0}
!8 = !{!"any pointer", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!"_ZTS9CMyComPtrI14ICompressCoderE", !8, i64 0}
!12 = !{!13, !26, i64 92}
!13 = !{!"_ZTSN9NCompress5NLzma8CDecoderE", !14, i64 0, !16, i64 8, !17, i64 16, !18, i64 24, !19, i64 32, !20, i64 40, !21, i64 48, !22, i64 56, !23, i64 64, !8, i64 72, !24, i64 80, !24, i64 84, !25, i64 88, !26, i64 92, !26, i64 93, !26, i64 94, !27, i64 96, !27, i64 104, !27, i64 112, !24, i64 120, !24, i64 124, !24, i64 128, !28, i64 136, !31, i64 264}
!14 = !{!"_ZTS14ICompressCoder", !15, i64 0}
!15 = !{!"_ZTS8IUnknown"}
!16 = !{!"_ZTS30ICompressSetDecoderProperties2", !15, i64 0}
!17 = !{!"_ZTS22ICompressSetFinishMode", !15, i64 0}
!18 = !{!"_ZTS33ICompressGetInStreamProcessedSize", !15, i64 0}
!19 = !{!"_ZTS19ICompressSetBufSize", !15, i64 0}
!20 = !{!"_ZTS20ICompressSetInStream", !15, i64 0}
!21 = !{!"_ZTS25ICompressSetOutStreamSize", !15, i64 0}
!22 = !{!"_ZTS19ISequentialInStream", !15, i64 0}
!23 = !{!"_ZTS13CMyUnknownImp", !24, i64 0}
!24 = !{!"int", !9, i64 0}
!25 = !{!"_ZTS11ELzmaStatus", !9, i64 0}
!26 = !{!"bool", !9, i64 0}
!27 = !{!"long long", !9, i64 0}
!28 = !{!"_ZTS8CLzmaDec", !29, i64 0, !8, i64 8, !8, i64 16, !8, i64 24, !30, i64 32, !30, i64 40, !8, i64 48, !24, i64 56, !24, i64 60, !24, i64 64, !24, i64 68, !9, i64 72, !24, i64 88, !24, i64 92, !24, i64 96, !24, i64 100, !9, i64 104}
!29 = !{!"_ZTS11_CLzmaProps", !9, i64 0, !9, i64 1, !9, i64 2, !9, i64 3, !24, i64 4}
!30 = !{!"long", !9, i64 0}
!31 = !{!"_ZTS9CMyComPtrI19ISequentialInStreamE", !8, i64 0}
!32 = !{!6, !8, i64 8}
!33 = !{!34, !34, i64 0}
!34 = !{!"vtable pointer", !10, i64 0}


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