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

; 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.4 = type { ptr }
%struct.tagPROPVARIANT = type { i16, i16, i16, i16, %union.anon }
%union.anon = type { %struct.LARGE_INTEGER }
%struct.LARGE_INTEGER = type { i64 }
%class.CMyComPtr.0 = type { ptr }
%class.CMyComPtr.5 = type { ptr }
%class.COutStreamRam = type <{ %struct.ISequentialOutStream, %class.CMyUnknownImp, [4 x i8], i64, ptr, i64, i8, [7 x i8] }>
%struct.ISequentialOutStream = type { %struct.IUnknown }
%struct.IUnknown = type { ptr }
%class.CMyUnknownImp = type { i32 }

@__const._Z13LzmaRamEncodePKhmPhmPmj13ESzFilterMode.propIDs = external hidden unnamed_addr constant [3 x i32], align 4

; 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 @_Z13LzmaRamEncodePKhmPhmPmj13ESzFilterMode(ptr noundef %0, i64 noundef %1, ptr noundef %2, i64 noundef %3, ptr noundef %4, i32 noundef %5, i32 noundef %6) #1 personality ptr @__gxx_personality_v0 {
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca i64, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i64, align 8
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i64, align 8
  %17 = alloca i64, align 8
  %18 = alloca i64, align 8
  %19 = alloca i32, align 4
  %20 = alloca ptr, align 8
  %21 = alloca ptr, align 8
  %22 = alloca i32, align 4
  %23 = alloca %class.CMyComPtr.4, align 8
  %24 = alloca [3 x i32], align 4
  %25 = alloca i32, align 4
  %26 = alloca [3 x %struct.tagPROPVARIANT], align 16
  %27 = alloca ptr, align 8
  %28 = alloca %class.CMyComPtr.0, align 8
  %29 = alloca ptr, align 8
  %30 = alloca %class.CMyComPtr.5, align 8
  %31 = alloca i32, align 4
  %32 = alloca i64, align 8
  %33 = alloca ptr, align 8
  %34 = alloca i8, align 1
  %35 = alloca i32, align 4
  %36 = alloca i32, align 4
  %37 = alloca i32, align 4
  %38 = alloca i32, align 4
  %39 = alloca i8, align 1
  %40 = alloca i32, align 4
  %41 = alloca i64, align 8
  %42 = alloca i8, align 1
  %43 = alloca i32, align 4
  store ptr %0, ptr %9, align 8, !tbaa !5
  store i64 %1, ptr %10, align 8, !tbaa !9
  store ptr %2, ptr %11, align 8, !tbaa !5
  store i64 %3, ptr %12, align 8, !tbaa !9
  store ptr %4, ptr %13, align 8, !tbaa !5
  store i32 %5, ptr %14, align 4, !tbaa !11
  store i32 %6, ptr %15, align 4, !tbaa !13
  %44 = load ptr, ptr %13, align 8, !tbaa !5
  store i64 0, ptr %44, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #10
  store i64 1, ptr %16, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #10
  store i64 5, ptr %17, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #10
  store i64 14, ptr %18, align 8, !tbaa !9
  %45 = load i64, ptr %12, align 8, !tbaa !9
  %46 = icmp ult i64 %45, 14
  br i1 %46, label %47, label %48

47:                                               ; preds = %7
  store i32 3, ptr %8, align 4
  store i32 1, ptr %19, align 4
  br label %378

48:                                               ; preds = %7
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #10
  %49 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 210680) #11
          to label %50 unwind label %77

50:                                               ; preds = %48
  invoke void @_ZN9NCompress5NLZMA8CEncoderC1Ev(ptr noundef nonnull align 8 dereferenceable(210678) %49)
          to label %51 unwind label %81

51:                                               ; preds = %50
  store ptr %49, ptr %20, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #10
  %52 = load ptr, ptr %20, align 8, !tbaa !5
  invoke void @_ZN9CMyComPtrI14ICompressCoderEC2EPS0_(ptr noundef nonnull align 8 dereferenceable(8) %23, ptr noundef %52)
          to label %53 unwind label %85

53:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 12, ptr %24) #10
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %24, ptr align 4 @__const._Z13LzmaRamEncodePKhmPhmPmj13ESzFilterMode.propIDs, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #10
  store i32 3, ptr %25, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 48, ptr %26) #10
  %54 = getelementptr inbounds [3 x %struct.tagPROPVARIANT], ptr %26, i64 0, i64 0
  %55 = getelementptr inbounds %struct.tagPROPVARIANT, ptr %54, i32 0, i32 0
  store i16 19, ptr %55, align 16, !tbaa !15
  %56 = getelementptr inbounds [3 x %struct.tagPROPVARIANT], ptr %26, i64 0, i64 1
  %57 = getelementptr inbounds %struct.tagPROPVARIANT, ptr %56, i32 0, i32 0
  store i16 19, ptr %57, align 16, !tbaa !15
  %58 = getelementptr inbounds [3 x %struct.tagPROPVARIANT], ptr %26, i64 0, i64 2
  %59 = getelementptr inbounds %struct.tagPROPVARIANT, ptr %58, i32 0, i32 0
  store i16 19, ptr %59, align 16, !tbaa !15
  %60 = getelementptr inbounds [3 x %struct.tagPROPVARIANT], ptr %26, i64 0, i64 0
  %61 = getelementptr inbounds %struct.tagPROPVARIANT, ptr %60, i32 0, i32 4
  store i32 2, ptr %61, align 8, !tbaa !18
  %62 = load i32, ptr %14, align 4, !tbaa !11
  %63 = getelementptr inbounds [3 x %struct.tagPROPVARIANT], ptr %26, i64 0, i64 1
  %64 = getelementptr inbounds %struct.tagPROPVARIANT, ptr %63, i32 0, i32 4
  store i32 %62, ptr %64, align 8, !tbaa !18
  %65 = getelementptr inbounds [3 x %struct.tagPROPVARIANT], ptr %26, i64 0, i64 2
  %66 = getelementptr inbounds %struct.tagPROPVARIANT, ptr %65, i32 0, i32 4
  store i32 64, ptr %66, align 8, !tbaa !18
  %67 = load ptr, ptr %20, align 8, !tbaa !5
  %68 = getelementptr inbounds [3 x i32], ptr %24, i64 0, i64 0
  %69 = getelementptr inbounds [3 x %struct.tagPROPVARIANT], ptr %26, i64 0, i64 0
  %70 = load ptr, ptr %67, align 8, !tbaa !19
  %71 = getelementptr inbounds ptr, ptr %70, i64 5
  %72 = load ptr, ptr %71, align 8
  %73 = invoke noundef i32 %72(ptr noundef nonnull align 8 dereferenceable(210678) %67, ptr noundef %68, ptr noundef %69, i32 noundef 3)
          to label %74 unwind label %89

74:                                               ; preds = %53
  %75 = icmp ne i32 %73, 0
  br i1 %75, label %76, label %93

76:                                               ; preds = %74
  store i32 1, ptr %8, align 4
  store i32 1, ptr %19, align 4
  br label %371

77:                                               ; preds = %48
  %78 = landingpad { ptr, i32 }
          catch ptr null
  %79 = extractvalue { ptr, i32 } %78, 0
  store ptr %79, ptr %21, align 8
  %80 = extractvalue { ptr, i32 } %78, 1
  store i32 %80, ptr %22, align 4
  br label %374

81:                                               ; preds = %50
  %82 = landingpad { ptr, i32 }
          catch ptr null
  %83 = extractvalue { ptr, i32 } %82, 0
  store ptr %83, ptr %21, align 8
  %84 = extractvalue { ptr, i32 } %82, 1
  store i32 %84, ptr %22, align 4
  call void @_ZdlPvm(ptr noundef %49, i64 noundef 210680) #12
  br label %374

85:                                               ; preds = %51
  %86 = landingpad { ptr, i32 }
          catch ptr null
  %87 = extractvalue { ptr, i32 } %86, 0
  store ptr %87, ptr %21, align 8
  %88 = extractvalue { ptr, i32 } %86, 1
  store i32 %88, ptr %22, align 4
  br label %373

89:                                               ; preds = %53
  %90 = landingpad { ptr, i32 }
          catch ptr null
  %91 = extractvalue { ptr, i32 } %90, 0
  store ptr %91, ptr %21, align 8
  %92 = extractvalue { ptr, i32 } %90, 1
  store i32 %92, ptr %22, align 4
  br label %372

93:                                               ; preds = %74
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #10
  %94 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 48) #11
          to label %95 unwind label %100

95:                                               ; preds = %93
  invoke void @_ZN13COutStreamRamC2Ev(ptr noundef nonnull align 8 dereferenceable(41) %94)
          to label %96 unwind label %104

96:                                               ; preds = %95
  store ptr %94, ptr %27, align 8, !tbaa !5
  %97 = load ptr, ptr %27, align 8, !tbaa !5
  %98 = icmp eq ptr %97, null
  br i1 %98, label %99, label %108

99:                                               ; preds = %96
  store i32 2, ptr %8, align 4
  store i32 1, ptr %19, align 4
  br label %369

100:                                              ; preds = %93
  %101 = landingpad { ptr, i32 }
          catch ptr null
  %102 = extractvalue { ptr, i32 } %101, 0
  store ptr %102, ptr %21, align 8
  %103 = extractvalue { ptr, i32 } %101, 1
  store i32 %103, ptr %22, align 4
  br label %370

104:                                              ; preds = %95
  %105 = landingpad { ptr, i32 }
          catch ptr null
  %106 = extractvalue { ptr, i32 } %105, 0
  store ptr %106, ptr %21, align 8
  %107 = extractvalue { ptr, i32 } %105, 1
  store i32 %107, ptr %22, align 4
  call void @_ZdlPvm(ptr noundef %94, i64 noundef 48) #12
  br label %370

108:                                              ; preds = %96
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #10
  %109 = load ptr, ptr %27, align 8, !tbaa !5
  invoke void @_ZN9CMyComPtrI20ISequentialOutStreamEC2EPS0_(ptr noundef nonnull align 8 dereferenceable(8) %28, ptr noundef %109)
          to label %110 unwind label %117

110:                                              ; preds = %108
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #10
  %111 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 40) #11
          to label %112 unwind label %121

112:                                              ; preds = %110
  invoke void @_ZN12CInStreamRamC2Ev(ptr noundef nonnull align 8 dereferenceable(40) %111)
          to label %113 unwind label %125

113:                                              ; preds = %112
  store ptr %111, ptr %29, align 8, !tbaa !5
  %114 = load ptr, ptr %29, align 8, !tbaa !5
  %115 = icmp eq ptr %114, null
  br i1 %115, label %116, label %129

116:                                              ; preds = %113
  store i32 2, ptr %8, align 4
  store i32 1, ptr %19, align 4
  br label %366

117:                                              ; preds = %108
  %118 = landingpad { ptr, i32 }
          catch ptr null
  %119 = extractvalue { ptr, i32 } %118, 0
  store ptr %119, ptr %21, align 8
  %120 = extractvalue { ptr, i32 } %118, 1
  store i32 %120, ptr %22, align 4
  br label %368

121:                                              ; preds = %110
  %122 = landingpad { ptr, i32 }
          catch ptr null
  %123 = extractvalue { ptr, i32 } %122, 0
  store ptr %123, ptr %21, align 8
  %124 = extractvalue { ptr, i32 } %122, 1
  store i32 %124, ptr %22, align 4
  br label %367

125:                                              ; preds = %112
  %126 = landingpad { ptr, i32 }
          catch ptr null
  %127 = extractvalue { ptr, i32 } %126, 0
  store ptr %127, ptr %21, align 8
  %128 = extractvalue { ptr, i32 } %126, 1
  store i32 %128, ptr %22, align 4
  call void @_ZdlPvm(ptr noundef %111, i64 noundef 40) #12
  br label %367

129:                                              ; preds = %113
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #10
  %130 = load ptr, ptr %29, align 8, !tbaa !5
  invoke void @_ZN9CMyComPtrI19ISequentialInStreamEC2EPS0_(ptr noundef nonnull align 8 dereferenceable(8) %30, ptr noundef %130)
          to label %131 unwind label %141

131:                                              ; preds = %129
  %132 = load ptr, ptr %27, align 8, !tbaa !5
  %133 = load ptr, ptr %11, align 8, !tbaa !5
  %134 = load i64, ptr %12, align 8, !tbaa !9
  invoke void @_ZN13COutStreamRam4InitEPhm(ptr noundef nonnull align 8 dereferenceable(41) %132, ptr noundef %133, i64 noundef %134)
          to label %135 unwind label %145

135:                                              ; preds = %131
  %136 = load ptr, ptr %27, align 8, !tbaa !5
  %137 = invoke noundef i32 @_ZN13COutStreamRam9WriteByteEh(ptr noundef nonnull align 8 dereferenceable(41) %136, i8 noundef zeroext 0)
          to label %138 unwind label %145

138:                                              ; preds = %135
  %139 = icmp ne i32 %137, 0
  br i1 %139, label %140, label %149

140:                                              ; preds = %138
  store i32 3, ptr %8, align 4
  store i32 1, ptr %19, align 4
  br label %363

141:                                              ; preds = %129
  %142 = landingpad { ptr, i32 }
          catch ptr null
  %143 = extractvalue { ptr, i32 } %142, 0
  store ptr %143, ptr %21, align 8
  %144 = extractvalue { ptr, i32 } %142, 1
  store i32 %144, ptr %22, align 4
  br label %365

145:                                              ; preds = %152, %149, %135, %131
  %146 = landingpad { ptr, i32 }
          catch ptr null
  %147 = extractvalue { ptr, i32 } %146, 0
  store ptr %147, ptr %21, align 8
  %148 = extractvalue { ptr, i32 } %146, 1
  store i32 %148, ptr %22, align 4
  br label %364

149:                                              ; preds = %138
  %150 = load ptr, ptr %20, align 8, !tbaa !5
  %151 = invoke noundef ptr @_ZNK9CMyComPtrI20ISequentialOutStreamEcvPS0_Ev(ptr noundef nonnull align 8 dereferenceable(8) %28)
          to label %152 unwind label %145

152:                                              ; preds = %149
  %153 = load ptr, ptr %150, align 8, !tbaa !19
  %154 = getelementptr inbounds ptr, ptr %153, i64 6
  %155 = load ptr, ptr %154, align 8
  %156 = invoke noundef i32 %155(ptr noundef nonnull align 8 dereferenceable(210678) %150, ptr noundef %151)
          to label %157 unwind label %145

157:                                              ; preds = %152
  %158 = icmp ne i32 %156, 0
  br i1 %158, label %159, label %160

159:                                              ; preds = %157
  store i32 3, ptr %8, align 4
  store i32 1, ptr %19, align 4
  br label %363

160:                                              ; preds = %157
  %161 = load ptr, ptr %27, align 8, !tbaa !5
  %162 = getelementptr inbounds %class.COutStreamRam, ptr %161, i32 0, i32 5
  %163 = load i64, ptr %162, align 8, !tbaa !21
  %164 = icmp ne i64 %163, 6
  br i1 %164, label %165, label %166

165:                                              ; preds = %160
  store i32 1, ptr %8, align 4
  store i32 1, ptr %19, align 4
  br label %363

166:                                              ; preds = %160
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #10
  store i32 0, ptr %31, align 4, !tbaa !11
  br label %167

167:                                              ; preds = %191, %166
  %168 = load i32, ptr %31, align 4, !tbaa !11
  %169 = icmp slt i32 %168, 8
  br i1 %169, label %170, label %194

170:                                              ; preds = %167
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #10
  %171 = load i64, ptr %10, align 8, !tbaa !9
  store i64 %171, ptr %32, align 8, !tbaa !27
  %172 = load ptr, ptr %27, align 8, !tbaa !5
  %173 = load i64, ptr %32, align 8, !tbaa !27
  %174 = load i32, ptr %31, align 4, !tbaa !11
  %175 = mul nsw i32 8, %174
  %176 = zext i32 %175 to i64
  %177 = lshr i64 %173, %176
  %178 = trunc i64 %177 to i8
  %179 = invoke noundef i32 @_ZN13COutStreamRam9WriteByteEh(ptr noundef nonnull align 8 dereferenceable(41) %172, i8 noundef zeroext %178)
          to label %180 unwind label %183

180:                                              ; preds = %170
  %181 = icmp ne i32 %179, 0
  br i1 %181, label %182, label %187

182:                                              ; preds = %180
  store i32 3, ptr %8, align 4
  store i32 1, ptr %19, align 4
  br label %188

183:                                              ; preds = %170
  %184 = landingpad { ptr, i32 }
          catch ptr null
  %185 = extractvalue { ptr, i32 } %184, 0
  store ptr %185, ptr %21, align 8
  %186 = extractvalue { ptr, i32 } %184, 1
  store i32 %186, ptr %22, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #10
  br label %362

187:                                              ; preds = %180
  store i32 0, ptr %19, align 4
  br label %188

188:                                              ; preds = %187, %182
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #10
  %189 = load i32, ptr %19, align 4
  switch i32 %189, label %361 [
    i32 0, label %190
  ]

190:                                              ; preds = %188
  br label %191

191:                                              ; preds = %190
  %192 = load i32, ptr %31, align 4, !tbaa !11
  %193 = add nsw i32 %192, 1
  store i32 %193, ptr %31, align 4, !tbaa !11
  br label %167, !llvm.loop !29

194:                                              ; preds = %167
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #10
  store ptr null, ptr %33, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %34) #10
  %195 = load i32, ptr %15, align 4, !tbaa !13
  %196 = icmp ne i32 %195, 0
  %197 = zext i1 %196 to i8
  store i8 %197, ptr %34, align 1, !tbaa !31
  %198 = load i8, ptr %34, align 1, !tbaa !31, !range !32, !noundef !33
  %199 = trunc i8 %198 to i1
  br i1 %199, label %200, label %223

200:                                              ; preds = %194
  %201 = load i64, ptr %10, align 8, !tbaa !9
  %202 = icmp ne i64 %201, 0
  br i1 %202, label %203, label %213

203:                                              ; preds = %200
  %204 = load i64, ptr %10, align 8, !tbaa !9
  %205 = call noundef ptr @_Z7MyAllocm(i64 noundef %204) #10
  store ptr %205, ptr %33, align 8, !tbaa !5
  %206 = load ptr, ptr %33, align 8, !tbaa !5
  %207 = icmp eq ptr %206, null
  br i1 %207, label %208, label %209

208:                                              ; preds = %203
  store i32 2, ptr %8, align 4
  store i32 1, ptr %19, align 4
  br label %359

209:                                              ; preds = %203
  %210 = load ptr, ptr %33, align 8, !tbaa !5
  %211 = load ptr, ptr %9, align 8, !tbaa !5
  %212 = load i64, ptr %10, align 8, !tbaa !9
  call void @llvm.memmove.p0.p0.i64(ptr align 1 %210, ptr align 1 %211, i64 %212, i1 false)
  br label %213

213:                                              ; preds = %209, %200
  call void @llvm.lifetime.start.p0(i64 4, ptr %35) #10
  call void @llvm.lifetime.start.p0(i64 4, ptr %36) #10
  store i32 0, ptr %35, align 4, !tbaa !11
  store i32 -5, ptr %36, align 4, !tbaa !11
  %214 = load ptr, ptr %33, align 8, !tbaa !5
  %215 = load i64, ptr %10, align 8, !tbaa !9
  %216 = trunc i64 %215 to i32
  %217 = invoke i32 @x86_Convert(ptr noundef %214, i32 noundef %216, i32 noundef 0, ptr noundef %35, ptr noundef %36, i32 noundef 1)
          to label %218 unwind label %219

218:                                              ; preds = %213
  call void @llvm.lifetime.end.p0(i64 4, ptr %36) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #10
  br label %223

219:                                              ; preds = %213
  %220 = landingpad { ptr, i32 }
          catch ptr null
  %221 = extractvalue { ptr, i32 } %220, 0
  store ptr %221, ptr %21, align 8
  %222 = extractvalue { ptr, i32 } %220, 1
  store i32 %222, ptr %22, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %36) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #10
  br label %360

223:                                              ; preds = %218, %194
  call void @llvm.lifetime.start.p0(i64 4, ptr %37) #10
  store i32 0, ptr %37, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %38) #10
  %224 = load i32, ptr %15, align 4, !tbaa !13
  %225 = icmp eq i32 %224, 2
  %226 = zext i1 %225 to i64
  %227 = select i1 %225, i32 3, i32 1
  store i32 %227, ptr %38, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 1, ptr %39) #10
  store i8 0, ptr %39, align 1, !tbaa !31
  call void @llvm.lifetime.start.p0(i64 4, ptr %40) #10
  store i32 0, ptr %40, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %41) #10
  %228 = load ptr, ptr %27, align 8, !tbaa !5
  %229 = getelementptr inbounds %class.COutStreamRam, ptr %228, i32 0, i32 5
  %230 = load i64, ptr %229, align 8, !tbaa !21
  store i64 %230, ptr %41, align 8, !tbaa !9
  store i32 0, ptr %31, align 4, !tbaa !11
  br label %231

231:                                              ; preds = %337, %223
  %232 = load i32, ptr %31, align 4, !tbaa !11
  %233 = load i32, ptr %38, align 4, !tbaa !11
  %234 = icmp slt i32 %232, %233
  br i1 %234, label %235, label %341

235:                                              ; preds = %231
  %236 = load i32, ptr %38, align 4, !tbaa !11
  %237 = icmp sgt i32 %236, 1
  br i1 %237, label %238, label %247

238:                                              ; preds = %235
  %239 = load i32, ptr %31, align 4, !tbaa !11
  %240 = load i32, ptr %38, align 4, !tbaa !11
  %241 = sub nsw i32 %240, 1
  %242 = icmp eq i32 %239, %241
  br i1 %242, label %243, label %247

243:                                              ; preds = %238
  %244 = load i8, ptr %39, align 1, !tbaa !31, !range !32, !noundef !33
  %245 = trunc i8 %244 to i1
  br i1 %245, label %247, label %246

246:                                              ; preds = %243
  br label %341

247:                                              ; preds = %243, %238, %235
  %248 = load ptr, ptr %27, align 8, !tbaa !5
  %249 = load i64, ptr %41, align 8, !tbaa !9
  invoke void @_ZN13COutStreamRam6SetPosEm(ptr noundef nonnull align 8 dereferenceable(41) %248, i64 noundef %249)
          to label %250 unwind label %257

250:                                              ; preds = %247
  call void @llvm.lifetime.start.p0(i64 1, ptr %42) #10
  store i8 0, ptr %42, align 1, !tbaa !31
  %251 = load i8, ptr %34, align 1, !tbaa !31, !range !32, !noundef !33
  %252 = trunc i8 %251 to i1
  br i1 %252, label %253, label %261

253:                                              ; preds = %250
  %254 = load i32, ptr %31, align 4, !tbaa !11
  %255 = icmp eq i32 %254, 0
  br i1 %255, label %256, label %261

256:                                              ; preds = %253
  store i8 1, ptr %42, align 1, !tbaa !31
  br label %261

257:                                              ; preds = %247
  %258 = landingpad { ptr, i32 }
          catch ptr null
  %259 = extractvalue { ptr, i32 } %258, 0
  store ptr %259, ptr %21, align 8
  %260 = extractvalue { ptr, i32 } %258, 1
  store i32 %260, ptr %22, align 4
  br label %358

261:                                              ; preds = %256, %253, %250
  %262 = load i32, ptr %38, align 4, !tbaa !11
  %263 = icmp sgt i32 %262, 1
  br i1 %263, label %264, label %270

264:                                              ; preds = %261
  %265 = load i32, ptr %31, align 4, !tbaa !11
  %266 = load i32, ptr %38, align 4, !tbaa !11
  %267 = sub nsw i32 %266, 1
  %268 = icmp eq i32 %265, %267
  br i1 %268, label %269, label %270

269:                                              ; preds = %264
  store i8 1, ptr %42, align 1, !tbaa !31
  br label %270

270:                                              ; preds = %269, %264, %261
  %271 = load ptr, ptr %29, align 8, !tbaa !5
  %272 = load i8, ptr %42, align 1, !tbaa !31, !range !32, !noundef !33
  %273 = trunc i8 %272 to i1
  br i1 %273, label %274, label %276

274:                                              ; preds = %270
  %275 = load ptr, ptr %33, align 8, !tbaa !5
  br label %278

276:                                              ; preds = %270
  %277 = load ptr, ptr %9, align 8, !tbaa !5
  br label %278

278:                                              ; preds = %276, %274
  %279 = phi ptr [ %275, %274 ], [ %277, %276 ]
  %280 = load i64, ptr %10, align 8, !tbaa !9
  invoke void @_ZN12CInStreamRam4InitEPKhm(ptr noundef nonnull align 8 dereferenceable(40) %271, ptr noundef %279, i64 noundef %280)
          to label %281 unwind label %296

281:                                              ; preds = %278
  call void @llvm.lifetime.start.p0(i64 4, ptr %43) #10
  %282 = invoke noundef ptr @_ZNK9CMyComPtrI14ICompressCoderEptEv(ptr noundef nonnull align 8 dereferenceable(8) %23)
          to label %283 unwind label %300

283:                                              ; preds = %281
  %284 = invoke noundef ptr @_ZNK9CMyComPtrI19ISequentialInStreamEcvPS0_Ev(ptr noundef nonnull align 8 dereferenceable(8) %30)
          to label %285 unwind label %300

285:                                              ; preds = %283
  %286 = invoke noundef ptr @_ZNK9CMyComPtrI20ISequentialOutStreamEcvPS0_Ev(ptr noundef nonnull align 8 dereferenceable(8) %28)
          to label %287 unwind label %300

287:                                              ; preds = %285
  %288 = load ptr, ptr %282, align 8, !tbaa !19
  %289 = getelementptr inbounds ptr, ptr %288, i64 3
  %290 = load ptr, ptr %289, align 8
  %291 = invoke noundef i32 %290(ptr noundef nonnull align 8 dereferenceable(8) %282, ptr noundef %284, ptr noundef %286, ptr noundef null, ptr noundef null, ptr noundef null)
          to label %292 unwind label %300

292:                                              ; preds = %287
  store i32 %291, ptr %43, align 4, !tbaa !11
  store i32 0, ptr %40, align 4, !tbaa !11
  %293 = load i32, ptr %43, align 4, !tbaa !11
  %294 = icmp eq i32 %293, -2147024882
  br i1 %294, label %295, label %304

295:                                              ; preds = %292
  store i32 2, ptr %40, align 4, !tbaa !11
  store i32 5, ptr %19, align 4
  br label %334

296:                                              ; preds = %278
  %297 = landingpad { ptr, i32 }
          catch ptr null
  %298 = extractvalue { ptr, i32 } %297, 0
  store ptr %298, ptr %21, align 8
  %299 = extractvalue { ptr, i32 } %297, 1
  store i32 %299, ptr %22, align 4
  br label %340

300:                                              ; preds = %287, %285, %283, %281
  %301 = landingpad { ptr, i32 }
          catch ptr null
  %302 = extractvalue { ptr, i32 } %301, 0
  store ptr %302, ptr %21, align 8
  %303 = extractvalue { ptr, i32 } %301, 1
  store i32 %303, ptr %22, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %43) #10
  br label %340

304:                                              ; preds = %292
  %305 = load i32, ptr %31, align 4, !tbaa !11
  %306 = icmp eq i32 %305, 0
  br i1 %306, label %314, label %307

307:                                              ; preds = %304
  %308 = load ptr, ptr %27, align 8, !tbaa !5
  %309 = getelementptr inbounds %class.COutStreamRam, ptr %308, i32 0, i32 5
  %310 = load i64, ptr %309, align 8, !tbaa !21
  %311 = load i32, ptr %37, align 4, !tbaa !11
  %312 = zext i32 %311 to i64
  %313 = icmp ule i64 %310, %312
  br i1 %313, label %314, label %322

314:                                              ; preds = %307, %304
  %315 = load ptr, ptr %27, align 8, !tbaa !5
  %316 = getelementptr inbounds %class.COutStreamRam, ptr %315, i32 0, i32 5
  %317 = load i64, ptr %316, align 8, !tbaa !21
  %318 = trunc i64 %317 to i32
  store i32 %318, ptr %37, align 4, !tbaa !11
  %319 = load i8, ptr %42, align 1, !tbaa !31, !range !32, !noundef !33
  %320 = trunc i8 %319 to i1
  %321 = zext i1 %320 to i8
  store i8 %321, ptr %39, align 1, !tbaa !31
  br label %322

322:                                              ; preds = %314, %307
  %323 = load ptr, ptr %27, align 8, !tbaa !5
  %324 = getelementptr inbounds %class.COutStreamRam, ptr %323, i32 0, i32 6
  %325 = load i8, ptr %324, align 8, !tbaa !34, !range !32, !noundef !33
  %326 = trunc i8 %325 to i1
  br i1 %326, label %327, label %328

327:                                              ; preds = %322
  store i32 3, ptr %40, align 4, !tbaa !11
  br label %333

328:                                              ; preds = %322
  %329 = load i32, ptr %43, align 4, !tbaa !11
  %330 = icmp ne i32 %329, 0
  br i1 %330, label %331, label %332

331:                                              ; preds = %328
  store i32 1, ptr %40, align 4, !tbaa !11
  store i32 5, ptr %19, align 4
  br label %334

332:                                              ; preds = %328
  br label %333

333:                                              ; preds = %332, %327
  store i32 0, ptr %19, align 4
  br label %334

334:                                              ; preds = %333, %331, %295
  call void @llvm.lifetime.end.p0(i64 4, ptr %43) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr %42) #10
  %335 = load i32, ptr %19, align 4
  switch i32 %335, label %382 [
    i32 0, label %336
    i32 5, label %341
  ]

336:                                              ; preds = %334
  br label %337

337:                                              ; preds = %336
  %338 = load i32, ptr %31, align 4, !tbaa !11
  %339 = add nsw i32 %338, 1
  store i32 %339, ptr %31, align 4, !tbaa !11
  br label %231, !llvm.loop !35

340:                                              ; preds = %300, %296
  call void @llvm.lifetime.end.p0(i64 1, ptr %42) #10
  br label %358

341:                                              ; preds = %334, %246, %231
  %342 = load ptr, ptr %27, align 8, !tbaa !5
  %343 = getelementptr inbounds %class.COutStreamRam, ptr %342, i32 0, i32 5
  %344 = load i64, ptr %343, align 8, !tbaa !21
  %345 = load ptr, ptr %13, align 8, !tbaa !5
  store i64 %344, ptr %345, align 8, !tbaa !9
  %346 = load i8, ptr %39, align 1, !tbaa !31, !range !32, !noundef !33
  %347 = trunc i8 %346 to i1
  br i1 %347, label %348, label %351

348:                                              ; preds = %341
  %349 = load ptr, ptr %11, align 8, !tbaa !5
  %350 = getelementptr inbounds i8, ptr %349, i64 0
  store i8 1, ptr %350, align 1, !tbaa !18
  br label %351

351:                                              ; preds = %348, %341
  %352 = load i8, ptr %34, align 1, !tbaa !31, !range !32, !noundef !33
  %353 = trunc i8 %352 to i1
  br i1 %353, label %354, label %356

354:                                              ; preds = %351
  %355 = load ptr, ptr %33, align 8, !tbaa !5
  call void @_Z6MyFreePv(ptr noundef %355) #10
  br label %356

356:                                              ; preds = %354, %351
  %357 = load i32, ptr %40, align 4, !tbaa !11
  store i32 %357, ptr %8, align 4
  store i32 1, ptr %19, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %41) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %40) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr %39) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %38) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %37) #10
  br label %359

358:                                              ; preds = %340, %257
  call void @llvm.lifetime.end.p0(i64 8, ptr %41) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %40) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr %39) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %38) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %37) #10
  br label %360

359:                                              ; preds = %356, %208
  call void @llvm.lifetime.end.p0(i64 1, ptr %34) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #10
  br label %361

360:                                              ; preds = %358, %219
  call void @llvm.lifetime.end.p0(i64 1, ptr %34) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #10
  br label %362

361:                                              ; preds = %359, %188
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #10
  br label %363

362:                                              ; preds = %360, %183
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #10
  br label %364

363:                                              ; preds = %361, %165, %159, %140
  call void @_ZN9CMyComPtrI19ISequentialInStreamED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %30) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #10
  br label %366

364:                                              ; preds = %362, %145
  call void @_ZN9CMyComPtrI19ISequentialInStreamED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %30) #10
  br label %365

365:                                              ; preds = %364, %141
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #10
  br label %367

366:                                              ; preds = %363, %116
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #10
  call void @_ZN9CMyComPtrI20ISequentialOutStreamED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %28) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #10
  br label %369

367:                                              ; preds = %365, %125, %121
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #10
  call void @_ZN9CMyComPtrI20ISequentialOutStreamED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %28) #10
  br label %368

368:                                              ; preds = %367, %117
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #10
  br label %370

369:                                              ; preds = %366, %99
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #10
  br label %371

370:                                              ; preds = %368, %104, %100
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #10
  br label %372

371:                                              ; preds = %369, %76
  call void @llvm.lifetime.end.p0(i64 48, ptr %26) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #10
  call void @llvm.lifetime.end.p0(i64 12, ptr %24) #10
  call void @_ZN9CMyComPtrI14ICompressCoderED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %23) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #10
  br label %378

372:                                              ; preds = %370, %89
  call void @llvm.lifetime.end.p0(i64 48, ptr %26) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #10
  call void @llvm.lifetime.end.p0(i64 12, ptr %24) #10
  call void @_ZN9CMyComPtrI14ICompressCoderED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %23) #10
  br label %373

373:                                              ; preds = %372, %85
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #10
  br label %374

374:                                              ; preds = %373, %81, %77
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #10
  br label %375

375:                                              ; preds = %374
  %376 = load ptr, ptr %21, align 8
  %377 = call ptr @__cxa_begin_catch(ptr %376) #10
  store i32 2, ptr %8, align 4
  store i32 1, ptr %19, align 4
  call void @__cxa_end_catch()
  br label %380

378:                                              ; preds = %371, %47
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #10
  br label %380

379:                                              ; No predecessors!
  unreachable

380:                                              ; preds = %378, %375
  %381 = load i32, ptr %8, align 4
  ret i32 %381

382:                                              ; preds = %334
  unreachable
}

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

declare i32 @__gxx_personality_v0(...)

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN13COutStreamRamC2Ev(ptr noundef nonnull align 8 dereferenceable(41)) unnamed_addr #6 align 2

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

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

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

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

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

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

; Function Attrs: nounwind
declare noundef ptr @_Z7MyAllocm(i64 noundef) #9

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

declare i32 @x86_Convert(ptr noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef, i32 noundef) #3

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

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

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

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

; Function Attrs: nounwind
declare void @_Z6MyFreePv(ptr noundef) #9

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

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

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

declare ptr @__cxa_begin_catch(ptr)

declare void @__cxa_end_catch()

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 = { 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 = { "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 = { 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 #5 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #6 = { inlinehint 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 #7 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #8 = { 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 #9 = { 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 #10 = { nounwind }
attributes #11 = { builtin allocsize(0) }
attributes #12 = { 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, !14, i64 0}
!14 = !{!"_ZTS13ESzFilterMode", !7, i64 0}
!15 = !{!16, !17, i64 0}
!16 = !{!"_ZTS14tagPROPVARIANT", !17, i64 0, !17, i64 2, !17, i64 4, !17, i64 6, !7, i64 8}
!17 = !{!"short", !7, i64 0}
!18 = !{!7, !7, i64 0}
!19 = !{!20, !20, i64 0}
!20 = !{!"vtable pointer", !8, i64 0}
!21 = !{!22, !10, i64 32}
!22 = !{!"_ZTS13COutStreamRam", !23, i64 0, !25, i64 8, !10, i64 16, !6, i64 24, !10, i64 32, !26, i64 40}
!23 = !{!"_ZTS20ISequentialOutStream", !24, i64 0}
!24 = !{!"_ZTS8IUnknown"}
!25 = !{!"_ZTS13CMyUnknownImp", !12, i64 0}
!26 = !{!"bool", !7, i64 0}
!27 = !{!28, !28, i64 0}
!28 = !{!"long long", !7, i64 0}
!29 = distinct !{!29, !30}
!30 = !{!"llvm.loop.mustprogress"}
!31 = !{!26, !26, i64 0}
!32 = !{i8 0, i8 2}
!33 = !{}
!34 = !{!22, !26, i64 40}
!35 = distinct !{!35, !30}


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

@__const._Z13LzmaRamEncodePKhmPhmPmj13ESzFilterMode.propIDs = external hidden unnamed_addr constant [3 x i32], align 4

; 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 @_Z13LzmaRamEncodePKhmPhmPmj13ESzFilterMode(ptr noundef %0, i64 noundef %1, ptr noundef %2, i64 noundef %3, ptr nocapture noundef writeonly %4, i32 noundef %5, i32 noundef %6) local_unnamed_addr #1 personality ptr @__gxx_personality_v0 {
  %8 = alloca %class.CMyComPtr.4, align 8
  %9 = alloca [3 x i32], align 4
  %10 = alloca [3 x %struct.tagPROPVARIANT], align 16
  %11 = alloca %class.CMyComPtr.0, align 8
  %12 = alloca %class.CMyComPtr.5, align 8
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  store i64 0, ptr %4, align 8, !tbaa !5
  %15 = icmp ult i64 %3, 14
  br i1 %15, label %192, label %16

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

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

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

20:                                               ; preds = %19
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %9) #11
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %9, ptr noundef nonnull align 4 dereferenceable(12) @__const._Z13LzmaRamEncodePKhmPhmPmj13ESzFilterMode.propIDs, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %10) #11
  store i16 19, ptr %10, align 16, !tbaa !9
  %21 = getelementptr inbounds i8, ptr %10, i64 16
  store i16 19, ptr %21, align 16, !tbaa !9
  %22 = getelementptr inbounds i8, ptr %10, i64 32
  store i16 19, ptr %22, align 16, !tbaa !9
  %23 = getelementptr inbounds i8, ptr %10, i64 8
  store i32 2, ptr %23, align 8, !tbaa !12
  %24 = getelementptr inbounds i8, ptr %10, i64 24
  store i32 %5, ptr %24, align 8, !tbaa !12
  %25 = getelementptr inbounds i8, ptr %10, i64 40
  store i32 64, ptr %25, align 8, !tbaa !12
  %26 = load ptr, ptr %17, align 8, !tbaa !13
  %27 = getelementptr inbounds i8, ptr %26, i64 40
  %28 = load ptr, ptr %27, align 8
  %29 = invoke noundef i32 %28(ptr noundef nonnull align 8 dereferenceable(210678) %17, ptr noundef nonnull %9, ptr noundef nonnull %10, i32 noundef 3)
          to label %30 unwind label %37

30:                                               ; preds = %20
  %.not = icmp eq i32 %29, 0
  br i1 %.not, label %39, label %187

31:                                               ; preds = %16
  %32 = landingpad { ptr, i32 }
          catch ptr null
  br label %190

33:                                               ; preds = %18
  %34 = landingpad { ptr, i32 }
          catch ptr null
  tail call void @_ZdlPvm(ptr noundef nonnull %17, i64 noundef 210680) #12
  br label %190

35:                                               ; preds = %19
  %36 = landingpad { ptr, i32 }
          catch ptr null
  br label %189

37:                                               ; preds = %20
  %38 = landingpad { ptr, i32 }
          catch ptr null
  br label %188

39:                                               ; preds = %30
  %40 = invoke noalias noundef nonnull dereferenceable(48) ptr @_Znwm(i64 noundef 48) #10
          to label %41 unwind label %42

41:                                               ; preds = %39
  invoke void @_ZN13COutStreamRamC2Ev(ptr noundef nonnull align 8 dereferenceable(41) %40)
          to label %46 unwind label %44

42:                                               ; preds = %39
  %43 = landingpad { ptr, i32 }
          catch ptr null
  br label %188

44:                                               ; preds = %41
  %45 = landingpad { ptr, i32 }
          catch ptr null
  call void @_ZdlPvm(ptr noundef nonnull %40, i64 noundef 48) #12
  br label %188

46:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #11
  invoke void @_ZN9CMyComPtrI20ISequentialOutStreamEC2EPS0_(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull %40)
          to label %47 unwind label %50

47:                                               ; preds = %46
  %48 = invoke noalias noundef nonnull dereferenceable(40) ptr @_Znwm(i64 noundef 40) #10
          to label %49 unwind label %52

49:                                               ; preds = %47
  call void @_ZN12CInStreamRamC2Ev(ptr noundef nonnull align 8 dereferenceable(40) %48)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #11
  invoke void @_ZN9CMyComPtrI19ISequentialInStreamEC2EPS0_(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull %48)
          to label %54 unwind label %56

50:                                               ; preds = %46
  %51 = landingpad { ptr, i32 }
          catch ptr null
  br label %186

52:                                               ; preds = %47
  %53 = landingpad { ptr, i32 }
          catch ptr null
  br label %185

54:                                               ; preds = %49
  call void @_ZN13COutStreamRam4InitEPhm(ptr noundef nonnull align 8 dereferenceable(41) %40, ptr noundef %2, i64 noundef %3)
  %55 = call noundef i32 @_ZN13COutStreamRam9WriteByteEh(ptr noundef nonnull align 8 dereferenceable(41) %40, i8 noundef zeroext 0)
  %.not103 = icmp eq i32 %55, 0
  br i1 %.not103, label %60, label %.loopexit

56:                                               ; preds = %49
  %57 = landingpad { ptr, i32 }
          catch ptr null
  br label %184

58:                                               ; preds = %60
  %59 = landingpad { ptr, i32 }
          catch ptr null
  br label %.split133.us

60:                                               ; preds = %54
  %61 = call noundef ptr @_ZNK9CMyComPtrI20ISequentialOutStreamEcvPS0_Ev(ptr noundef nonnull align 8 dereferenceable(8) %11)
  %62 = load ptr, ptr %17, align 8, !tbaa !13
  %63 = getelementptr inbounds i8, ptr %62, i64 48
  %64 = load ptr, ptr %63, align 8
  %65 = invoke noundef i32 %64(ptr noundef nonnull align 8 dereferenceable(210678) %17, ptr noundef %61)
          to label %66 unwind label %58

66:                                               ; preds = %60
  %.not104 = icmp eq i32 %65, 0
  br i1 %.not104, label %67, label %.loopexit

67:                                               ; preds = %66
  %68 = getelementptr inbounds i8, ptr %40, i64 32
  %69 = load i64, ptr %68, align 8, !tbaa !15
  %.not105 = icmp eq i64 %69, 6
  br i1 %.not105, label %.preheader.preheader, label %.loopexit

.preheader.preheader:                             ; preds = %67
  %70 = trunc i64 %1 to i8
  %71 = call noundef i32 @_ZN13COutStreamRam9WriteByteEh(ptr noundef nonnull align 8 dereferenceable(41) %40, i8 noundef zeroext %70)
  %.not109 = icmp eq i32 %71, 0
  br i1 %.not109, label %.preheader.1, label %.loopexit

.preheader.1:                                     ; preds = %.preheader.preheader
  %72 = lshr i64 %1, 8
  %73 = trunc i64 %72 to i8
  %74 = call noundef i32 @_ZN13COutStreamRam9WriteByteEh(ptr noundef nonnull align 8 dereferenceable(41) %40, i8 noundef zeroext %73)
  %.not109.1 = icmp eq i32 %74, 0
  br i1 %.not109.1, label %.preheader.2, label %.loopexit

.preheader.2:                                     ; preds = %.preheader.1
  %75 = lshr i64 %1, 16
  %76 = trunc i64 %75 to i8
  %77 = call noundef i32 @_ZN13COutStreamRam9WriteByteEh(ptr noundef nonnull align 8 dereferenceable(41) %40, i8 noundef zeroext %76)
  %.not109.2 = icmp eq i32 %77, 0
  br i1 %.not109.2, label %.preheader.3, label %.loopexit

.preheader.3:                                     ; preds = %.preheader.2
  %78 = lshr i64 %1, 24
  %79 = trunc i64 %78 to i8
  %80 = call noundef i32 @_ZN13COutStreamRam9WriteByteEh(ptr noundef nonnull align 8 dereferenceable(41) %40, i8 noundef zeroext %79)
  %.not109.3 = icmp eq i32 %80, 0
  br i1 %.not109.3, label %.preheader.4, label %.loopexit

.preheader.4:                                     ; preds = %.preheader.3
  %81 = lshr i64 %1, 32
  %82 = trunc i64 %81 to i8
  %83 = call noundef i32 @_ZN13COutStreamRam9WriteByteEh(ptr noundef nonnull align 8 dereferenceable(41) %40, i8 noundef zeroext %82)
  %.not109.4 = icmp eq i32 %83, 0
  br i1 %.not109.4, label %.preheader.5, label %.loopexit

.preheader.5:                                     ; preds = %.preheader.4
  %84 = lshr i64 %1, 40
  %85 = trunc i64 %84 to i8
  %86 = call noundef i32 @_ZN13COutStreamRam9WriteByteEh(ptr noundef nonnull align 8 dereferenceable(41) %40, i8 noundef zeroext %85)
  %.not109.5 = icmp eq i32 %86, 0
  br i1 %.not109.5, label %.preheader.6, label %.loopexit

.preheader.6:                                     ; preds = %.preheader.5
  %87 = lshr i64 %1, 48
  %88 = trunc i64 %87 to i8
  %89 = call noundef i32 @_ZN13COutStreamRam9WriteByteEh(ptr noundef nonnull align 8 dereferenceable(41) %40, i8 noundef zeroext %88)
  %.not109.6 = icmp eq i32 %89, 0
  br i1 %.not109.6, label %.preheader.7, label %.loopexit

.preheader.7:                                     ; preds = %.preheader.6
  %90 = lshr i64 %1, 56
  %91 = trunc nuw i64 %90 to i8
  %92 = call noundef i32 @_ZN13COutStreamRam9WriteByteEh(ptr noundef nonnull align 8 dereferenceable(41) %40, i8 noundef zeroext %91)
  %.not109.7 = icmp eq i32 %92, 0
  br i1 %.not109.7, label %93, label %.loopexit

93:                                               ; preds = %.preheader.7
  %.not189 = icmp eq i32 %6, 0
  br i1 %.not189, label %.split.us.split.us.preheader, label %94

94:                                               ; preds = %93
  %.not106 = icmp eq i64 %1, 0
  br i1 %.not106, label %99, label %95

95:                                               ; preds = %94
  %96 = call noundef ptr @_Z7MyAllocm(i64 noundef %1) #11
  %97 = icmp eq ptr %96, null
  br i1 %97, label %.loopexit, label %98

98:                                               ; preds = %95
  call void @llvm.memmove.p0.p0.i64(ptr nonnull align 1 %96, ptr align 1 %0, i64 %1, i1 false)
  br label %99

99:                                               ; preds = %98, %94
  %.094 = phi ptr [ %96, %98 ], [ null, %94 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %13) #11
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %14) #11
  store i32 0, ptr %13, align 4, !tbaa !23
  store i32 -5, ptr %14, align 4, !tbaa !23
  %100 = trunc i64 %1 to i32
  %101 = invoke i32 @x86_Convert(ptr noundef %.094, i32 noundef %100, i32 noundef 0, ptr noundef nonnull %13, ptr noundef nonnull %14, i32 noundef 1)
          to label %104 unwind label %102

102:                                              ; preds = %99
  %103 = landingpad { ptr, i32 }
          catch ptr null
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #11
  br label %.split133.us

104:                                              ; preds = %99
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #11
  %105 = icmp eq i32 %6, 2
  %106 = select i1 %105, i32 3, i32 1
  %107 = load i64, ptr %68, align 8, !tbaa !15
  %108 = add nsw i32 %106, -1
  %109 = getelementptr inbounds i8, ptr %40, i64 40
  br i1 %105, label %.split.preheader, label %.split.us.split.preheader

.split.preheader:                                 ; preds = %104
  %110 = icmp eq i32 %108, 0
  br i1 %110, label %.split130.us.thread, label %111

111:                                              ; preds = %.split.preheader
  call void @_ZN13COutStreamRam6SetPosEm(ptr noundef nonnull align 8 dereferenceable(41) %40, i64 noundef %107)
  call void @_ZN12CInStreamRam4InitEPKhm(ptr noundef nonnull align 8 dereferenceable(40) %48, ptr noundef %.094, i64 noundef %1)
  %112 = call noundef ptr @_ZNK9CMyComPtrI14ICompressCoderEptEv(ptr noundef nonnull align 8 dereferenceable(8) %8)
  %113 = call noundef ptr @_ZNK9CMyComPtrI19ISequentialInStreamEcvPS0_Ev(ptr noundef nonnull align 8 dereferenceable(8) %12)
  %114 = call noundef ptr @_ZNK9CMyComPtrI20ISequentialOutStreamEcvPS0_Ev(ptr noundef nonnull align 8 dereferenceable(8) %11)
  %115 = load ptr, ptr %112, align 8, !tbaa !13
  %116 = getelementptr inbounds i8, ptr %115, i64 24
  %117 = load ptr, ptr %116, align 8
  %118 = invoke noundef i32 %117(ptr noundef nonnull align 8 dereferenceable(8) %112, ptr noundef %113, ptr noundef %114, ptr noundef null, ptr noundef null, ptr noundef null)
          to label %119 unwind label %.split133.loopexit.split-lp

119:                                              ; preds = %111
  %120 = icmp eq i32 %118, -2147024882
  br i1 %120, label %.split130.us.thread, label %121

121:                                              ; preds = %119
  %.pre167 = load i64, ptr %68, align 8, !tbaa !15
  %122 = trunc i64 %.pre167 to i32
  %123 = load i8, ptr %109, align 8, !tbaa !24, !range !25, !noundef !26
  %124 = trunc nuw i8 %123 to i1
  br i1 %124, label %.split.preheader190, label %125

125:                                              ; preds = %121
  %.not108.peel = icmp eq i32 %118, 0
  br i1 %.not108.peel, label %.split.preheader190, label %.split130.us.thread182

.split.preheader190:                              ; preds = %121, %125
  %.074128.ph = phi i32 [ 0, %125 ], [ 3, %121 ]
  br label %.split

.split.us.split.us.preheader:                     ; preds = %93
  %126 = load i64, ptr %68, align 8, !tbaa !15
  %127 = getelementptr inbounds i8, ptr %40, i64 40
  call void @_ZN13COutStreamRam6SetPosEm(ptr noundef nonnull align 8 dereferenceable(41) %40, i64 noundef %126)
  call void @_ZN12CInStreamRam4InitEPKhm(ptr noundef nonnull align 8 dereferenceable(40) %48, ptr noundef %0, i64 noundef %1)
  %128 = call noundef ptr @_ZNK9CMyComPtrI14ICompressCoderEptEv(ptr noundef nonnull align 8 dereferenceable(8) %8)
  %129 = call noundef ptr @_ZNK9CMyComPtrI19ISequentialInStreamEcvPS0_Ev(ptr noundef nonnull align 8 dereferenceable(8) %12)
  %130 = call noundef ptr @_ZNK9CMyComPtrI20ISequentialOutStreamEcvPS0_Ev(ptr noundef nonnull align 8 dereferenceable(8) %11)
  %131 = load ptr, ptr %128, align 8, !tbaa !13
  %132 = getelementptr inbounds i8, ptr %131, i64 24
  %133 = load ptr, ptr %132, align 8
  %134 = invoke noundef i32 %133(ptr noundef nonnull align 8 dereferenceable(8) %128, ptr noundef %129, ptr noundef %130, ptr noundef null, ptr noundef null, ptr noundef null)
          to label %135 unwind label %.split133.us.split.us

135:                                              ; preds = %.split.us.split.us.preheader
  %136 = icmp eq i32 %134, -2147024882
  br i1 %136, label %.split130.us.thread, label %137

137:                                              ; preds = %135
  %138 = load i8, ptr %127, align 8, !tbaa !24, !range !25, !noundef !26
  %139 = trunc nuw i8 %138 to i1
  br i1 %139, label %.split130.us.thread, label %140

140:                                              ; preds = %137
  %.not108.us.us.peel = icmp ne i32 %134, 0
  %spec.select = zext i1 %.not108.us.us.peel to i32
  br label %.split130.us.thread

.split.us.split.preheader:                        ; preds = %104
  call void @_ZN13COutStreamRam6SetPosEm(ptr noundef nonnull align 8 dereferenceable(41) %40, i64 noundef %107)
  call void @_ZN12CInStreamRam4InitEPKhm(ptr noundef nonnull align 8 dereferenceable(40) %48, ptr noundef %.094, i64 noundef %1)
  %141 = call noundef ptr @_ZNK9CMyComPtrI14ICompressCoderEptEv(ptr noundef nonnull align 8 dereferenceable(8) %8)
  %142 = call noundef ptr @_ZNK9CMyComPtrI19ISequentialInStreamEcvPS0_Ev(ptr noundef nonnull align 8 dereferenceable(8) %12)
  %143 = call noundef ptr @_ZNK9CMyComPtrI20ISequentialOutStreamEcvPS0_Ev(ptr noundef nonnull align 8 dereferenceable(8) %11)
  %144 = load ptr, ptr %141, align 8, !tbaa !13
  %145 = getelementptr inbounds i8, ptr %144, i64 24
  %146 = load ptr, ptr %145, align 8
  %147 = invoke noundef i32 %146(ptr noundef nonnull align 8 dereferenceable(8) %141, ptr noundef %142, ptr noundef %143, ptr noundef null, ptr noundef null, ptr noundef null)
          to label %148 unwind label %.split133.us.split

148:                                              ; preds = %.split.us.split.preheader
  %149 = icmp eq i32 %147, -2147024882
  br i1 %149, label %.split130.us.thread, label %150

150:                                              ; preds = %148
  %151 = load i8, ptr %109, align 8, !tbaa !24, !range !25, !noundef !26
  %152 = trunc nuw i8 %151 to i1
  br i1 %152, label %.split130.us.thread182, label %153

153:                                              ; preds = %150
  %.not108.us.peel = icmp ne i32 %147, 0
  %spec.select188 = zext i1 %.not108.us.peel to i32
  br label %.split130.us.thread182

.split133.us.split.us:                            ; preds = %.split.us.split.us.preheader
  %lpad.loopexit.split-lp = landingpad { ptr, i32 }
          catch ptr null
  br label %.split133.us

.split133.us.split:                               ; preds = %.split.us.split.preheader
  %lpad.loopexit.split-lp149 = landingpad { ptr, i32 }
          catch ptr null
  br label %.split133.us

.split:                                           ; preds = %.split.preheader190, %select.unfold
  %.074128 = phi i32 [ %.276.ph, %select.unfold ], [ %.074128.ph, %.split.preheader190 ]
  %.078127 = phi i8 [ %.179, %select.unfold ], [ 1, %.split.preheader190 ]
  %.091126 = phi i32 [ %.192, %select.unfold ], [ %122, %.split.preheader190 ]
  %.197125 = phi i32 [ %176, %select.unfold ], [ 1, %.split.preheader190 ]
  %154 = icmp eq i32 %.197125, %108
  br i1 %154, label %155, label %157

155:                                              ; preds = %.split
  %156 = trunc nuw i8 %.078127 to i1
  br i1 %156, label %157, label %.split130.us

157:                                              ; preds = %155, %.split
  %158 = phi ptr [ %.094, %155 ], [ %0, %.split ]
  call void @_ZN13COutStreamRam6SetPosEm(ptr noundef nonnull align 8 dereferenceable(41) %40, i64 noundef %107)
  call void @_ZN12CInStreamRam4InitEPKhm(ptr noundef nonnull align 8 dereferenceable(40) %48, ptr noundef %158, i64 noundef %1)
  %159 = call noundef ptr @_ZNK9CMyComPtrI14ICompressCoderEptEv(ptr noundef nonnull align 8 dereferenceable(8) %8)
  %160 = call noundef ptr @_ZNK9CMyComPtrI19ISequentialInStreamEcvPS0_Ev(ptr noundef nonnull align 8 dereferenceable(8) %12)
  %161 = call noundef ptr @_ZNK9CMyComPtrI20ISequentialOutStreamEcvPS0_Ev(ptr noundef nonnull align 8 dereferenceable(8) %11)
  %162 = load ptr, ptr %159, align 8, !tbaa !13
  %163 = getelementptr inbounds i8, ptr %162, i64 24
  %164 = load ptr, ptr %163, align 8
  %165 = invoke noundef i32 %164(ptr noundef nonnull align 8 dereferenceable(8) %159, ptr noundef %160, ptr noundef %161, ptr noundef null, ptr noundef null, ptr noundef null)
          to label %166 unwind label %.split133.loopexit

166:                                              ; preds = %157
  %167 = icmp eq i32 %165, -2147024882
  br i1 %167, label %.split130.us, label %168

.split133.loopexit:                               ; preds = %157
  %lpad.loopexit153 = landingpad { ptr, i32 }
          catch ptr null
  br label %.split133.us

.split133.loopexit.split-lp:                      ; preds = %111
  %lpad.loopexit.split-lp154 = landingpad { ptr, i32 }
          catch ptr null
  br label %.split133.us

168:                                              ; preds = %166
  %169 = load i64, ptr %68, align 8, !tbaa !15
  %170 = zext i32 %.091126 to i64
  %.not107 = icmp ugt i64 %169, %170
  %171 = trunc i64 %169 to i32
  %172 = zext i1 %154 to i8
  %.192 = select i1 %.not107, i32 %.091126, i32 %171
  %.179 = select i1 %.not107, i8 %.078127, i8 %172
  %173 = load i8, ptr %109, align 8, !tbaa !24, !range !25, !noundef !26
  %174 = trunc nuw i8 %173 to i1
  br i1 %174, label %select.unfold, label %175

175:                                              ; preds = %168
  %.not108 = icmp eq i32 %165, 0
  br i1 %.not108, label %select.unfold, label %.split130.us

select.unfold:                                    ; preds = %175, %168
  %.276.ph = phi i32 [ 3, %168 ], [ 0, %175 ]
  %176 = add nuw nsw i32 %.197125, 1
  %exitcond151.not = icmp eq i32 %176, %106
  br i1 %exitcond151.not, label %.split130.us, label %.split, !llvm.loop !27

.split130.us.thread:                              ; preds = %140, %119, %.split.preheader, %148, %137, %135
  %.195171.ph = phi ptr [ null, %135 ], [ null, %137 ], [ %.094, %148 ], [ %.094, %119 ], [ %.094, %.split.preheader ], [ null, %140 ]
  %.us-phi131.ph = phi i32 [ 2, %135 ], [ 3, %137 ], [ 2, %148 ], [ 2, %119 ], [ 0, %.split.preheader ], [ %spec.select, %140 ]
  %177 = load i64, ptr %68, align 8, !tbaa !15
  store i64 %177, ptr %4, align 8, !tbaa !5
  br label %182

.split130.us.thread182:                           ; preds = %153, %125, %150
  %.us-phi131.ph181 = phi i32 [ 3, %150 ], [ 1, %125 ], [ %spec.select188, %153 ]
  %178 = load i64, ptr %68, align 8, !tbaa !15
  store i64 %178, ptr %4, align 8, !tbaa !5
  br label %181

.split130.us:                                     ; preds = %select.unfold, %155, %175, %166
  %.us-phi = phi i8 [ %.078127, %155 ], [ %.179, %select.unfold ], [ %.078127, %166 ], [ %.179, %175 ]
  %.us-phi131 = phi i32 [ %.074128, %155 ], [ %.276.ph, %select.unfold ], [ 2, %166 ], [ 1, %175 ]
  %179 = load i64, ptr %68, align 8, !tbaa !15
  store i64 %179, ptr %4, align 8, !tbaa !5
  %180 = trunc nuw i8 %.us-phi to i1
  br i1 %180, label %181, label %182

181:                                              ; preds = %.split130.us.thread182, %.split130.us
  %.us-phi131187 = phi i32 [ %.us-phi131.ph181, %.split130.us.thread182 ], [ %.us-phi131, %.split130.us ]
  store i8 1, ptr %2, align 1, !tbaa !12
  br label %182

182:                                              ; preds = %.split130.us.thread, %181, %.split130.us
  %.us-phi131179 = phi i32 [ %.us-phi131.ph, %.split130.us.thread ], [ %.us-phi131187, %181 ], [ %.us-phi131, %.split130.us ]
  %.195171178 = phi ptr [ %.195171.ph, %.split130.us.thread ], [ %.094, %181 ], [ %.094, %.split130.us ]
  br i1 %.not189, label %.loopexit, label %183

183:                                              ; preds = %182
  call void @_Z6MyFreePv(ptr noundef %.195171178) #11
  br label %.loopexit

.loopexit:                                        ; preds = %.preheader.preheader, %.preheader.1, %.preheader.2, %.preheader.3, %.preheader.4, %.preheader.5, %.preheader.6, %.preheader.7, %182, %183, %95, %67, %66, %54
  %.4 = phi i32 [ 3, %54 ], [ 3, %66 ], [ 1, %67 ], [ 2, %95 ], [ %.us-phi131179, %183 ], [ %.us-phi131179, %182 ], [ 3, %.preheader.7 ], [ 3, %.preheader.6 ], [ 3, %.preheader.5 ], [ 3, %.preheader.4 ], [ 3, %.preheader.3 ], [ 3, %.preheader.2 ], [ 3, %.preheader.1 ], [ 3, %.preheader.preheader ]
  call void @_ZN9CMyComPtrI19ISequentialInStreamED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %12) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #11
  call void @_ZN9CMyComPtrI20ISequentialOutStreamED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %11) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #11
  br label %187

.split133.us:                                     ; preds = %.split133.loopexit, %.split133.loopexit.split-lp, %.split133.us.split.us, %.split133.us.split, %102, %58
  %.pn.pn = phi { ptr, i32 } [ %59, %58 ], [ %103, %102 ], [ %lpad.loopexit.split-lp149, %.split133.us.split ], [ %lpad.loopexit.split-lp, %.split133.us.split.us ], [ %lpad.loopexit153, %.split133.loopexit ], [ %lpad.loopexit.split-lp154, %.split133.loopexit.split-lp ]
  call void @_ZN9CMyComPtrI19ISequentialInStreamED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %12) #11
  br label %184

184:                                              ; preds = %.split133.us, %56
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %.split133.us ], [ %57, %56 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #11
  br label %185

185:                                              ; preds = %184, %52
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn, %184 ], [ %53, %52 ]
  call void @_ZN9CMyComPtrI20ISequentialOutStreamED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %11) #11
  br label %186

186:                                              ; preds = %185, %50
  %.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn, %185 ], [ %51, %50 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #11
  br label %188

187:                                              ; preds = %30, %.loopexit
  %.7 = phi i32 [ %.4, %.loopexit ], [ 1, %30 ]
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %10) #11
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %9) #11
  call void @_ZN9CMyComPtrI14ICompressCoderED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %8) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #11
  br label %192

188:                                              ; preds = %42, %44, %186, %37
  %.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %38, %37 ], [ %.pn.pn.pn.pn.pn, %186 ], [ %45, %44 ], [ %43, %42 ]
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %10) #11
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %9) #11
  call void @_ZN9CMyComPtrI14ICompressCoderED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %8) #11
  br label %189

189:                                              ; preds = %188, %35
  %.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn.pn.pn.pn, %188 ], [ %36, %35 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #11
  br label %190

190:                                              ; preds = %189, %33, %31
  %.pn.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn.pn.pn.pn.pn, %189 ], [ %34, %33 ], [ %32, %31 ]
  %.890 = extractvalue { ptr, i32 } %.pn.pn.pn.pn.pn.pn.pn.pn.pn, 0
  %191 = call ptr @__cxa_begin_catch(ptr %.890) #11
  call void @__cxa_end_catch()
  br label %192

192:                                              ; preds = %187, %7, %190
  %.9 = phi i32 [ 2, %190 ], [ %.7, %187 ], [ 3, %7 ]
  ret i32 %.9
}

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

declare i32 @__gxx_personality_v0(...)

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN13COutStreamRamC2Ev(ptr noundef nonnull align 8 dereferenceable(41)) unnamed_addr #6 align 2

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN13COutStreamRam4InitEPhm(ptr noundef nonnull align 8 dereferenceable(41), ptr noundef, i64 noundef) local_unnamed_addr #8 align 2

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

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

; Function Attrs: nounwind
declare noundef ptr @_Z7MyAllocm(i64 noundef) local_unnamed_addr #9

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

declare i32 @x86_Convert(ptr noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN13COutStreamRam6SetPosEm(ptr noundef nonnull align 8 dereferenceable(41), i64 noundef) local_unnamed_addr #8 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN12CInStreamRam4InitEPKhm(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef, i64 noundef) local_unnamed_addr #8 align 2

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

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

; Function Attrs: nounwind
declare void @_Z6MyFreePv(ptr noundef) local_unnamed_addr #9

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

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

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

declare ptr @__cxa_begin_catch(ptr) local_unnamed_addr

declare void @__cxa_end_catch() local_unnamed_addr

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 = { 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 = { "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 = { 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 #5 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #6 = { inlinehint 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 #7 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #8 = { 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 #9 = { 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 #10 = { builtin allocsize(0) }
attributes #11 = { nounwind }
attributes #12 = { 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, !6, i64 32}
!16 = !{!"_ZTS13COutStreamRam", !17, i64 0, !19, i64 8, !6, i64 16, !21, i64 24, !6, i64 32, !22, i64 40}
!17 = !{!"_ZTS20ISequentialOutStream", !18, i64 0}
!18 = !{!"_ZTS8IUnknown"}
!19 = !{!"_ZTS13CMyUnknownImp", !20, i64 0}
!20 = !{!"int", !7, i64 0}
!21 = !{!"any pointer", !7, i64 0}
!22 = !{!"bool", !7, i64 0}
!23 = !{!20, !20, i64 0}
!24 = !{!16, !22, i64 40}
!25 = !{i8 0, i8 2}
!26 = !{}
!27 = distinct !{!27, !28, !29}
!28 = !{!"llvm.loop.mustprogress"}
!29 = !{!"llvm.loop.peeled.count", i32 1}


; Effective O3 passes: ADCEPass,BDCEPass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopFullUnrollPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass