; LLVM IR from mncoppola/rpef :: utilities_src/squashfs4.2/lzma465/CPP/7zip/Compress (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"

%struct._CLzmaEncProps = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }
%struct.tagPROPVARIANT = type { i16, i16, i16, i16, %union.anon }
%union.anon = type { %struct.LARGE_INTEGER }
%struct.LARGE_INTEGER = type { i64 }
%"class.NCompress::NLzma::CEncoder" = type { %struct.ICompressCoder, %struct.ICompressSetOutStream, %struct.ICompressSetCoderProperties, %struct.ICompressWriteCoderProperties, %class.CMyUnknownImp, ptr, %"struct.NCompress::NLzma::CSeqInStream", %"struct.NCompress::NLzma::CSeqOutStream" }
%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.CMyUnknownImp = type { i32 }
%"struct.NCompress::NLzma::CSeqInStream" = type { %struct.ISeqInStream, ptr }
%struct.ISeqInStream = type { ptr }
%"struct.NCompress::NLzma::CSeqOutStream" = type <{ %struct.ISeqOutStream, %class.CMyComPtr, i32, [4 x i8] }>
%struct.ISeqOutStream = type { ptr }
%class.CMyComPtr = type { ptr }

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN9NCompress5NLzma8CEncoder18SetCoderPropertiesEPKjPK14tagPROPVARIANTj(ptr noundef nonnull align 8 dereferenceable(88) %0, ptr noundef %1, ptr noundef %2, i32 noundef %3) unnamed_addr #0 align 2 {
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca %struct._CLzmaEncProps, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca ptr, align 8
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store ptr %2, ptr %8, align 8, !tbaa !5
  store i32 %3, ptr %9, align 4, !tbaa !9
  %14 = load ptr, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 48, ptr %10) #4
  call void @LzmaEncProps_Init(ptr noundef %10)
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  store i32 0, ptr %11, align 4, !tbaa !9
  br label %15

15:                                               ; preds = %179, %4
  %16 = load i32, ptr %11, align 4, !tbaa !9
  %17 = load i32, ptr %9, align 4, !tbaa !9
  %18 = icmp ult i32 %16, %17
  br i1 %18, label %20, label %19

19:                                               ; preds = %15
  store i32 2, ptr %12, align 4
  br label %182

20:                                               ; preds = %15
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  %21 = load ptr, ptr %8, align 8, !tbaa !5
  %22 = load i32, ptr %11, align 4, !tbaa !9
  %23 = zext i32 %22 to i64
  %24 = getelementptr inbounds %struct.tagPROPVARIANT, ptr %21, i64 %23
  store ptr %24, ptr %13, align 8, !tbaa !5
  %25 = load ptr, ptr %7, align 8, !tbaa !5
  %26 = load i32, ptr %11, align 4, !tbaa !9
  %27 = zext i32 %26 to i64
  %28 = getelementptr inbounds i32, ptr %25, i64 %27
  %29 = load i32, ptr %28, align 4, !tbaa !9
  switch i32 %29, label %174 [
    i32 1104, label %30
    i32 1106, label %42
    i32 1136, label %54
    i32 1024, label %66
    i32 1088, label %78
    i32 1090, label %90
    i32 1089, label %102
    i32 1153, label %114
    i32 1152, label %126
    i32 1168, label %142
    i32 1105, label %157
  ]

30:                                               ; preds = %20
  %31 = load ptr, ptr %13, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct.tagPROPVARIANT, ptr %31, i32 0, i32 0
  %33 = load i16, ptr %32, align 8, !tbaa !11
  %34 = zext i16 %33 to i32
  %35 = icmp ne i32 %34, 19
  br i1 %35, label %36, label %37

36:                                               ; preds = %30
  store i32 -2147024809, ptr %5, align 4
  store i32 1, ptr %12, align 4
  br label %176

37:                                               ; preds = %30
  %38 = load ptr, ptr %13, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct.tagPROPVARIANT, ptr %38, i32 0, i32 4
  %40 = load i32, ptr %39, align 8, !tbaa !14
  %41 = getelementptr inbounds %struct._CLzmaEncProps, ptr %10, i32 0, i32 6
  store i32 %40, ptr %41, align 4, !tbaa !15
  br label %175

42:                                               ; preds = %20
  %43 = load ptr, ptr %13, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.tagPROPVARIANT, ptr %43, i32 0, i32 0
  %45 = load i16, ptr %44, align 8, !tbaa !11
  %46 = zext i16 %45 to i32
  %47 = icmp ne i32 %46, 19
  br i1 %47, label %48, label %49

48:                                               ; preds = %42
  store i32 -2147024809, ptr %5, align 4
  store i32 1, ptr %12, align 4
  br label %176

49:                                               ; preds = %42
  %50 = load ptr, ptr %13, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.tagPROPVARIANT, ptr %50, i32 0, i32 4
  %52 = load i32, ptr %51, align 8, !tbaa !14
  %53 = getelementptr inbounds %struct._CLzmaEncProps, ptr %10, i32 0, i32 9
  store i32 %52, ptr %53, align 4, !tbaa !17
  br label %175

54:                                               ; preds = %20
  %55 = load ptr, ptr %13, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.tagPROPVARIANT, ptr %55, i32 0, i32 0
  %57 = load i16, ptr %56, align 8, !tbaa !11
  %58 = zext i16 %57 to i32
  %59 = icmp ne i32 %58, 19
  br i1 %59, label %60, label %61

60:                                               ; preds = %54
  store i32 -2147024809, ptr %5, align 4
  store i32 1, ptr %12, align 4
  br label %176

61:                                               ; preds = %54
  %62 = load ptr, ptr %13, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.tagPROPVARIANT, ptr %62, i32 0, i32 4
  %64 = load i32, ptr %63, align 8, !tbaa !14
  %65 = getelementptr inbounds %struct._CLzmaEncProps, ptr %10, i32 0, i32 5
  store i32 %64, ptr %65, align 4, !tbaa !18
  br label %175

66:                                               ; preds = %20
  %67 = load ptr, ptr %13, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct.tagPROPVARIANT, ptr %67, i32 0, i32 0
  %69 = load i16, ptr %68, align 8, !tbaa !11
  %70 = zext i16 %69 to i32
  %71 = icmp ne i32 %70, 19
  br i1 %71, label %72, label %73

72:                                               ; preds = %66
  store i32 -2147024809, ptr %5, align 4
  store i32 1, ptr %12, align 4
  br label %176

73:                                               ; preds = %66
  %74 = load ptr, ptr %13, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.tagPROPVARIANT, ptr %74, i32 0, i32 4
  %76 = load i32, ptr %75, align 8, !tbaa !14
  %77 = getelementptr inbounds %struct._CLzmaEncProps, ptr %10, i32 0, i32 1
  store i32 %76, ptr %77, align 4, !tbaa !19
  br label %175

78:                                               ; preds = %20
  %79 = load ptr, ptr %13, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct.tagPROPVARIANT, ptr %79, i32 0, i32 0
  %81 = load i16, ptr %80, align 8, !tbaa !11
  %82 = zext i16 %81 to i32
  %83 = icmp ne i32 %82, 19
  br i1 %83, label %84, label %85

84:                                               ; preds = %78
  store i32 -2147024809, ptr %5, align 4
  store i32 1, ptr %12, align 4
  br label %176

85:                                               ; preds = %78
  %86 = load ptr, ptr %13, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct.tagPROPVARIANT, ptr %86, i32 0, i32 4
  %88 = load i32, ptr %87, align 8, !tbaa !14
  %89 = getelementptr inbounds %struct._CLzmaEncProps, ptr %10, i32 0, i32 4
  store i32 %88, ptr %89, align 4, !tbaa !20
  br label %175

90:                                               ; preds = %20
  %91 = load ptr, ptr %13, align 8, !tbaa !5
  %92 = getelementptr inbounds %struct.tagPROPVARIANT, ptr %91, i32 0, i32 0
  %93 = load i16, ptr %92, align 8, !tbaa !11
  %94 = zext i16 %93 to i32
  %95 = icmp ne i32 %94, 19
  br i1 %95, label %96, label %97

96:                                               ; preds = %90
  store i32 -2147024809, ptr %5, align 4
  store i32 1, ptr %12, align 4
  br label %176

97:                                               ; preds = %90
  %98 = load ptr, ptr %13, align 8, !tbaa !5
  %99 = getelementptr inbounds %struct.tagPROPVARIANT, ptr %98, i32 0, i32 4
  %100 = load i32, ptr %99, align 8, !tbaa !14
  %101 = getelementptr inbounds %struct._CLzmaEncProps, ptr %10, i32 0, i32 3
  store i32 %100, ptr %101, align 4, !tbaa !21
  br label %175

102:                                              ; preds = %20
  %103 = load ptr, ptr %13, align 8, !tbaa !5
  %104 = getelementptr inbounds %struct.tagPROPVARIANT, ptr %103, i32 0, i32 0
  %105 = load i16, ptr %104, align 8, !tbaa !11
  %106 = zext i16 %105 to i32
  %107 = icmp ne i32 %106, 19
  br i1 %107, label %108, label %109

108:                                              ; preds = %102
  store i32 -2147024809, ptr %5, align 4
  store i32 1, ptr %12, align 4
  br label %176

109:                                              ; preds = %102
  %110 = load ptr, ptr %13, align 8, !tbaa !5
  %111 = getelementptr inbounds %struct.tagPROPVARIANT, ptr %110, i32 0, i32 4
  %112 = load i32, ptr %111, align 8, !tbaa !14
  %113 = getelementptr inbounds %struct._CLzmaEncProps, ptr %10, i32 0, i32 2
  store i32 %112, ptr %113, align 4, !tbaa !22
  br label %175

114:                                              ; preds = %20
  %115 = load ptr, ptr %13, align 8, !tbaa !5
  %116 = getelementptr inbounds %struct.tagPROPVARIANT, ptr %115, i32 0, i32 0
  %117 = load i16, ptr %116, align 8, !tbaa !11
  %118 = zext i16 %117 to i32
  %119 = icmp ne i32 %118, 19
  br i1 %119, label %120, label %121

120:                                              ; preds = %114
  store i32 -2147024809, ptr %5, align 4
  store i32 1, ptr %12, align 4
  br label %176

121:                                              ; preds = %114
  %122 = load ptr, ptr %13, align 8, !tbaa !5
  %123 = getelementptr inbounds %struct.tagPROPVARIANT, ptr %122, i32 0, i32 4
  %124 = load i32, ptr %123, align 8, !tbaa !14
  %125 = getelementptr inbounds %struct._CLzmaEncProps, ptr %10, i32 0, i32 11
  store i32 %124, ptr %125, align 4, !tbaa !23
  br label %175

126:                                              ; preds = %20
  %127 = load ptr, ptr %13, align 8, !tbaa !5
  %128 = getelementptr inbounds %struct.tagPROPVARIANT, ptr %127, i32 0, i32 0
  %129 = load i16, ptr %128, align 8, !tbaa !11
  %130 = zext i16 %129 to i32
  %131 = icmp ne i32 %130, 11
  br i1 %131, label %132, label %133

132:                                              ; preds = %126
  store i32 -2147024809, ptr %5, align 4
  store i32 1, ptr %12, align 4
  br label %176

133:                                              ; preds = %126
  %134 = load ptr, ptr %13, align 8, !tbaa !5
  %135 = getelementptr inbounds %struct.tagPROPVARIANT, ptr %134, i32 0, i32 4
  %136 = load i16, ptr %135, align 8, !tbaa !14
  %137 = sext i16 %136 to i32
  %138 = icmp eq i32 %137, -1
  %139 = zext i1 %138 to i64
  %140 = select i1 %138, i32 2, i32 1
  %141 = getelementptr inbounds %struct._CLzmaEncProps, ptr %10, i32 0, i32 11
  store i32 %140, ptr %141, align 4, !tbaa !23
  br label %175

142:                                              ; preds = %20
  %143 = load ptr, ptr %13, align 8, !tbaa !5
  %144 = getelementptr inbounds %struct.tagPROPVARIANT, ptr %143, i32 0, i32 0
  %145 = load i16, ptr %144, align 8, !tbaa !11
  %146 = zext i16 %145 to i32
  %147 = icmp ne i32 %146, 11
  br i1 %147, label %148, label %149

148:                                              ; preds = %142
  store i32 -2147024809, ptr %5, align 4
  store i32 1, ptr %12, align 4
  br label %176

149:                                              ; preds = %142
  %150 = load ptr, ptr %13, align 8, !tbaa !5
  %151 = getelementptr inbounds %struct.tagPROPVARIANT, ptr %150, i32 0, i32 4
  %152 = load i16, ptr %151, align 8, !tbaa !14
  %153 = sext i16 %152 to i32
  %154 = icmp eq i32 %153, -1
  %155 = zext i1 %154 to i32
  %156 = getelementptr inbounds %struct._CLzmaEncProps, ptr %10, i32 0, i32 10
  store i32 %155, ptr %156, align 4, !tbaa !24
  br label %175

157:                                              ; preds = %20
  %158 = load ptr, ptr %13, align 8, !tbaa !5
  %159 = getelementptr inbounds %struct.tagPROPVARIANT, ptr %158, i32 0, i32 0
  %160 = load i16, ptr %159, align 8, !tbaa !11
  %161 = zext i16 %160 to i32
  %162 = icmp ne i32 %161, 8
  br i1 %162, label %163, label %164

163:                                              ; preds = %157
  store i32 -2147024809, ptr %5, align 4
  store i32 1, ptr %12, align 4
  br label %176

164:                                              ; preds = %157
  %165 = load ptr, ptr %13, align 8, !tbaa !5
  %166 = getelementptr inbounds %struct.tagPROPVARIANT, ptr %165, i32 0, i32 4
  %167 = load ptr, ptr %166, align 8, !tbaa !14
  %168 = getelementptr inbounds %struct._CLzmaEncProps, ptr %10, i32 0, i32 7
  %169 = getelementptr inbounds %struct._CLzmaEncProps, ptr %10, i32 0, i32 8
  %170 = call noundef i32 @_ZN9NCompress5NLzmaL16ParseMatchFinderEPKwPiS3_(ptr noundef %167, ptr noundef %168, ptr noundef %169)
  %171 = icmp ne i32 %170, 0
  br i1 %171, label %173, label %172

172:                                              ; preds = %164
  store i32 -2147024809, ptr %5, align 4
  store i32 1, ptr %12, align 4
  br label %176

173:                                              ; preds = %164
  br label %175

174:                                              ; preds = %20
  store i32 -2147024809, ptr %5, align 4
  store i32 1, ptr %12, align 4
  br label %176

175:                                              ; preds = %173, %149, %133, %121, %109, %97, %85, %73, %61, %49, %37
  store i32 0, ptr %12, align 4
  br label %176

176:                                              ; preds = %175, %174, %172, %163, %148, %132, %120, %108, %96, %84, %72, %60, %48, %36
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  %177 = load i32, ptr %12, align 4
  switch i32 %177, label %182 [
    i32 0, label %178
  ]

178:                                              ; preds = %176
  br label %179

179:                                              ; preds = %178
  %180 = load i32, ptr %11, align 4, !tbaa !9
  %181 = add i32 %180, 1
  store i32 %181, ptr %11, align 4, !tbaa !9
  br label %15, !llvm.loop !25

182:                                              ; preds = %176, %19
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  %183 = load i32, ptr %12, align 4
  switch i32 %183, label %189 [
    i32 2, label %184
  ]

184:                                              ; preds = %182
  %185 = getelementptr inbounds %"class.NCompress::NLzma::CEncoder", ptr %14, i32 0, i32 5
  %186 = load ptr, ptr %185, align 8, !tbaa !27
  %187 = call i32 @LzmaEnc_SetProps(ptr noundef %186, ptr noundef %10)
  %188 = call noundef i32 @_ZL13SResToHRESULTi(i32 noundef %187)
  store i32 %188, ptr %5, align 4
  store i32 1, ptr %12, align 4
  br label %189

189:                                              ; preds = %184, %182
  call void @llvm.lifetime.end.p0(i64 48, ptr %10) #4
  %190 = load i32, ptr %5, align 4
  ret i32 %190
}

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

declare void @LzmaEncProps_Init(ptr noundef) #2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef i32 @_ZL13SResToHRESULTi(i32 noundef) #3

declare i32 @LzmaEnc_SetProps(ptr noundef, ptr noundef) #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 = { 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 = { 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, !13, i64 0}
!12 = !{!"_ZTS14tagPROPVARIANT", !13, i64 0, !13, i64 2, !13, i64 4, !13, i64 6, !7, i64 8}
!13 = !{!"short", !7, i64 0}
!14 = !{!7, !7, i64 0}
!15 = !{!16, !10, i64 24}
!16 = !{!"_ZTS14_CLzmaEncProps", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !10, i64 32, !10, i64 36, !10, i64 40, !10, i64 44}
!17 = !{!16, !10, i64 36}
!18 = !{!16, !10, i64 20}
!19 = !{!16, !10, i64 4}
!20 = !{!16, !10, i64 16}
!21 = !{!16, !10, i64 12}
!22 = !{!16, !10, i64 8}
!23 = !{!16, !10, i64 44}
!24 = !{!16, !10, i64 40}
!25 = distinct !{!25, !26}
!26 = !{!"llvm.loop.mustprogress"}
!27 = !{!28, !6, i64 40}
!28 = !{!"_ZTSN9NCompress5NLzma8CEncoderE", !29, i64 0, !31, i64 8, !32, i64 16, !33, i64 24, !34, i64 32, !6, i64 40, !35, i64 48, !37, i64 64}
!29 = !{!"_ZTS14ICompressCoder", !30, i64 0}
!30 = !{!"_ZTS8IUnknown"}
!31 = !{!"_ZTS21ICompressSetOutStream", !30, i64 0}
!32 = !{!"_ZTS27ICompressSetCoderProperties", !30, i64 0}
!33 = !{!"_ZTS29ICompressWriteCoderProperties", !30, i64 0}
!34 = !{!"_ZTS13CMyUnknownImp", !10, i64 0}
!35 = !{!"_ZTSN9NCompress5NLzma12CSeqInStreamE", !36, i64 0, !6, i64 8}
!36 = !{!"_ZTS12ISeqInStream", !6, i64 0}
!37 = !{!"_ZTSN9NCompress5NLzma13CSeqOutStreamE", !38, i64 0, !39, i64 8, !10, i64 16}
!38 = !{!"_ZTS13ISeqOutStream", !6, i64 0}
!39 = !{!"_ZTS9CMyComPtrI20ISequentialOutStreamE", !6, i64 0}


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

%struct._CLzmaEncProps = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }
%struct.tagPROPVARIANT = type { i16, i16, i16, i16, %union.anon }
%union.anon = type { %struct.LARGE_INTEGER }
%struct.LARGE_INTEGER = type { i64 }

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN9NCompress5NLzma8CEncoder18SetCoderPropertiesEPKjPK14tagPROPVARIANTj(ptr nocapture noundef nonnull readonly align 8 dereferenceable(88) %0, ptr nocapture noundef readonly %1, ptr nocapture noundef readonly %2, i32 noundef %3) unnamed_addr #0 align 2 {
  %5 = alloca %struct._CLzmaEncProps, align 4
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %5) #4
  call void @LzmaEncProps_Init(ptr noundef nonnull %5)
  %.not4750.not = icmp eq i32 %3, 0
  br i1 %.not4750.not, label %.critedge49, label %.lr.ph

.lr.ph:                                           ; preds = %4
  %6 = getelementptr inbounds i8, ptr %5, i64 28
  %7 = getelementptr inbounds i8, ptr %5, i64 32
  %8 = getelementptr inbounds i8, ptr %5, i64 40
  %9 = getelementptr inbounds i8, ptr %5, i64 44
  %10 = getelementptr inbounds i8, ptr %5, i64 8
  %11 = getelementptr inbounds i8, ptr %5, i64 12
  %12 = getelementptr inbounds i8, ptr %5, i64 16
  %13 = getelementptr inbounds i8, ptr %5, i64 4
  %14 = getelementptr inbounds i8, ptr %5, i64 20
  %15 = getelementptr inbounds i8, ptr %5, i64 36
  %16 = getelementptr inbounds i8, ptr %5, i64 24
  %wide.trip.count = zext i32 %3 to i64
  br label %17

17:                                               ; preds = %.lr.ph, %.critedge
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %.critedge ]
  %18 = getelementptr inbounds %struct.tagPROPVARIANT, ptr %2, i64 %indvars.iv
  %19 = getelementptr inbounds i32, ptr %1, i64 %indvars.iv
  %20 = load i32, ptr %19, align 4, !tbaa !5
  switch i32 %20, label %.loopexit [
    i32 1104, label %21
    i32 1106, label %26
    i32 1136, label %31
    i32 1024, label %36
    i32 1088, label %41
    i32 1090, label %46
    i32 1089, label %51
    i32 1153, label %56
    i32 1152, label %61
    i32 1168, label %68
    i32 1105, label %75
  ]

21:                                               ; preds = %17
  %22 = load i16, ptr %18, align 8, !tbaa !9
  %.not46 = icmp eq i16 %22, 19
  br i1 %.not46, label %23, label %.loopexit

23:                                               ; preds = %21
  %24 = getelementptr inbounds i8, ptr %18, i64 8
  %25 = load i32, ptr %24, align 8, !tbaa !12
  store i32 %25, ptr %16, align 4, !tbaa !13
  br label %.critedge

26:                                               ; preds = %17
  %27 = load i16, ptr %18, align 8, !tbaa !9
  %.not45 = icmp eq i16 %27, 19
  br i1 %.not45, label %28, label %.loopexit

28:                                               ; preds = %26
  %29 = getelementptr inbounds i8, ptr %18, i64 8
  %30 = load i32, ptr %29, align 8, !tbaa !12
  store i32 %30, ptr %15, align 4, !tbaa !15
  br label %.critedge

31:                                               ; preds = %17
  %32 = load i16, ptr %18, align 8, !tbaa !9
  %.not44 = icmp eq i16 %32, 19
  br i1 %.not44, label %33, label %.loopexit

33:                                               ; preds = %31
  %34 = getelementptr inbounds i8, ptr %18, i64 8
  %35 = load i32, ptr %34, align 8, !tbaa !12
  store i32 %35, ptr %14, align 4, !tbaa !16
  br label %.critedge

36:                                               ; preds = %17
  %37 = load i16, ptr %18, align 8, !tbaa !9
  %.not43 = icmp eq i16 %37, 19
  br i1 %.not43, label %38, label %.loopexit

38:                                               ; preds = %36
  %39 = getelementptr inbounds i8, ptr %18, i64 8
  %40 = load i32, ptr %39, align 8, !tbaa !12
  store i32 %40, ptr %13, align 4, !tbaa !17
  br label %.critedge

41:                                               ; preds = %17
  %42 = load i16, ptr %18, align 8, !tbaa !9
  %.not42 = icmp eq i16 %42, 19
  br i1 %.not42, label %43, label %.loopexit

43:                                               ; preds = %41
  %44 = getelementptr inbounds i8, ptr %18, i64 8
  %45 = load i32, ptr %44, align 8, !tbaa !12
  store i32 %45, ptr %12, align 4, !tbaa !18
  br label %.critedge

46:                                               ; preds = %17
  %47 = load i16, ptr %18, align 8, !tbaa !9
  %.not41 = icmp eq i16 %47, 19
  br i1 %.not41, label %48, label %.loopexit

48:                                               ; preds = %46
  %49 = getelementptr inbounds i8, ptr %18, i64 8
  %50 = load i32, ptr %49, align 8, !tbaa !12
  store i32 %50, ptr %11, align 4, !tbaa !19
  br label %.critedge

51:                                               ; preds = %17
  %52 = load i16, ptr %18, align 8, !tbaa !9
  %.not40 = icmp eq i16 %52, 19
  br i1 %.not40, label %53, label %.loopexit

53:                                               ; preds = %51
  %54 = getelementptr inbounds i8, ptr %18, i64 8
  %55 = load i32, ptr %54, align 8, !tbaa !12
  store i32 %55, ptr %10, align 4, !tbaa !20
  br label %.critedge

56:                                               ; preds = %17
  %57 = load i16, ptr %18, align 8, !tbaa !9
  %.not39 = icmp eq i16 %57, 19
  br i1 %.not39, label %58, label %.loopexit

58:                                               ; preds = %56
  %59 = getelementptr inbounds i8, ptr %18, i64 8
  %60 = load i32, ptr %59, align 8, !tbaa !12
  store i32 %60, ptr %9, align 4, !tbaa !21
  br label %.critedge

61:                                               ; preds = %17
  %62 = load i16, ptr %18, align 8, !tbaa !9
  %.not38 = icmp eq i16 %62, 11
  br i1 %.not38, label %63, label %.loopexit

63:                                               ; preds = %61
  %64 = getelementptr inbounds i8, ptr %18, i64 8
  %65 = load i16, ptr %64, align 8, !tbaa !12
  %66 = icmp eq i16 %65, -1
  %67 = select i1 %66, i32 2, i32 1
  store i32 %67, ptr %9, align 4, !tbaa !21
  br label %.critedge

68:                                               ; preds = %17
  %69 = load i16, ptr %18, align 8, !tbaa !9
  %.not37 = icmp eq i16 %69, 11
  br i1 %.not37, label %70, label %.loopexit

70:                                               ; preds = %68
  %71 = getelementptr inbounds i8, ptr %18, i64 8
  %72 = load i16, ptr %71, align 8, !tbaa !12
  %73 = icmp eq i16 %72, -1
  %74 = zext i1 %73 to i32
  store i32 %74, ptr %8, align 4, !tbaa !22
  br label %.critedge

75:                                               ; preds = %17
  %76 = load i16, ptr %18, align 8, !tbaa !9
  %.not = icmp eq i16 %76, 8
  br i1 %.not, label %77, label %.loopexit

77:                                               ; preds = %75
  %78 = getelementptr inbounds i8, ptr %18, i64 8
  %79 = load ptr, ptr %78, align 8, !tbaa !12
  %80 = call noundef i32 @_ZN9NCompress5NLzmaL16ParseMatchFinderEPKwPiS3_(ptr noundef %79, ptr noundef nonnull %6, ptr noundef nonnull %7)
  %.not36 = icmp eq i32 %80, 0
  br i1 %.not36, label %.loopexit, label %.critedge

.critedge:                                        ; preds = %77, %70, %63, %58, %53, %48, %43, %38, %33, %28, %23
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %.critedge49, label %17, !llvm.loop !23

.critedge49:                                      ; preds = %.critedge, %4
  %81 = getelementptr inbounds i8, ptr %0, i64 40
  %82 = load ptr, ptr %81, align 8, !tbaa !25
  %83 = call i32 @LzmaEnc_SetProps(ptr noundef %82, ptr noundef nonnull %5)
  %84 = call noundef i32 @_ZL13SResToHRESULTi(i32 noundef %83)
  br label %.loopexit

.loopexit:                                        ; preds = %17, %77, %75, %68, %61, %56, %51, %46, %41, %36, %31, %26, %21, %.critedge49
  %.3 = phi i32 [ %84, %.critedge49 ], [ -2147024809, %21 ], [ -2147024809, %26 ], [ -2147024809, %31 ], [ -2147024809, %36 ], [ -2147024809, %41 ], [ -2147024809, %46 ], [ -2147024809, %51 ], [ -2147024809, %56 ], [ -2147024809, %61 ], [ -2147024809, %68 ], [ -2147024809, %75 ], [ -2147024809, %77 ], [ -2147024809, %17 ]
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %5) #4
  ret i32 %.3
}

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

declare void @LzmaEncProps_Init(ptr noundef) local_unnamed_addr #2

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

; 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 nounwind uwtable
declare hidden noundef i32 @_ZL13SResToHRESULTi(i32 noundef) local_unnamed_addr #3

declare i32 @LzmaEnc_SetProps(ptr noundef, ptr noundef) local_unnamed_addr #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 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 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !11, i64 0}
!10 = !{!"_ZTS14tagPROPVARIANT", !11, i64 0, !11, i64 2, !11, i64 4, !11, i64 6, !7, i64 8}
!11 = !{!"short", !7, i64 0}
!12 = !{!7, !7, i64 0}
!13 = !{!14, !6, i64 24}
!14 = !{!"_ZTS14_CLzmaEncProps", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12, !6, i64 16, !6, i64 20, !6, i64 24, !6, i64 28, !6, i64 32, !6, i64 36, !6, i64 40, !6, i64 44}
!15 = !{!14, !6, i64 36}
!16 = !{!14, !6, i64 20}
!17 = !{!14, !6, i64 4}
!18 = !{!14, !6, i64 16}
!19 = !{!14, !6, i64 12}
!20 = !{!14, !6, i64 8}
!21 = !{!14, !6, i64 44}
!22 = !{!14, !6, i64 40}
!23 = distinct !{!23, !24}
!24 = !{!"llvm.loop.mustprogress"}
!25 = !{!26, !33, i64 40}
!26 = !{!"_ZTSN9NCompress5NLzma8CEncoderE", !27, i64 0, !29, i64 8, !30, i64 16, !31, i64 24, !32, i64 32, !33, i64 40, !34, i64 48, !36, i64 64}
!27 = !{!"_ZTS14ICompressCoder", !28, i64 0}
!28 = !{!"_ZTS8IUnknown"}
!29 = !{!"_ZTS21ICompressSetOutStream", !28, i64 0}
!30 = !{!"_ZTS27ICompressSetCoderProperties", !28, i64 0}
!31 = !{!"_ZTS29ICompressWriteCoderProperties", !28, i64 0}
!32 = !{!"_ZTS13CMyUnknownImp", !6, i64 0}
!33 = !{!"any pointer", !7, i64 0}
!34 = !{!"_ZTSN9NCompress5NLzma12CSeqInStreamE", !35, i64 0, !33, i64 8}
!35 = !{!"_ZTS12ISeqInStream", !33, i64 0}
!36 = !{!"_ZTSN9NCompress5NLzma13CSeqOutStreamE", !37, i64 0, !38, i64 8, !6, i64 16}
!37 = !{!"_ZTS13ISeqOutStream", !33, i64 0}
!38 = !{!"_ZTS9CMyComPtrI20ISequentialOutStreamE", !33, i64 0}


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