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

; 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.2 = type { ptr }
%class.CMyComPtr.4 = type { ptr }
%class.CMyComPtr.6 = type { ptr }
%"class.NArchive::NSplit::CHandler" = type { %struct.IInArchive, %struct.IInArchiveGetStream, %class.CMyUnknownImp, %class.CObjectVector, %class.CRecordVector.0, %class.UString, i64 }
%struct.IInArchive = type { %struct.IUnknown }
%struct.IUnknown = type { ptr }
%struct.IInArchiveGetStream = type { %struct.IUnknown }
%class.CMyUnknownImp = type { i32 }
%class.CObjectVector = type { %class.CRecordVector }
%class.CRecordVector = type { ptr, i32, i32 }
%class.CRecordVector.0 = type { ptr, i32, i32 }
%class.UString = type { ptr, i32, i32 }
%class.CLocalProgress = type <{ %struct.ICompressProgressInfo, %class.CMyUnknownImp, [4 x i8], %class.CMyComPtr.5, %class.CMyComPtr.6, i8, [7 x i8], i64, i64, i64, i8, i8, [6 x i8] }>
%struct.ICompressProgressInfo = type { %struct.IUnknown }
%class.CMyComPtr.5 = type { ptr }
%"class.NCompress::CCopyCoder" = type { %struct.ICompressCoder, %struct.ICompressSetInStream, %struct.ISequentialInStream, %struct.ICompressSetFinishMode, %struct.ICompressGetInStreamProcessedSize, %class.CMyUnknownImp, ptr, %class.CMyComPtr.3, i64 }
%struct.ICompressCoder = type { %struct.IUnknown }
%struct.ICompressSetInStream = type { %struct.IUnknown }
%struct.ISequentialInStream = type { %struct.IUnknown }
%struct.ICompressSetFinishMode = type { %struct.IUnknown }
%struct.ICompressGetInStreamProcessedSize = type { %struct.IUnknown }
%class.CMyComPtr.3 = type { ptr }

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

declare i32 @__gxx_personality_v0(...)

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

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

declare ptr @__cxa_begin_catch(ptr)

declare void @__cxa_end_catch()

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN8NArchive6NSplit8CHandler7ExtractEPKjjiP23IArchiveExtractCallback(ptr noundef nonnull align 8 dereferenceable(80) %0, ptr noundef %1, i32 noundef %2, i32 noundef %3, ptr noundef %4) unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca i64, align 8
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca %class.CMyComPtr.2, align 8
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca ptr, align 8
  %22 = alloca %class.CMyComPtr.4, align 8
  %23 = alloca ptr, align 8
  %24 = alloca %class.CMyComPtr.6, align 8
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  %27 = alloca ptr, align 8
  %28 = alloca i32, align 4
  %29 = alloca i32, align 4
  store ptr %0, ptr %7, align 8, !tbaa !5
  store ptr %1, ptr %8, align 8, !tbaa !5
  store i32 %2, ptr %9, align 4, !tbaa !9
  store i32 %3, ptr %10, align 4, !tbaa !9
  store ptr %4, ptr %11, align 8, !tbaa !5
  %30 = load ptr, ptr %7, align 8
  %31 = load i32, ptr %9, align 4, !tbaa !9
  %32 = icmp eq i32 %31, 0
  br i1 %32, label %33, label %34

33:                                               ; preds = %5
  store i32 0, ptr %6, align 4
  br label %278

34:                                               ; preds = %5
  %35 = load i32, ptr %9, align 4, !tbaa !9
  %36 = icmp ne i32 %35, -1
  br i1 %36, label %37, label %46

37:                                               ; preds = %34
  %38 = load i32, ptr %9, align 4, !tbaa !9
  %39 = icmp ne i32 %38, 1
  br i1 %39, label %45, label %40

40:                                               ; preds = %37
  %41 = load ptr, ptr %8, align 8, !tbaa !5
  %42 = getelementptr inbounds i32, ptr %41, i64 0
  %43 = load i32, ptr %42, align 4, !tbaa !9
  %44 = icmp ne i32 %43, 0
  br i1 %44, label %45, label %46

45:                                               ; preds = %40, %37
  store i32 -2147024809, ptr %6, align 4
  br label %278

46:                                               ; preds = %40, %34
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  store i64 0, ptr %12, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  %47 = load ptr, ptr %11, align 8, !tbaa !5
  %48 = getelementptr inbounds %"class.NArchive::NSplit::CHandler", ptr %30, i32 0, i32 6
  %49 = load i64, ptr %48, align 8, !tbaa !13
  %50 = load ptr, ptr %47, align 8, !tbaa !23
  %51 = getelementptr inbounds ptr, ptr %50, i64 5
  %52 = load ptr, ptr %51, align 8
  %53 = invoke noundef i32 %52(ptr noundef nonnull align 8 dereferenceable(8) %47, i64 noundef %49)
          to label %54 unwind label %59

54:                                               ; preds = %46
  store i32 %53, ptr %13, align 4, !tbaa !9
  %55 = load i32, ptr %13, align 4, !tbaa !9
  %56 = icmp ne i32 %55, 0
  br i1 %56, label %57, label %63

57:                                               ; preds = %54
  %58 = load i32, ptr %13, align 4, !tbaa !9
  store i32 %58, ptr %6, align 4
  store i32 1, ptr %16, align 4
  br label %64

59:                                               ; preds = %46
  %60 = landingpad { ptr, i32 }
          catch ptr null
  %61 = extractvalue { ptr, i32 } %60, 0
  store ptr %61, ptr %14, align 8
  %62 = extractvalue { ptr, i32 } %60, 1
  store i32 %62, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  br label %273

63:                                               ; preds = %54
  store i32 0, ptr %16, align 4
  br label %64

64:                                               ; preds = %63, %57
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  %65 = load i32, ptr %16, align 4
  switch i32 %65, label %272 [
    i32 0, label %66
  ]

66:                                               ; preds = %64
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #6
  invoke void @_ZN9CMyComPtrI20ISequentialOutStreamEC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %17)
          to label %67 unwind label %85

67:                                               ; preds = %66
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #6
  %68 = load i32, ptr %10, align 4, !tbaa !9
  %69 = icmp ne i32 %68, 0
  %70 = zext i1 %69 to i64
  %71 = select i1 %69, i32 1, i32 0
  store i32 %71, ptr %18, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #6
  %72 = load ptr, ptr %11, align 8, !tbaa !5
  %73 = invoke noundef ptr @_ZN9CMyComPtrI20ISequentialOutStreamEadEv(ptr noundef nonnull align 8 dereferenceable(8) %17)
          to label %74 unwind label %89

74:                                               ; preds = %67
  %75 = load i32, ptr %18, align 4, !tbaa !9
  %76 = load ptr, ptr %72, align 8, !tbaa !23
  %77 = getelementptr inbounds ptr, ptr %76, i64 7
  %78 = load ptr, ptr %77, align 8
  %79 = invoke noundef i32 %78(ptr noundef nonnull align 8 dereferenceable(8) %72, i32 noundef 0, ptr noundef %73, i32 noundef %75)
          to label %80 unwind label %89

80:                                               ; preds = %74
  store i32 %79, ptr %19, align 4, !tbaa !9
  %81 = load i32, ptr %19, align 4, !tbaa !9
  %82 = icmp ne i32 %81, 0
  br i1 %82, label %83, label %93

83:                                               ; preds = %80
  %84 = load i32, ptr %19, align 4, !tbaa !9
  store i32 %84, ptr %6, align 4
  store i32 1, ptr %16, align 4
  br label %94

85:                                               ; preds = %66
  %86 = landingpad { ptr, i32 }
          catch ptr null
  %87 = extractvalue { ptr, i32 } %86, 0
  store ptr %87, ptr %14, align 8
  %88 = extractvalue { ptr, i32 } %86, 1
  store i32 %88, ptr %15, align 4
  br label %271

89:                                               ; preds = %74, %67
  %90 = landingpad { ptr, i32 }
          catch ptr null
  %91 = extractvalue { ptr, i32 } %90, 0
  store ptr %91, ptr %14, align 8
  %92 = extractvalue { ptr, i32 } %90, 1
  store i32 %92, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  br label %270

93:                                               ; preds = %80
  store i32 0, ptr %16, align 4
  br label %94

94:                                               ; preds = %93, %83
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  %95 = load i32, ptr %16, align 4
  switch i32 %95, label %269 [
    i32 0, label %96
  ]

96:                                               ; preds = %94
  %97 = load i32, ptr %10, align 4, !tbaa !9
  %98 = icmp ne i32 %97, 0
  br i1 %98, label %107, label %99

99:                                               ; preds = %96
  %100 = invoke noundef zeroext i1 @_ZNK9CMyComPtrI20ISequentialOutStreamEntEv(ptr noundef nonnull align 8 dereferenceable(8) %17)
          to label %101 unwind label %103

101:                                              ; preds = %99
  br i1 %100, label %102, label %107

102:                                              ; preds = %101
  store i32 0, ptr %6, align 4
  store i32 1, ptr %16, align 4
  br label %269

103:                                              ; preds = %99
  %104 = landingpad { ptr, i32 }
          catch ptr null
  %105 = extractvalue { ptr, i32 } %104, 0
  store ptr %105, ptr %14, align 8
  %106 = extractvalue { ptr, i32 } %104, 1
  store i32 %106, ptr %15, align 4
  br label %270

107:                                              ; preds = %101, %96
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #6
  %108 = load ptr, ptr %11, align 8, !tbaa !5
  %109 = load i32, ptr %18, align 4, !tbaa !9
  %110 = load ptr, ptr %108, align 8, !tbaa !23
  %111 = getelementptr inbounds ptr, ptr %110, i64 8
  %112 = load ptr, ptr %111, align 8
  %113 = invoke noundef i32 %112(ptr noundef nonnull align 8 dereferenceable(8) %108, i32 noundef %109)
          to label %114 unwind label %119

114:                                              ; preds = %107
  store i32 %113, ptr %20, align 4, !tbaa !9
  %115 = load i32, ptr %20, align 4, !tbaa !9
  %116 = icmp ne i32 %115, 0
  br i1 %116, label %117, label %123

117:                                              ; preds = %114
  %118 = load i32, ptr %20, align 4, !tbaa !9
  store i32 %118, ptr %6, align 4
  store i32 1, ptr %16, align 4
  br label %124

119:                                              ; preds = %107
  %120 = landingpad { ptr, i32 }
          catch ptr null
  %121 = extractvalue { ptr, i32 } %120, 0
  store ptr %121, ptr %14, align 8
  %122 = extractvalue { ptr, i32 } %120, 1
  store i32 %122, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #6
  br label %270

123:                                              ; preds = %114
  store i32 0, ptr %16, align 4
  br label %124

124:                                              ; preds = %123, %117
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #6
  %125 = load i32, ptr %16, align 4
  switch i32 %125, label %269 [
    i32 0, label %126
  ]

126:                                              ; preds = %124
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #6
  %127 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 72) #7
          to label %128 unwind label %145

128:                                              ; preds = %126
  invoke void @_ZN9NCompress10CCopyCoderC2Ev(ptr noundef nonnull align 8 dereferenceable(72) %127)
          to label %129 unwind label %149

129:                                              ; preds = %128
  store ptr %127, ptr %21, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #6
  %130 = load ptr, ptr %21, align 8, !tbaa !5
  call void @_ZN9CMyComPtrI14ICompressCoderEC2EPS0_(ptr noundef nonnull align 8 dereferenceable(8) %22, ptr noundef %130) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #6
  %131 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 72) #7
          to label %132 unwind label %153

132:                                              ; preds = %129
  invoke void @_ZN14CLocalProgressC1Ev(ptr noundef nonnull align 8 dereferenceable(66) %131)
          to label %133 unwind label %157

133:                                              ; preds = %132
  store ptr %131, ptr %23, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #6
  %134 = load ptr, ptr %23, align 8, !tbaa !5
  call void @_ZN9CMyComPtrI21ICompressProgressInfoEC2EPS0_(ptr noundef nonnull align 8 dereferenceable(8) %24, ptr noundef %134) #6
  %135 = load ptr, ptr %23, align 8, !tbaa !5
  %136 = load ptr, ptr %11, align 8, !tbaa !5
  invoke void @_ZN14CLocalProgress4InitEP9IProgressb(ptr noundef nonnull align 8 dereferenceable(66) %135, ptr noundef %136, i1 noundef zeroext false)
          to label %137 unwind label %161

137:                                              ; preds = %133
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #6
  store i32 0, ptr %25, align 4, !tbaa !9
  br label %138

138:                                              ; preds = %250, %137
  %139 = load i32, ptr %25, align 4, !tbaa !9
  %140 = getelementptr inbounds %"class.NArchive::NSplit::CHandler", ptr %30, i32 0, i32 3
  %141 = invoke noundef i32 @_ZNK13CObjectVectorI9CMyComPtrI9IInStreamEE4SizeEv(ptr noundef nonnull align 8 dereferenceable(16) %140)
          to label %142 unwind label %165

142:                                              ; preds = %138
  %143 = icmp ult i32 %139, %141
  br i1 %143, label %169, label %144

144:                                              ; preds = %142
  store i32 2, ptr %16, align 4
  br label %254

145:                                              ; preds = %126
  %146 = landingpad { ptr, i32 }
          catch ptr null
  %147 = extractvalue { ptr, i32 } %146, 0
  store ptr %147, ptr %14, align 8
  %148 = extractvalue { ptr, i32 } %146, 1
  store i32 %148, ptr %15, align 4
  br label %268

149:                                              ; preds = %128
  %150 = landingpad { ptr, i32 }
          catch ptr null
  %151 = extractvalue { ptr, i32 } %150, 0
  store ptr %151, ptr %14, align 8
  %152 = extractvalue { ptr, i32 } %150, 1
  store i32 %152, ptr %15, align 4
  call void @_ZdlPvm(ptr noundef %127, i64 noundef 72) #8
  br label %268

153:                                              ; preds = %129
  %154 = landingpad { ptr, i32 }
          catch ptr null
  %155 = extractvalue { ptr, i32 } %154, 0
  store ptr %155, ptr %14, align 8
  %156 = extractvalue { ptr, i32 } %154, 1
  store i32 %156, ptr %15, align 4
  br label %267

157:                                              ; preds = %132
  %158 = landingpad { ptr, i32 }
          catch ptr null
  %159 = extractvalue { ptr, i32 } %158, 0
  store ptr %159, ptr %14, align 8
  %160 = extractvalue { ptr, i32 } %158, 1
  store i32 %160, ptr %15, align 4
  call void @_ZdlPvm(ptr noundef %131, i64 noundef 72) #8
  br label %267

161:                                              ; preds = %258, %257, %133
  %162 = landingpad { ptr, i32 }
          catch ptr null
  %163 = extractvalue { ptr, i32 } %162, 0
  store ptr %163, ptr %14, align 8
  %164 = extractvalue { ptr, i32 } %162, 1
  store i32 %164, ptr %15, align 4
  br label %266

165:                                              ; preds = %138
  %166 = landingpad { ptr, i32 }
          catch ptr null
  %167 = extractvalue { ptr, i32 } %166, 0
  store ptr %167, ptr %14, align 8
  %168 = extractvalue { ptr, i32 } %166, 1
  store i32 %168, ptr %15, align 4
  br label %256

169:                                              ; preds = %142
  %170 = load i64, ptr %12, align 8, !tbaa !11
  %171 = load ptr, ptr %23, align 8, !tbaa !5
  %172 = getelementptr inbounds %class.CLocalProgress, ptr %171, i32 0, i32 9
  store i64 %170, ptr %172, align 8, !tbaa !25
  %173 = load ptr, ptr %23, align 8, !tbaa !5
  %174 = getelementptr inbounds %class.CLocalProgress, ptr %173, i32 0, i32 8
  store i64 %170, ptr %174, align 8, !tbaa !31
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #6
  %175 = load ptr, ptr %23, align 8, !tbaa !5
  %176 = invoke noundef i32 @_ZN14CLocalProgress6SetCurEv(ptr noundef nonnull align 8 dereferenceable(66) %175)
          to label %177 unwind label %182

177:                                              ; preds = %169
  store i32 %176, ptr %26, align 4, !tbaa !9
  %178 = load i32, ptr %26, align 4, !tbaa !9
  %179 = icmp ne i32 %178, 0
  br i1 %179, label %180, label %186

180:                                              ; preds = %177
  %181 = load i32, ptr %26, align 4, !tbaa !9
  store i32 %181, ptr %6, align 4
  store i32 1, ptr %16, align 4
  br label %187

182:                                              ; preds = %169
  %183 = landingpad { ptr, i32 }
          catch ptr null
  %184 = extractvalue { ptr, i32 } %183, 0
  store ptr %184, ptr %14, align 8
  %185 = extractvalue { ptr, i32 } %183, 1
  store i32 %185, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #6
  br label %256

186:                                              ; preds = %177
  store i32 0, ptr %16, align 4
  br label %187

187:                                              ; preds = %186, %180
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #6
  %188 = load i32, ptr %16, align 4
  switch i32 %188, label %254 [
    i32 0, label %189
  ]

189:                                              ; preds = %187
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #6
  %190 = getelementptr inbounds %"class.NArchive::NSplit::CHandler", ptr %30, i32 0, i32 3
  %191 = load i32, ptr %25, align 4, !tbaa !9
  %192 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN13CObjectVectorI9CMyComPtrI9IInStreamEEixEj(ptr noundef nonnull align 8 dereferenceable(16) %190, i32 noundef %191)
          to label %193 unwind label %206

193:                                              ; preds = %189
  %194 = invoke noundef ptr @_ZNK9CMyComPtrI9IInStreamEcvPS0_Ev(ptr noundef nonnull align 8 dereferenceable(8) %192)
          to label %195 unwind label %206

195:                                              ; preds = %193
  store ptr %194, ptr %27, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #6
  %196 = load ptr, ptr %27, align 8, !tbaa !5
  %197 = load ptr, ptr %196, align 8, !tbaa !23
  %198 = getelementptr inbounds ptr, ptr %197, i64 6
  %199 = load ptr, ptr %198, align 8
  %200 = invoke noundef i32 %199(ptr noundef nonnull align 8 dereferenceable(8) %196, i64 noundef 0, i32 noundef 0, ptr noundef null)
          to label %201 unwind label %210

201:                                              ; preds = %195
  store i32 %200, ptr %28, align 4, !tbaa !9
  %202 = load i32, ptr %28, align 4, !tbaa !9
  %203 = icmp ne i32 %202, 0
  br i1 %203, label %204, label %214

204:                                              ; preds = %201
  %205 = load i32, ptr %28, align 4, !tbaa !9
  store i32 %205, ptr %6, align 4
  store i32 1, ptr %16, align 4
  br label %215

206:                                              ; preds = %193, %189
  %207 = landingpad { ptr, i32 }
          catch ptr null
  %208 = extractvalue { ptr, i32 } %207, 0
  store ptr %208, ptr %14, align 8
  %209 = extractvalue { ptr, i32 } %207, 1
  store i32 %209, ptr %15, align 4
  br label %253

210:                                              ; preds = %195
  %211 = landingpad { ptr, i32 }
          catch ptr null
  %212 = extractvalue { ptr, i32 } %211, 0
  store ptr %212, ptr %14, align 8
  %213 = extractvalue { ptr, i32 } %211, 1
  store i32 %213, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #6
  br label %253

214:                                              ; preds = %201
  store i32 0, ptr %16, align 4
  br label %215

215:                                              ; preds = %214, %204
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #6
  %216 = load i32, ptr %16, align 4
  switch i32 %216, label %247 [
    i32 0, label %217
  ]

217:                                              ; preds = %215
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #6
  %218 = invoke noundef ptr @_ZNK9CMyComPtrI14ICompressCoderEptEv(ptr noundef nonnull align 8 dereferenceable(8) %22)
          to label %219 unwind label %234

219:                                              ; preds = %217
  %220 = load ptr, ptr %27, align 8, !tbaa !5
  %221 = invoke noundef ptr @_ZNK9CMyComPtrI20ISequentialOutStreamEcvPS0_Ev(ptr noundef nonnull align 8 dereferenceable(8) %17)
          to label %222 unwind label %234

222:                                              ; preds = %219
  %223 = invoke noundef ptr @_ZNK9CMyComPtrI21ICompressProgressInfoEcvPS0_Ev(ptr noundef nonnull align 8 dereferenceable(8) %24)
          to label %224 unwind label %234

224:                                              ; preds = %222
  %225 = load ptr, ptr %218, align 8, !tbaa !23
  %226 = getelementptr inbounds ptr, ptr %225, i64 5
  %227 = load ptr, ptr %226, align 8
  %228 = invoke noundef i32 %227(ptr noundef nonnull align 8 dereferenceable(8) %218, ptr noundef %220, ptr noundef %221, ptr noundef null, ptr noundef null, ptr noundef %223)
          to label %229 unwind label %234

229:                                              ; preds = %224
  store i32 %228, ptr %29, align 4, !tbaa !9
  %230 = load i32, ptr %29, align 4, !tbaa !9
  %231 = icmp ne i32 %230, 0
  br i1 %231, label %232, label %238

232:                                              ; preds = %229
  %233 = load i32, ptr %29, align 4, !tbaa !9
  store i32 %233, ptr %6, align 4
  store i32 1, ptr %16, align 4
  br label %239

234:                                              ; preds = %224, %222, %219, %217
  %235 = landingpad { ptr, i32 }
          catch ptr null
  %236 = extractvalue { ptr, i32 } %235, 0
  store ptr %236, ptr %14, align 8
  %237 = extractvalue { ptr, i32 } %235, 1
  store i32 %237, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #6
  br label %253

238:                                              ; preds = %229
  store i32 0, ptr %16, align 4
  br label %239

239:                                              ; preds = %238, %232
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #6
  %240 = load i32, ptr %16, align 4
  switch i32 %240, label %247 [
    i32 0, label %241
  ]

241:                                              ; preds = %239
  %242 = load ptr, ptr %21, align 8, !tbaa !5
  %243 = getelementptr inbounds %"class.NCompress::CCopyCoder", ptr %242, i32 0, i32 8
  %244 = load i64, ptr %243, align 8, !tbaa !32
  %245 = load i64, ptr %12, align 8, !tbaa !11
  %246 = add i64 %245, %244
  store i64 %246, ptr %12, align 8, !tbaa !11
  store i32 0, ptr %16, align 4
  br label %247

247:                                              ; preds = %241, %239, %215
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #6
  %248 = load i32, ptr %16, align 4
  switch i32 %248, label %254 [
    i32 0, label %249
  ]

249:                                              ; preds = %247
  br label %250

250:                                              ; preds = %249
  %251 = load i32, ptr %25, align 4, !tbaa !9
  %252 = add i32 %251, 1
  store i32 %252, ptr %25, align 4, !tbaa !9
  br label %138, !llvm.loop !40

253:                                              ; preds = %234, %210, %206
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #6
  br label %256

254:                                              ; preds = %247, %187, %144
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #6
  %255 = load i32, ptr %16, align 4
  switch i32 %255, label %265 [
    i32 2, label %257
  ]

256:                                              ; preds = %253, %182, %165
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #6
  br label %266

257:                                              ; preds = %254
  invoke void @_ZN9CMyComPtrI20ISequentialOutStreamE7ReleaseEv(ptr noundef nonnull align 8 dereferenceable(8) %17)
          to label %258 unwind label %161

258:                                              ; preds = %257
  %259 = load ptr, ptr %11, align 8, !tbaa !5
  %260 = load ptr, ptr %259, align 8, !tbaa !23
  %261 = getelementptr inbounds ptr, ptr %260, i64 9
  %262 = load ptr, ptr %261, align 8
  %263 = invoke noundef i32 %262(ptr noundef nonnull align 8 dereferenceable(8) %259, i32 noundef 0)
          to label %264 unwind label %161

264:                                              ; preds = %258
  store i32 %263, ptr %6, align 4
  store i32 1, ptr %16, align 4
  br label %265

265:                                              ; preds = %264, %254
  call void @_ZN9CMyComPtrI21ICompressProgressInfoED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %24) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #6
  call void @_ZN9CMyComPtrI14ICompressCoderED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %22) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #6
  br label %269

266:                                              ; preds = %256, %161
  call void @_ZN9CMyComPtrI21ICompressProgressInfoED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %24) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #6
  br label %267

267:                                              ; preds = %266, %157, %153
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #6
  call void @_ZN9CMyComPtrI14ICompressCoderED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %22) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #6
  br label %268

268:                                              ; preds = %267, %149, %145
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #6
  br label %270

269:                                              ; preds = %265, %124, %102, %94
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #6
  call void @_ZN9CMyComPtrI20ISequentialOutStreamED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %17) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  br label %272

270:                                              ; preds = %268, %119, %103, %89
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #6
  call void @_ZN9CMyComPtrI20ISequentialOutStreamED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %17) #6
  br label %271

271:                                              ; preds = %270, %85
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  br label %273

272:                                              ; preds = %269, %64
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  br label %278

273:                                              ; preds = %271, %59
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  br label %274

274:                                              ; preds = %273
  %275 = load ptr, ptr %14, align 8
  %276 = call ptr @__cxa_begin_catch(ptr %275) #6
  store i32 -2147024882, ptr %6, align 4
  store i32 1, ptr %16, align 4
  call void @__cxa_end_catch()
  br label %278

277:                                              ; No predecessors!
  unreachable

278:                                              ; preds = %274, %272, %45, %33
  %279 = load i32, ptr %6, align 4
  ret i32 %279
}

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

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

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

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

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

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

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

declare void @_ZN14CLocalProgressC1Ev(ptr noundef nonnull align 8 dereferenceable(66)) unnamed_addr #5

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

declare void @_ZN14CLocalProgress4InitEP9IProgressb(ptr noundef nonnull align 8 dereferenceable(66), ptr noundef, i1 noundef zeroext) #5

declare noundef i32 @_ZN14CLocalProgress6SetCurEv(ptr noundef nonnull align 8 dereferenceable(66)) #5

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

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

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

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

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

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

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

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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 #3 = { nobuiltin allocsize(0) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 = { "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 = { nounwind }
attributes #7 = { builtin allocsize(0) }
attributes #8 = { 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 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long long", !7, i64 0}
!13 = !{!14, !12, i64 72}
!14 = !{!"_ZTSN8NArchive6NSplit8CHandlerE", !15, i64 0, !17, i64 8, !18, i64 16, !19, i64 24, !21, i64 40, !22, i64 56, !12, i64 72}
!15 = !{!"_ZTS10IInArchive", !16, i64 0}
!16 = !{!"_ZTS8IUnknown"}
!17 = !{!"_ZTS19IInArchiveGetStream", !16, i64 0}
!18 = !{!"_ZTS13CMyUnknownImp", !10, i64 0}
!19 = !{!"_ZTS13CObjectVectorI9CMyComPtrI9IInStreamEE", !20, i64 0}
!20 = !{!"_ZTS13CRecordVectorIPvE", !6, i64 0, !10, i64 8, !10, i64 12}
!21 = !{!"_ZTS13CRecordVectorIyE", !6, i64 0, !10, i64 8, !10, i64 12}
!22 = !{!"_ZTS7UString", !6, i64 0, !10, i64 8, !10, i64 12}
!23 = !{!24, !24, i64 0}
!24 = !{!"vtable pointer", !8, i64 0}
!25 = !{!26, !12, i64 56}
!26 = !{!"_ZTS14CLocalProgress", !27, i64 0, !18, i64 8, !28, i64 16, !29, i64 24, !30, i64 32, !12, i64 40, !12, i64 48, !12, i64 56, !30, i64 64, !30, i64 65}
!27 = !{!"_ZTS21ICompressProgressInfo", !16, i64 0}
!28 = !{!"_ZTS9CMyComPtrI9IProgressE", !6, i64 0}
!29 = !{!"_ZTS9CMyComPtrI21ICompressProgressInfoE", !6, i64 0}
!30 = !{!"bool", !7, i64 0}
!31 = !{!26, !12, i64 48}
!32 = !{!33, !12, i64 64}
!33 = !{!"_ZTSN9NCompress10CCopyCoderE", !34, i64 0, !35, i64 8, !36, i64 16, !37, i64 24, !38, i64 32, !18, i64 40, !6, i64 48, !39, i64 56, !12, i64 64}
!34 = !{!"_ZTS14ICompressCoder", !16, i64 0}
!35 = !{!"_ZTS20ICompressSetInStream", !16, i64 0}
!36 = !{!"_ZTS19ISequentialInStream", !16, i64 0}
!37 = !{!"_ZTS22ICompressSetFinishMode", !16, i64 0}
!38 = !{!"_ZTS33ICompressGetInStreamProcessedSize", !16, i64 0}
!39 = !{!"_ZTS9CMyComPtrI19ISequentialInStreamE", !6, i64 0}
!40 = distinct !{!40, !41}
!41 = !{!"llvm.loop.mustprogress"}


; 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.2 = type { ptr }
%class.CMyComPtr.4 = type { ptr }
%class.CMyComPtr.6 = type { ptr }

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

declare i32 @__gxx_personality_v0(...)

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

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

declare ptr @__cxa_begin_catch(ptr) local_unnamed_addr

declare void @__cxa_end_catch() local_unnamed_addr

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN8NArchive6NSplit8CHandler7ExtractEPKjjiP23IArchiveExtractCallback(ptr noundef nonnull align 8 dereferenceable(80) %0, ptr nocapture noundef readonly %1, i32 noundef %2, i32 noundef %3, ptr noundef %4) unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %6 = alloca %class.CMyComPtr.2, align 8
  %7 = alloca %class.CMyComPtr.4, align 8
  %8 = alloca %class.CMyComPtr.6, align 8
  switch i32 %2, label %11 [
    i32 0, label %107
    i32 -1, label %12
    i32 1, label %9
  ]

9:                                                ; preds = %5
  %10 = load i32, ptr %1, align 4, !tbaa !5
  %.not80 = icmp eq i32 %10, 0
  br i1 %.not80, label %12, label %11

11:                                               ; preds = %5, %9
  br label %107

12:                                               ; preds = %5, %9
  %13 = getelementptr inbounds i8, ptr %0, i64 72
  %14 = load i64, ptr %13, align 8, !tbaa !9
  %15 = load ptr, ptr %4, align 8, !tbaa !21
  %16 = getelementptr inbounds i8, ptr %15, i64 40
  %17 = load ptr, ptr %16, align 8
  %18 = invoke noundef i32 %17(ptr noundef nonnull align 8 dereferenceable(8) %4, i64 noundef %14)
          to label %19 unwind label %20

19:                                               ; preds = %12
  %.not81 = icmp eq i32 %18, 0
  br i1 %.not81, label %22, label %107

20:                                               ; preds = %12
  %21 = landingpad { ptr, i32 }
          catch ptr null
  br label %105

22:                                               ; preds = %19
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #6
  call void @_ZN9CMyComPtrI20ISequentialOutStreamEC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %6)
  %.not82 = icmp ne i32 %3, 0
  %23 = zext i1 %.not82 to i32
  %24 = call noundef ptr @_ZN9CMyComPtrI20ISequentialOutStreamEadEv(ptr noundef nonnull align 8 dereferenceable(8) %6)
  %25 = load ptr, ptr %4, align 8, !tbaa !21
  %26 = getelementptr inbounds i8, ptr %25, i64 56
  %27 = load ptr, ptr %26, align 8
  %28 = invoke noundef i32 %27(ptr noundef nonnull align 8 dereferenceable(8) %4, i32 noundef 0, ptr noundef %24, i32 noundef %23)
          to label %29 unwind label %30

29:                                               ; preds = %22
  %.not83 = icmp eq i32 %28, 0
  br i1 %.not83, label %32, label %103

30:                                               ; preds = %22
  %31 = landingpad { ptr, i32 }
          catch ptr null
  br label %104

32:                                               ; preds = %29
  br i1 %.not82, label %35, label %33

33:                                               ; preds = %32
  %34 = call noundef zeroext i1 @_ZNK9CMyComPtrI20ISequentialOutStreamEntEv(ptr noundef nonnull align 8 dereferenceable(8) %6)
  br i1 %34, label %103, label %35

35:                                               ; preds = %33, %32
  %36 = load ptr, ptr %4, align 8, !tbaa !21
  %37 = getelementptr inbounds i8, ptr %36, i64 64
  %38 = load ptr, ptr %37, align 8
  %39 = invoke noundef i32 %38(ptr noundef nonnull align 8 dereferenceable(8) %4, i32 noundef %23)
          to label %40 unwind label %41

40:                                               ; preds = %35
  %.not84 = icmp eq i32 %39, 0
  br i1 %.not84, label %43, label %103

41:                                               ; preds = %35
  %42 = landingpad { ptr, i32 }
          catch ptr null
  br label %104

43:                                               ; preds = %40
  %44 = invoke noalias noundef nonnull dereferenceable(72) ptr @_Znwm(i64 noundef 72) #7
          to label %45 unwind label %55

45:                                               ; preds = %43
  invoke void @_ZN9NCompress10CCopyCoderC2Ev(ptr noundef nonnull align 8 dereferenceable(72) %44)
          to label %46 unwind label %57

46:                                               ; preds = %45
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #6
  call void @_ZN9CMyComPtrI14ICompressCoderEC2EPS0_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull %44) #6
  %47 = invoke noalias noundef nonnull dereferenceable(72) ptr @_Znwm(i64 noundef 72) #7
          to label %48 unwind label %59

48:                                               ; preds = %46
  invoke void @_ZN14CLocalProgressC1Ev(ptr noundef nonnull align 8 dereferenceable(66) %47)
          to label %49 unwind label %61

49:                                               ; preds = %48
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #6
  call void @_ZN9CMyComPtrI21ICompressProgressInfoEC2EPS0_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull %47) #6
  invoke void @_ZN14CLocalProgress4InitEP9IProgressb(ptr noundef nonnull align 8 dereferenceable(66) %47, ptr noundef nonnull %4, i1 noundef zeroext false)
          to label %.preheader unwind label %63

.preheader:                                       ; preds = %49
  %50 = getelementptr inbounds i8, ptr %0, i64 24
  %51 = call noundef i32 @_ZNK13CObjectVectorI9CMyComPtrI9IInStreamEE4SizeEv(ptr noundef nonnull align 8 dereferenceable(16) %50)
  %.not8896.not = icmp eq i32 %51, 0
  br i1 %.not8896.not, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader
  %52 = getelementptr inbounds i8, ptr %47, i64 56
  %53 = getelementptr inbounds i8, ptr %47, i64 48
  %54 = getelementptr inbounds i8, ptr %44, i64 64
  br label %65

55:                                               ; preds = %43
  %56 = landingpad { ptr, i32 }
          catch ptr null
  br label %104

57:                                               ; preds = %45
  %58 = landingpad { ptr, i32 }
          catch ptr null
  call void @_ZdlPvm(ptr noundef nonnull %44, i64 noundef 72) #8
  br label %104

59:                                               ; preds = %46
  %60 = landingpad { ptr, i32 }
          catch ptr null
  br label %102

61:                                               ; preds = %48
  %62 = landingpad { ptr, i32 }
          catch ptr null
  call void @_ZdlPvm(ptr noundef nonnull %47, i64 noundef 72) #8
  br label %102

63:                                               ; preds = %96, %._crit_edge, %49
  %64 = landingpad { ptr, i32 }
          catch ptr null
  br label %101

65:                                               ; preds = %.lr.ph, %91
  %.05698 = phi i64 [ 0, %.lr.ph ], [ %93, %91 ]
  %.06597 = phi i32 [ 0, %.lr.ph ], [ %94, %91 ]
  store i64 %.05698, ptr %52, align 8, !tbaa !23
  store i64 %.05698, ptr %53, align 8, !tbaa !29
  %66 = invoke noundef i32 @_ZN14CLocalProgress6SetCurEv(ptr noundef nonnull align 8 dereferenceable(66) %47)
          to label %67 unwind label %68

67:                                               ; preds = %65
  %.not85 = icmp eq i32 %66, 0
  br i1 %.not85, label %70, label %.thread94

68:                                               ; preds = %65
  %69 = landingpad { ptr, i32 }
          catch ptr null
  br label %101

70:                                               ; preds = %67
  %71 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN13CObjectVectorI9CMyComPtrI9IInStreamEEixEj(ptr noundef nonnull align 8 dereferenceable(16) %50, i32 noundef %.06597)
  %72 = call noundef ptr @_ZNK9CMyComPtrI9IInStreamEcvPS0_Ev(ptr noundef nonnull align 8 dereferenceable(8) %71)
  %73 = load ptr, ptr %72, align 8, !tbaa !21
  %74 = getelementptr inbounds i8, ptr %73, i64 48
  %75 = load ptr, ptr %74, align 8
  %76 = invoke noundef i32 %75(ptr noundef nonnull align 8 dereferenceable(8) %72, i64 noundef 0, i32 noundef 0, ptr noundef null)
          to label %77 unwind label %78

77:                                               ; preds = %70
  %.not86 = icmp eq i32 %76, 0
  br i1 %.not86, label %80, label %.thread94

78:                                               ; preds = %70
  %79 = landingpad { ptr, i32 }
          catch ptr null
  br label %101

80:                                               ; preds = %77
  %81 = call noundef ptr @_ZNK9CMyComPtrI14ICompressCoderEptEv(ptr noundef nonnull align 8 dereferenceable(8) %7)
  %82 = call noundef ptr @_ZNK9CMyComPtrI20ISequentialOutStreamEcvPS0_Ev(ptr noundef nonnull align 8 dereferenceable(8) %6)
  %83 = call noundef ptr @_ZNK9CMyComPtrI21ICompressProgressInfoEcvPS0_Ev(ptr noundef nonnull align 8 dereferenceable(8) %8)
  %84 = load ptr, ptr %81, align 8, !tbaa !21
  %85 = getelementptr inbounds i8, ptr %84, i64 40
  %86 = load ptr, ptr %85, align 8
  %87 = invoke noundef i32 %86(ptr noundef nonnull align 8 dereferenceable(8) %81, ptr noundef nonnull %72, ptr noundef %82, ptr noundef null, ptr noundef null, ptr noundef %83)
          to label %88 unwind label %89

88:                                               ; preds = %80
  %.not87 = icmp eq i32 %87, 0
  br i1 %.not87, label %91, label %.thread94

89:                                               ; preds = %80
  %90 = landingpad { ptr, i32 }
          catch ptr null
  br label %101

91:                                               ; preds = %88
  %92 = load i64, ptr %54, align 8, !tbaa !30
  %93 = add i64 %92, %.05698
  %94 = add nuw i32 %.06597, 1
  %95 = call noundef i32 @_ZNK13CObjectVectorI9CMyComPtrI9IInStreamEE4SizeEv(ptr noundef nonnull align 8 dereferenceable(16) %50)
  %.not88 = icmp ult i32 %94, %95
  br i1 %.not88, label %65, label %._crit_edge, !llvm.loop !38

._crit_edge:                                      ; preds = %91, %.preheader
  invoke void @_ZN9CMyComPtrI20ISequentialOutStreamE7ReleaseEv(ptr noundef nonnull align 8 dereferenceable(8) %6)
          to label %96 unwind label %63

96:                                               ; preds = %._crit_edge
  %97 = load ptr, ptr %4, align 8, !tbaa !21
  %98 = getelementptr inbounds i8, ptr %97, i64 72
  %99 = load ptr, ptr %98, align 8
  %100 = invoke noundef i32 %99(ptr noundef nonnull align 8 dereferenceable(8) %4, i32 noundef 0)
          to label %.thread94 unwind label %63

.thread94:                                        ; preds = %77, %88, %67, %96
  %.9 = phi i32 [ %100, %96 ], [ %87, %88 ], [ %76, %77 ], [ %66, %67 ]
  call void @_ZN9CMyComPtrI21ICompressProgressInfoED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #6
  call void @_ZN9CMyComPtrI14ICompressCoderED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #6
  br label %103

101:                                              ; preds = %68, %89, %78, %63
  %.pn89 = phi { ptr, i32 } [ %64, %63 ], [ %69, %68 ], [ %90, %89 ], [ %79, %78 ]
  call void @_ZN9CMyComPtrI21ICompressProgressInfoED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #6
  br label %102

102:                                              ; preds = %101, %61, %59
  %.pn89.pn = phi { ptr, i32 } [ %.pn89, %101 ], [ %62, %61 ], [ %60, %59 ]
  call void @_ZN9CMyComPtrI14ICompressCoderED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #6
  br label %104

103:                                              ; preds = %33, %40, %29, %.thread94
  %.10 = phi i32 [ %.9, %.thread94 ], [ %39, %40 ], [ %28, %29 ], [ 0, %33 ]
  call void @_ZN9CMyComPtrI20ISequentialOutStreamED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  br label %107

104:                                              ; preds = %55, %57, %102, %41, %30
  %.pn89.pn.pn.pn = phi { ptr, i32 } [ %42, %41 ], [ %31, %30 ], [ %.pn89.pn, %102 ], [ %58, %57 ], [ %56, %55 ]
  call void @_ZN9CMyComPtrI20ISequentialOutStreamED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  br label %105

105:                                              ; preds = %104, %20
  %.pn89.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn89.pn.pn.pn, %104 ], [ %21, %20 ]
  %.664 = extractvalue { ptr, i32 } %.pn89.pn.pn.pn.pn, 0
  %106 = call ptr @__cxa_begin_catch(ptr %.664) #6
  call void @__cxa_end_catch()
  br label %107

107:                                              ; preds = %103, %19, %5, %105, %11
  %.12 = phi i32 [ -2147024809, %11 ], [ -2147024882, %105 ], [ %2, %5 ], [ %.10, %103 ], [ %18, %19 ]
  ret i32 %.12
}

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

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

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

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

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

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

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

declare void @_ZN14CLocalProgressC1Ev(ptr noundef nonnull align 8 dereferenceable(66)) unnamed_addr #5

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

declare void @_ZN14CLocalProgress4InitEP9IProgressb(ptr noundef nonnull align 8 dereferenceable(66), ptr noundef, i1 noundef zeroext) local_unnamed_addr #5

declare noundef i32 @_ZN14CLocalProgress6SetCurEv(ptr noundef nonnull align 8 dereferenceable(66)) local_unnamed_addr #5

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

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

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

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

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

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

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

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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 #3 = { nobuiltin allocsize(0) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 = { "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 = { nounwind }
attributes #7 = { builtin allocsize(0) }
attributes #8 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !20, i64 72}
!10 = !{!"_ZTSN8NArchive6NSplit8CHandlerE", !11, i64 0, !13, i64 8, !14, i64 16, !15, i64 24, !18, i64 40, !19, i64 56, !20, i64 72}
!11 = !{!"_ZTS10IInArchive", !12, i64 0}
!12 = !{!"_ZTS8IUnknown"}
!13 = !{!"_ZTS19IInArchiveGetStream", !12, i64 0}
!14 = !{!"_ZTS13CMyUnknownImp", !6, i64 0}
!15 = !{!"_ZTS13CObjectVectorI9CMyComPtrI9IInStreamEE", !16, i64 0}
!16 = !{!"_ZTS13CRecordVectorIPvE", !17, i64 0, !6, i64 8, !6, i64 12}
!17 = !{!"any pointer", !7, i64 0}
!18 = !{!"_ZTS13CRecordVectorIyE", !17, i64 0, !6, i64 8, !6, i64 12}
!19 = !{!"_ZTS7UString", !17, i64 0, !6, i64 8, !6, i64 12}
!20 = !{!"long long", !7, i64 0}
!21 = !{!22, !22, i64 0}
!22 = !{!"vtable pointer", !8, i64 0}
!23 = !{!24, !20, i64 56}
!24 = !{!"_ZTS14CLocalProgress", !25, i64 0, !14, i64 8, !26, i64 16, !27, i64 24, !28, i64 32, !20, i64 40, !20, i64 48, !20, i64 56, !28, i64 64, !28, i64 65}
!25 = !{!"_ZTS21ICompressProgressInfo", !12, i64 0}
!26 = !{!"_ZTS9CMyComPtrI9IProgressE", !17, i64 0}
!27 = !{!"_ZTS9CMyComPtrI21ICompressProgressInfoE", !17, i64 0}
!28 = !{!"bool", !7, i64 0}
!29 = !{!24, !20, i64 48}
!30 = !{!31, !20, i64 64}
!31 = !{!"_ZTSN9NCompress10CCopyCoderE", !32, i64 0, !33, i64 8, !34, i64 16, !35, i64 24, !36, i64 32, !14, i64 40, !17, i64 48, !37, i64 56, !20, i64 64}
!32 = !{!"_ZTS14ICompressCoder", !12, i64 0}
!33 = !{!"_ZTS20ICompressSetInStream", !12, i64 0}
!34 = !{!"_ZTS19ISequentialInStream", !12, i64 0}
!35 = !{!"_ZTS22ICompressSetFinishMode", !12, i64 0}
!36 = !{!"_ZTS33ICompressGetInStreamProcessedSize", !12, i64 0}
!37 = !{!"_ZTS9CMyComPtrI19ISequentialInStreamE", !17, i64 0}
!38 = distinct !{!38, !39}
!39 = !{!"llvm.loop.mustprogress"}


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