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

; 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 = type { ptr }
%class.CMyComPtr.0 = type { ptr }
%class.CMyComPtr.5 = type { ptr }
%struct.tagPROPVARIANT = type { i16, i16, i16, i16, %union.anon }
%union.anon = type { %struct.LARGE_INTEGER }
%struct.LARGE_INTEGER = type { i64 }

@__const.compress2.propIDs = external hidden unnamed_addr constant [8 x i32], align 16
@.str = external hidden unnamed_addr constant [4 x i32], align 4

; Function Attrs: mustprogress uwtable
define dso_local i32 @compress2(ptr noundef %0, ptr noundef %1, ptr noundef %2, i64 noundef %3, i32 noundef %4) #0 personality ptr @__gxx_personality_v0 {
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i64, align 8
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca %class.CMyComPtr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca %class.CMyComPtr.0, align 8
  %18 = alloca ptr, align 8
  %19 = alloca %class.CMyComPtr.5, align 8
  %20 = alloca [8 x i32], align 16
  %21 = alloca i32, align 4
  %22 = alloca [8 x %struct.tagPROPVARIANT], align 16
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  %26 = alloca i64, align 8
  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 i64 %3, ptr %10, align 8, !tbaa !9
  store i32 %4, ptr %11, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  %27 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 48) #8
  %28 = load ptr, ptr %9, align 8, !tbaa !5
  %29 = load i64, ptr %10, align 8, !tbaa !9
  invoke void @_ZN15CInMemoryStreamC2EPKhy(ptr noundef nonnull align 8 dereferenceable(48) %27, ptr noundef %28, i64 noundef %29)
          to label %30 unwind label %49

30:                                               ; preds = %5
  store ptr %27, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  %31 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN9CMyComPtrI19ISequentialInStreamEC2EPS0_(ptr noundef nonnull align 8 dereferenceable(8) %15, ptr noundef %31)
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  %32 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 48) #8
          to label %33 unwind label %53

33:                                               ; preds = %30
  %34 = load ptr, ptr %7, align 8, !tbaa !5
  %35 = load ptr, ptr %8, align 8, !tbaa !5
  %36 = load i64, ptr %35, align 8, !tbaa !9
  invoke void @_ZN16COutMemoryStreamC2EPhy(ptr noundef nonnull align 8 dereferenceable(48) %32, ptr noundef %34, i64 noundef %36)
          to label %37 unwind label %57

37:                                               ; preds = %33
  store ptr %32, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #7
  %38 = load ptr, ptr %16, align 8, !tbaa !5
  invoke void @_ZN9CMyComPtrI20ISequentialOutStreamEC2EPS0_(ptr noundef nonnull align 8 dereferenceable(8) %17, ptr noundef %38)
          to label %39 unwind label %61

39:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #7
  %40 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 210680) #8
          to label %41 unwind label %65

41:                                               ; preds = %39
  invoke void @_ZN9NCompress5NLZMA8CEncoderC1Ev(ptr noundef nonnull align 8 dereferenceable(210678) %40)
          to label %42 unwind label %69

42:                                               ; preds = %41
  store ptr %40, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #7
  %43 = load ptr, ptr %18, align 8, !tbaa !5
  invoke void @_ZN9CMyComPtrI14ICompressCoderEC2EPS0_(ptr noundef nonnull align 8 dereferenceable(8) %19, ptr noundef %43)
          to label %44 unwind label %73

44:                                               ; preds = %42
  call void @llvm.lifetime.start.p0(i64 32, ptr %20) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %20, ptr align 16 @__const.compress2.propIDs, i64 32, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #7
  store i32 8, ptr %21, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 128, ptr %22) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #7
  store i32 0, ptr %23, align 4, !tbaa !11
  br label %45

45:                                               ; preds = %82, %44
  %46 = load i32, ptr %23, align 4, !tbaa !11
  %47 = icmp slt i32 %46, 6
  br i1 %47, label %77, label %48

48:                                               ; preds = %45
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #7
  br label %85

49:                                               ; preds = %5
  %50 = landingpad { ptr, i32 }
          cleanup
  %51 = extractvalue { ptr, i32 } %50, 0
  store ptr %51, ptr %13, align 8
  %52 = extractvalue { ptr, i32 } %50, 1
  store i32 %52, ptr %14, align 4
  call void @_ZdlPvm(ptr noundef %27, i64 noundef 48) #9
  br label %169

53:                                               ; preds = %30
  %54 = landingpad { ptr, i32 }
          cleanup
  %55 = extractvalue { ptr, i32 } %54, 0
  store ptr %55, ptr %13, align 8
  %56 = extractvalue { ptr, i32 } %54, 1
  store i32 %56, ptr %14, align 4
  br label %168

57:                                               ; preds = %33
  %58 = landingpad { ptr, i32 }
          cleanup
  %59 = extractvalue { ptr, i32 } %58, 0
  store ptr %59, ptr %13, align 8
  %60 = extractvalue { ptr, i32 } %58, 1
  store i32 %60, ptr %14, align 4
  call void @_ZdlPvm(ptr noundef %32, i64 noundef 48) #9
  br label %168

61:                                               ; preds = %37
  %62 = landingpad { ptr, i32 }
          cleanup
  %63 = extractvalue { ptr, i32 } %62, 0
  store ptr %63, ptr %13, align 8
  %64 = extractvalue { ptr, i32 } %62, 1
  store i32 %64, ptr %14, align 4
  br label %167

65:                                               ; preds = %39
  %66 = landingpad { ptr, i32 }
          cleanup
  %67 = extractvalue { ptr, i32 } %66, 0
  store ptr %67, ptr %13, align 8
  %68 = extractvalue { ptr, i32 } %66, 1
  store i32 %68, ptr %14, align 4
  br label %166

69:                                               ; preds = %41
  %70 = landingpad { ptr, i32 }
          cleanup
  %71 = extractvalue { ptr, i32 } %70, 0
  store ptr %71, ptr %13, align 8
  %72 = extractvalue { ptr, i32 } %70, 1
  store i32 %72, ptr %14, align 4
  call void @_ZdlPvm(ptr noundef %40, i64 noundef 210680) #9
  br label %166

73:                                               ; preds = %42
  %74 = landingpad { ptr, i32 }
          cleanup
  %75 = extractvalue { ptr, i32 } %74, 0
  store ptr %75, ptr %13, align 8
  %76 = extractvalue { ptr, i32 } %74, 1
  store i32 %76, ptr %14, align 4
  br label %165

77:                                               ; preds = %45
  %78 = load i32, ptr %23, align 4, !tbaa !11
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds [8 x %struct.tagPROPVARIANT], ptr %22, i64 0, i64 %79
  %81 = getelementptr inbounds %struct.tagPROPVARIANT, ptr %80, i32 0, i32 0
  store i16 19, ptr %81, align 16, !tbaa !13
  br label %82

82:                                               ; preds = %77
  %83 = load i32, ptr %23, align 4, !tbaa !11
  %84 = add nsw i32 %83, 1
  store i32 %84, ptr %23, align 4, !tbaa !11
  br label %45, !llvm.loop !16

85:                                               ; preds = %48
  %86 = load i32, ptr %11, align 4, !tbaa !11
  %87 = add nsw i32 %86, 14
  %88 = shl i32 1, %87
  %89 = getelementptr inbounds [8 x %struct.tagPROPVARIANT], ptr %22, i64 0, i64 0
  %90 = getelementptr inbounds %struct.tagPROPVARIANT, ptr %89, i32 0, i32 4
  store i32 %88, ptr %90, align 8, !tbaa !18
  %91 = getelementptr inbounds [8 x %struct.tagPROPVARIANT], ptr %22, i64 0, i64 1
  %92 = getelementptr inbounds %struct.tagPROPVARIANT, ptr %91, i32 0, i32 4
  store i32 2, ptr %92, align 8, !tbaa !18
  %93 = getelementptr inbounds [8 x %struct.tagPROPVARIANT], ptr %22, i64 0, i64 2
  %94 = getelementptr inbounds %struct.tagPROPVARIANT, ptr %93, i32 0, i32 4
  store i32 3, ptr %94, align 8, !tbaa !18
  %95 = getelementptr inbounds [8 x %struct.tagPROPVARIANT], ptr %22, i64 0, i64 3
  %96 = getelementptr inbounds %struct.tagPROPVARIANT, ptr %95, i32 0, i32 4
  store i32 0, ptr %96, align 8, !tbaa !18
  %97 = getelementptr inbounds [8 x %struct.tagPROPVARIANT], ptr %22, i64 0, i64 4
  %98 = getelementptr inbounds %struct.tagPROPVARIANT, ptr %97, i32 0, i32 4
  store i32 2, ptr %98, align 8, !tbaa !18
  %99 = getelementptr inbounds [8 x %struct.tagPROPVARIANT], ptr %22, i64 0, i64 5
  %100 = getelementptr inbounds %struct.tagPROPVARIANT, ptr %99, i32 0, i32 4
  store i32 128, ptr %100, align 8, !tbaa !18
  %101 = getelementptr inbounds [8 x %struct.tagPROPVARIANT], ptr %22, i64 0, i64 6
  %102 = getelementptr inbounds %struct.tagPROPVARIANT, ptr %101, i32 0, i32 0
  store i16 8, ptr %102, align 16, !tbaa !13
  %103 = getelementptr inbounds [8 x %struct.tagPROPVARIANT], ptr %22, i64 0, i64 6
  %104 = getelementptr inbounds %struct.tagPROPVARIANT, ptr %103, i32 0, i32 4
  store ptr @.str, ptr %104, align 8, !tbaa !18
  %105 = getelementptr inbounds [8 x %struct.tagPROPVARIANT], ptr %22, i64 0, i64 7
  %106 = getelementptr inbounds %struct.tagPROPVARIANT, ptr %105, i32 0, i32 0
  store i16 11, ptr %106, align 16, !tbaa !13
  %107 = getelementptr inbounds [8 x %struct.tagPROPVARIANT], ptr %22, i64 0, i64 7
  %108 = getelementptr inbounds %struct.tagPROPVARIANT, ptr %107, i32 0, i32 4
  store i16 -1, ptr %108, align 8, !tbaa !18
  %109 = load ptr, ptr %18, align 8, !tbaa !5
  %110 = getelementptr inbounds [8 x i32], ptr %20, i64 0, i64 0
  %111 = getelementptr inbounds [8 x %struct.tagPROPVARIANT], ptr %22, i64 0, i64 0
  %112 = load ptr, ptr %109, align 8, !tbaa !19
  %113 = getelementptr inbounds ptr, ptr %112, i64 5
  %114 = load ptr, ptr %113, align 8
  %115 = invoke noundef i32 %114(ptr noundef nonnull align 8 dereferenceable(210678) %109, ptr noundef %110, ptr noundef %111, i32 noundef 8)
          to label %116 unwind label %119

116:                                              ; preds = %85
  %117 = icmp ne i32 %115, 0
  br i1 %117, label %118, label %123

118:                                              ; preds = %116
  store i32 -4, ptr %6, align 4
  store i32 1, ptr %24, align 4
  br label %162

119:                                              ; preds = %85
  %120 = landingpad { ptr, i32 }
          cleanup
  %121 = extractvalue { ptr, i32 } %120, 0
  store ptr %121, ptr %13, align 8
  %122 = extractvalue { ptr, i32 } %120, 1
  store i32 %122, ptr %14, align 4
  br label %164

123:                                              ; preds = %116
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #7
  %124 = invoke noundef ptr @_ZNK9CMyComPtrI14ICompressCoderEptEv(ptr noundef nonnull align 8 dereferenceable(8) %19)
          to label %125 unwind label %138

125:                                              ; preds = %123
  %126 = invoke noundef ptr @_ZNK9CMyComPtrI19ISequentialInStreamEcvPS0_Ev(ptr noundef nonnull align 8 dereferenceable(8) %15)
          to label %127 unwind label %138

127:                                              ; preds = %125
  %128 = invoke noundef ptr @_ZNK9CMyComPtrI20ISequentialOutStreamEcvPS0_Ev(ptr noundef nonnull align 8 dereferenceable(8) %17)
          to label %129 unwind label %138

129:                                              ; preds = %127
  %130 = load ptr, ptr %124, align 8, !tbaa !19
  %131 = getelementptr inbounds ptr, ptr %130, i64 3
  %132 = load ptr, ptr %131, align 8
  %133 = invoke noundef i32 %132(ptr noundef nonnull align 8 dereferenceable(8) %124, ptr noundef %126, ptr noundef %128, ptr noundef null, ptr noundef null, ptr noundef null)
          to label %134 unwind label %138

134:                                              ; preds = %129
  store i32 %133, ptr %25, align 4, !tbaa !11
  %135 = load i32, ptr %25, align 4, !tbaa !11
  %136 = icmp eq i32 %135, -2147024882
  br i1 %136, label %137, label %142

137:                                              ; preds = %134
  store i32 -4, ptr %6, align 4
  store i32 1, ptr %24, align 4
  br label %160

138:                                              ; preds = %129, %127, %125, %123
  %139 = landingpad { ptr, i32 }
          cleanup
  %140 = extractvalue { ptr, i32 } %139, 0
  store ptr %140, ptr %13, align 8
  %141 = extractvalue { ptr, i32 } %139, 1
  store i32 %141, ptr %14, align 4
  br label %161

142:                                              ; preds = %134
  %143 = load i32, ptr %25, align 4, !tbaa !11
  %144 = icmp ne i32 %143, 0
  br i1 %144, label %145, label %146

145:                                              ; preds = %142
  store i32 -5, ptr %6, align 4
  store i32 1, ptr %24, align 4
  br label %160

146:                                              ; preds = %142
  br label %147

147:                                              ; preds = %146
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #7
  %148 = load ptr, ptr %16, align 8, !tbaa !5
  %149 = load ptr, ptr %148, align 8, !tbaa !19
  %150 = getelementptr inbounds ptr, ptr %149, i64 4
  %151 = load ptr, ptr %150, align 8
  %152 = invoke noundef i32 %151(ptr noundef nonnull align 8 dereferenceable(48) %148, i64 noundef 0, i32 noundef 2, ptr noundef %26)
          to label %153 unwind label %156

153:                                              ; preds = %147
  %154 = load i64, ptr %26, align 8, !tbaa !21
  %155 = load ptr, ptr %8, align 8, !tbaa !5
  store i64 %154, ptr %155, align 8, !tbaa !9
  store i32 0, ptr %6, align 4
  store i32 1, ptr %24, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #7
  br label %160

156:                                              ; preds = %147
  %157 = landingpad { ptr, i32 }
          cleanup
  %158 = extractvalue { ptr, i32 } %157, 0
  store ptr %158, ptr %13, align 8
  %159 = extractvalue { ptr, i32 } %157, 1
  store i32 %159, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #7
  br label %161

160:                                              ; preds = %153, %145, %137
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #7
  br label %162

161:                                              ; preds = %156, %138
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #7
  br label %164

162:                                              ; preds = %160, %118
  call void @llvm.lifetime.end.p0(i64 128, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %20) #7
  call void @_ZN9CMyComPtrI14ICompressCoderED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %19) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  call void @_ZN9CMyComPtrI20ISequentialOutStreamED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %17) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  call void @_ZN9CMyComPtrI19ISequentialInStreamED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  %163 = load i32, ptr %6, align 4
  ret i32 %163

164:                                              ; preds = %161, %119
  call void @llvm.lifetime.end.p0(i64 128, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %20) #7
  call void @_ZN9CMyComPtrI14ICompressCoderED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %19) #7
  br label %165

165:                                              ; preds = %164, %73
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  br label %166

166:                                              ; preds = %165, %69, %65
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  call void @_ZN9CMyComPtrI20ISequentialOutStreamED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %17) #7
  br label %167

167:                                              ; preds = %166, %61
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  br label %168

168:                                              ; preds = %167, %57, %53
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  call void @_ZN9CMyComPtrI19ISequentialInStreamED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  br label %169

169:                                              ; preds = %168, %49
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  br label %170

170:                                              ; preds = %169
  %171 = load ptr, ptr %13, align 8
  %172 = load i32, ptr %14, align 4
  %173 = insertvalue { ptr, i32 } poison, ptr %171, 0
  %174 = insertvalue { ptr, i32 } %173, i32 %172, 1
  resume { ptr, i32 } %174
}

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN15CInMemoryStreamC2EPKhy(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef, i64 noundef) unnamed_addr #0 align 2

declare i32 @__gxx_personality_v0(...)

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

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

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

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

declare void @_ZN9NCompress5NLZMA8CEncoderC1Ev(ptr noundef nonnull align 8 dereferenceable(210678)) unnamed_addr #5

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN9CMyComPtrI14ICompressCoderEC2EPS0_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) unnamed_addr #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) #6

; 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 dso_local noundef ptr @_ZNK9CMyComPtrI14ICompressCoderEptEv(ptr noundef nonnull align 8 dereferenceable(8)) #4 align 2

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN9CMyComPtrI19ISequentialInStreamED2Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #4 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 = { 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 #3 = { 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 #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 = { "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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #7 = { nounwind }
attributes #8 = { builtin allocsize(0) }
attributes #9 = { builtin 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 = !{!"long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !15, i64 0}
!14 = !{!"_ZTS14tagPROPVARIANT", !15, i64 0, !15, i64 2, !15, i64 4, !15, i64 6, !7, i64 8}
!15 = !{!"short", !7, i64 0}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = !{!7, !7, i64 0}
!19 = !{!20, !20, i64 0}
!20 = !{!"vtable pointer", !8, i64 0}
!21 = !{!22, !22, i64 0}
!22 = !{!"long long", !7, 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 = type { ptr }
%class.CMyComPtr.0 = type { ptr }
%class.CMyComPtr.5 = type { ptr }
%struct.tagPROPVARIANT = type { i16, i16, i16, i16, %union.anon }
%union.anon = type { %struct.LARGE_INTEGER }
%struct.LARGE_INTEGER = type { i64 }

@__const.compress2.propIDs = external hidden unnamed_addr constant [8 x i32], align 16
@.str = external hidden unnamed_addr constant [4 x i32], align 4

; Function Attrs: mustprogress uwtable
define dso_local range(i32 -5, 1) i32 @compress2(ptr noundef %0, ptr nocapture noundef %1, ptr noundef %2, i64 noundef %3, i32 noundef %4) local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %6 = alloca %class.CMyComPtr, align 8
  %7 = alloca %class.CMyComPtr.0, align 8
  %8 = alloca %class.CMyComPtr.5, align 8
  %9 = alloca [8 x i32], align 16
  %10 = alloca [8 x %struct.tagPROPVARIANT], align 16
  %11 = alloca i64, align 8
  %12 = tail call noalias noundef nonnull dereferenceable(48) ptr @_Znwm(i64 noundef 48) #7
  invoke void @_ZN15CInMemoryStreamC2EPKhy(ptr noundef nonnull align 8 dereferenceable(48) %12, ptr noundef %2, i64 noundef %3)
          to label %13 unwind label %43

13:                                               ; preds = %5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #8
  call void @_ZN9CMyComPtrI19ISequentialInStreamEC2EPS0_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull %12)
  %14 = invoke noalias noundef nonnull dereferenceable(48) ptr @_Znwm(i64 noundef 48) #7
          to label %15 unwind label %45

15:                                               ; preds = %13
  %16 = load i64, ptr %1, align 8, !tbaa !5
  call void @_ZN16COutMemoryStreamC2EPhy(ptr noundef nonnull align 8 dereferenceable(48) %14, ptr noundef %0, i64 noundef %16)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #8
  invoke void @_ZN9CMyComPtrI20ISequentialOutStreamEC2EPS0_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull %14)
          to label %17 unwind label %47

17:                                               ; preds = %15
  %18 = invoke noalias noundef nonnull dereferenceable(210680) ptr @_Znwm(i64 noundef 210680) #7
          to label %19 unwind label %49

19:                                               ; preds = %17
  invoke void @_ZN9NCompress5NLZMA8CEncoderC1Ev(ptr noundef nonnull align 8 dereferenceable(210678) %18)
          to label %20 unwind label %51

20:                                               ; preds = %19
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #8
  invoke void @_ZN9CMyComPtrI14ICompressCoderEC2EPS0_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull %18)
          to label %21 unwind label %53

21:                                               ; preds = %20
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %9) #8
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(32) %9, ptr noundef nonnull align 16 dereferenceable(32) @__const.compress2.propIDs, i64 32, i1 false)
  call void @llvm.lifetime.start.p0(i64 128, ptr nonnull %10) #8
  store i16 19, ptr %10, align 16, !tbaa !9
  %22 = getelementptr inbounds i8, ptr %10, i64 16
  store i16 19, ptr %22, align 16, !tbaa !9
  %23 = getelementptr inbounds i8, ptr %10, i64 32
  store i16 19, ptr %23, align 16, !tbaa !9
  %24 = getelementptr inbounds i8, ptr %10, i64 48
  store i16 19, ptr %24, align 16, !tbaa !9
  %25 = getelementptr inbounds i8, ptr %10, i64 64
  store i16 19, ptr %25, align 16, !tbaa !9
  %26 = getelementptr inbounds i8, ptr %10, i64 80
  store i16 19, ptr %26, align 16, !tbaa !9
  %27 = add nsw i32 %4, 14
  %28 = shl nuw i32 1, %27
  %29 = getelementptr inbounds i8, ptr %10, i64 8
  store i32 %28, ptr %29, align 8, !tbaa !12
  %30 = getelementptr inbounds i8, ptr %10, i64 24
  store i32 2, ptr %30, align 8, !tbaa !12
  %31 = getelementptr inbounds i8, ptr %10, i64 40
  store i32 3, ptr %31, align 8, !tbaa !12
  %32 = getelementptr inbounds i8, ptr %10, i64 56
  store i32 0, ptr %32, align 8, !tbaa !12
  %33 = getelementptr inbounds i8, ptr %10, i64 72
  store i32 2, ptr %33, align 8, !tbaa !12
  %34 = getelementptr inbounds i8, ptr %10, i64 88
  store i32 128, ptr %34, align 8, !tbaa !12
  %35 = getelementptr inbounds i8, ptr %10, i64 96
  store i16 8, ptr %35, align 16, !tbaa !9
  %36 = getelementptr inbounds i8, ptr %10, i64 104
  store ptr @.str, ptr %36, align 8, !tbaa !12
  %37 = getelementptr inbounds i8, ptr %10, i64 112
  store i16 11, ptr %37, align 16, !tbaa !9
  %38 = getelementptr inbounds i8, ptr %10, i64 120
  store i16 -1, ptr %38, align 8, !tbaa !12
  %39 = load ptr, ptr %18, align 8, !tbaa !13
  %40 = getelementptr inbounds i8, ptr %39, i64 40
  %41 = load ptr, ptr %40, align 8
  %42 = invoke noundef i32 %41(ptr noundef nonnull align 8 dereferenceable(210678) %18, ptr noundef nonnull %9, ptr noundef nonnull %10, i32 noundef 8)
          to label %55 unwind label %56

43:                                               ; preds = %5
  %44 = landingpad { ptr, i32 }
          cleanup
  tail call void @_ZdlPvm(ptr noundef nonnull %12, i64 noundef 48) #9
  br label %85

45:                                               ; preds = %13
  %46 = landingpad { ptr, i32 }
          cleanup
  br label %84

47:                                               ; preds = %15
  %48 = landingpad { ptr, i32 }
          cleanup
  br label %83

49:                                               ; preds = %17
  %50 = landingpad { ptr, i32 }
          cleanup
  br label %82

51:                                               ; preds = %19
  %52 = landingpad { ptr, i32 }
          cleanup
  call void @_ZdlPvm(ptr noundef nonnull %18, i64 noundef 210680) #9
  br label %82

53:                                               ; preds = %20
  %54 = landingpad { ptr, i32 }
          cleanup
  br label %81

55:                                               ; preds = %21
  %.not = icmp eq i32 %42, 0
  br i1 %.not, label %58, label %79

56:                                               ; preds = %21
  %57 = landingpad { ptr, i32 }
          cleanup
  br label %80

58:                                               ; preds = %55
  %59 = call noundef ptr @_ZNK9CMyComPtrI14ICompressCoderEptEv(ptr noundef nonnull align 8 dereferenceable(8) %8)
  %60 = call noundef ptr @_ZNK9CMyComPtrI19ISequentialInStreamEcvPS0_Ev(ptr noundef nonnull align 8 dereferenceable(8) %6)
  %61 = call noundef ptr @_ZNK9CMyComPtrI20ISequentialOutStreamEcvPS0_Ev(ptr noundef nonnull align 8 dereferenceable(8) %7)
  %62 = load ptr, ptr %59, align 8, !tbaa !13
  %63 = getelementptr inbounds i8, ptr %62, i64 24
  %64 = load ptr, ptr %63, align 8
  %65 = invoke noundef i32 %64(ptr noundef nonnull align 8 dereferenceable(8) %59, ptr noundef %60, ptr noundef %61, ptr noundef null, ptr noundef null, ptr noundef null)
          to label %66 unwind label %67

66:                                               ; preds = %58
  switch i32 %65, label %69 [
    i32 -2147024882, label %79
    i32 0, label %70
  ]

67:                                               ; preds = %58
  %68 = landingpad { ptr, i32 }
          cleanup
  br label %80

69:                                               ; preds = %66
  br label %79

70:                                               ; preds = %66
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #8
  %71 = load ptr, ptr %14, align 8, !tbaa !13
  %72 = getelementptr inbounds i8, ptr %71, i64 32
  %73 = load ptr, ptr %72, align 8
  %74 = invoke noundef i32 %73(ptr noundef nonnull align 8 dereferenceable(48) %14, i64 noundef 0, i32 noundef 2, ptr noundef nonnull %11)
          to label %75 unwind label %77

75:                                               ; preds = %70
  %76 = load i64, ptr %11, align 8, !tbaa !15
  store i64 %76, ptr %1, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #8
  br label %79

77:                                               ; preds = %70
  %78 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #8
  br label %80

79:                                               ; preds = %69, %75, %66, %55
  %.1 = phi i32 [ -4, %55 ], [ -5, %69 ], [ 0, %75 ], [ -4, %66 ]
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %10) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #8
  call void @_ZN9CMyComPtrI14ICompressCoderED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %8) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #8
  call void @_ZN9CMyComPtrI20ISequentialOutStreamED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %7) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #8
  call void @_ZN9CMyComPtrI19ISequentialInStreamED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #8
  ret i32 %.1

80:                                               ; preds = %67, %77, %56
  %.pn.pn = phi { ptr, i32 } [ %57, %56 ], [ %78, %77 ], [ %68, %67 ]
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %10) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #8
  call void @_ZN9CMyComPtrI14ICompressCoderED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %8) #8
  br label %81

81:                                               ; preds = %80, %53
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %80 ], [ %54, %53 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #8
  br label %82

82:                                               ; preds = %81, %51, %49
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn, %81 ], [ %52, %51 ], [ %50, %49 ]
  call void @_ZN9CMyComPtrI20ISequentialOutStreamED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %7) #8
  br label %83

83:                                               ; preds = %82, %47
  %.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn, %82 ], [ %48, %47 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #8
  br label %84

84:                                               ; preds = %83, %45
  %.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn.pn, %83 ], [ %46, %45 ]
  call void @_ZN9CMyComPtrI19ISequentialInStreamED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #8
  br label %85

85:                                               ; preds = %84, %43
  %.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn.pn.pn, %84 ], [ %44, %43 ]
  resume { ptr, i32 } %.pn.pn.pn.pn.pn.pn.pn
}

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN15CInMemoryStreamC2EPKhy(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef, i64 noundef) unnamed_addr #0 align 2

declare i32 @__gxx_personality_v0(...)

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

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

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

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

declare void @_ZN9NCompress5NLZMA8CEncoderC1Ev(ptr noundef nonnull align 8 dereferenceable(210678)) unnamed_addr #5

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

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

; 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 dso_local noundef ptr @_ZNK9CMyComPtrI14ICompressCoderEptEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #4 align 2

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN9CMyComPtrI19ISequentialInStreamED2Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #4 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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { 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 #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 = { "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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #7 = { builtin allocsize(0) }
attributes #8 = { nounwind }
attributes #9 = { builtin nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"long", !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, !14, i64 0}
!14 = !{!"vtable pointer", !8, i64 0}
!15 = !{!16, !16, i64 0}
!16 = !{!"long long", !7, i64 0}


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