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

; 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.NArchive::N7z::CHandler" = type { %struct.IInArchive, %struct.IArchiveGetRawProps, %struct.ISetProperties, %struct.IOutArchive, %class.CMyUnknownImp, %"class.NArchive::N7z::COutHandler", %class.CMyComPtr, %"struct.NArchive::N7z::CDbEx", i8, i8, %class.UString, %class.CRecordVector.8, %class.CRecordVector.6 }
%struct.IInArchive = type { %struct.IUnknown }
%struct.IUnknown = type { ptr }
%struct.IArchiveGetRawProps = type { %struct.IUnknown }
%struct.ISetProperties = type { %struct.IUnknown }
%struct.IOutArchive = type { %struct.IUnknown }
%class.CMyUnknownImp = type { i32 }
%"class.NArchive::N7z::COutHandler" = type { %"class.NArchive::CMultiMethodProps.base", i64, i64, i8, i8, i8, i8, i8, i8, %struct.CBoolPair, %struct.CBoolPair, %struct.CBoolPair, %struct.CBoolPair, i8, i8 }
%"class.NArchive::CMultiMethodProps.base" = type <{ %"class.NArchive::CCommonMethodProps", i32, i32, i32, [4 x i8], %class.CObjectVector, %class.COneMethodInfo, i8 }>
%"class.NArchive::CCommonMethodProps" = type { i32, i32, i64, i64 }
%class.CObjectVector = type { %class.CRecordVector }
%class.CRecordVector = type { ptr, i32, i32 }
%class.COneMethodInfo = type { %class.CMethodProps, %class.AString, %class.UString }
%class.CMethodProps = type { %struct.CProps }
%struct.CProps = type { %class.CObjectVector.0 }
%class.CObjectVector.0 = type { %class.CRecordVector }
%class.AString = type { ptr, i32, i32 }
%struct.CBoolPair = type { i8, i8 }
%class.CMyComPtr = type { ptr }
%"struct.NArchive::N7z::CDbEx" = type <{ %"struct.NArchive::N7z::CDatabase", %"struct.NArchive::N7z::CInArchiveInfo", %class.CObjArray.3, %class.CObjArray.3, i64, i64, i8, i8, i8, i8, i8, i8, i8, i8 }>
%"struct.NArchive::N7z::CDatabase" = type { %"struct.NArchive::N7z::CFolders", %class.CRecordVector.7, %"struct.NArchive::N7z::CUInt64DefVector", %"struct.NArchive::N7z::CUInt64DefVector", %"struct.NArchive::N7z::CUInt64DefVector", %"struct.NArchive::N7z::CUInt64DefVector", %"struct.NArchive::N7z::CUInt32DefVector", %class.CRecordVector.1, %class.CBuffer, %class.CObjArray.5 }
%"struct.NArchive::N7z::CFolders" = type { i32, i32, %class.CObjArray, %"struct.NArchive::N7z::CUInt32DefVector", %class.CObjArray.3, %class.CObjArray, %class.CObjArray.3, %class.CObjArray.3, %class.CObjArray.4, %class.CObjArray.5, %class.CBuffer, %"struct.NArchive::N7z::CParsedMethods" }
%class.CObjArray = type { ptr }
%class.CObjArray.4 = type { ptr }
%"struct.NArchive::N7z::CParsedMethods" = type { i8, i32, %class.CRecordVector.6 }
%class.CRecordVector.7 = type { ptr, i32, i32 }
%"struct.NArchive::N7z::CUInt64DefVector" = type { %class.CRecordVector.1, %class.CRecordVector.6 }
%"struct.NArchive::N7z::CUInt32DefVector" = type { %class.CRecordVector.1, %class.CRecordVector.2 }
%class.CRecordVector.2 = type { ptr, i32, i32 }
%class.CRecordVector.1 = type { ptr, i32, i32 }
%class.CBuffer = type { ptr, i64 }
%class.CObjArray.5 = type { ptr }
%"struct.NArchive::N7z::CInArchiveInfo" = type { %"struct.NArchive::N7z::CArchiveVersion", i64, i64, i64, i64, %class.CRecordVector.6 }
%"struct.NArchive::N7z::CArchiveVersion" = type { i8, i8 }
%class.CObjArray.3 = type { ptr }
%class.UString = type { ptr, i32, i32 }
%class.CRecordVector.8 = type { ptr, i32, i32 }
%class.CRecordVector.6 = type { ptr, i32, i32 }
%"struct.NArchive::N7z::CFileItem" = type { i64, i32, i8, i8, i8 }

; 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
declare dso_local noundef zeroext i1 @_ZNK8NArchive3N7z8CHandler17IsFolderEncryptedEj(ptr noundef nonnull align 8 dereferenceable(696), i32 noundef) #1 align 2

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

; Function Attrs: nounwind
declare noundef i32 @_ZN8NWindows4NCOM17PropVariant_ClearEP14tagPROPVARIANT(ptr noundef) #2

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN8NArchive3N7z8CHandler11GetPropertyEjjP14tagPROPVARIANT(ptr noundef nonnull align 8 dereferenceable(696) %0, i32 noundef %1, i32 noundef %2, ptr noundef %3) unnamed_addr #1 align 2 {
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i64, align 8
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store i32 %1, ptr %7, align 4, !tbaa !9
  store i32 %2, ptr %8, align 4, !tbaa !9
  store ptr %3, ptr %9, align 8, !tbaa !5
  %16 = load ptr, ptr %6, align 8
  %17 = load ptr, ptr %9, align 8, !tbaa !5
  %18 = call noundef i32 @_ZN8NWindows4NCOM17PropVariant_ClearEP14tagPROPVARIANT(ptr noundef %17) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  %19 = getelementptr inbounds %"class.NArchive::N7z::CHandler", ptr %16, i32 0, i32 7
  %20 = getelementptr inbounds %"struct.NArchive::N7z::CDatabase", ptr %19, i32 0, i32 1
  %21 = load i32, ptr %7, align 4, !tbaa !9
  %22 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN13CRecordVectorIN8NArchive3N7z9CFileItemEEixEj(ptr noundef nonnull align 8 dereferenceable(16) %20, i32 noundef %21)
  store ptr %22, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  %23 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %23, ptr %11, align 4, !tbaa !9
  %24 = load i32, ptr %8, align 4, !tbaa !9
  switch i32 %24, label %158 [
    i32 6, label %25
    i32 7, label %31
    i32 8, label %36
    i32 29, label %65
    i32 10, label %74
    i32 11, label %79
    i32 12, label %84
    i32 9, label %89
    i32 19, label %103
    i32 15, label %114
    i32 21, label %124
    i32 3, label %129
    i32 22, label %134
    i32 27, label %144
  ]

25:                                               ; preds = %4
  %26 = load ptr, ptr %9, align 8, !tbaa !5
  %27 = load ptr, ptr %10, align 8, !tbaa !5
  %28 = getelementptr inbounds %"struct.NArchive::N7z::CFileItem", ptr %27, i32 0, i32 3
  %29 = load i8, ptr %28, align 1, !tbaa !11, !range !15, !noundef !16
  %30 = trunc i8 %29 to i1
  call void @_ZN8NWindows4NCOM18PropVarEm_Set_BoolEP14tagPROPVARIANTb(ptr noundef %26, i1 noundef zeroext %30) #5
  br label %158

31:                                               ; preds = %4
  %32 = load ptr, ptr %9, align 8, !tbaa !5
  %33 = load ptr, ptr %10, align 8, !tbaa !5
  %34 = getelementptr inbounds %"struct.NArchive::N7z::CFileItem", ptr %33, i32 0, i32 0
  %35 = load i64, ptr %34, align 8, !tbaa !17
  call void @_ZN8NWindows4NCOM20PropVarEm_Set_UInt64EP14tagPROPVARIANTy(ptr noundef %32, i64 noundef %35) #5
  br label %158

36:                                               ; preds = %4
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  %37 = getelementptr inbounds %"class.NArchive::N7z::CHandler", ptr %16, i32 0, i32 7
  %38 = getelementptr inbounds %"struct.NArchive::N7z::CDbEx", ptr %37, i32 0, i32 3
  %39 = call noundef ptr @_ZN9CObjArrayIjEcvPjEv(ptr noundef nonnull align 8 dereferenceable(8) %38)
  %40 = load i32, ptr %11, align 4, !tbaa !9
  %41 = zext i32 %40 to i64
  %42 = getelementptr inbounds i32, ptr %39, i64 %41
  %43 = load i32, ptr %42, align 4, !tbaa !9
  store i32 %43, ptr %12, align 4, !tbaa !9
  %44 = load i32, ptr %12, align 4, !tbaa !9
  %45 = icmp ne i32 %44, -1
  br i1 %45, label %46, label %62

46:                                               ; preds = %36
  %47 = getelementptr inbounds %"class.NArchive::N7z::CHandler", ptr %16, i32 0, i32 7
  %48 = getelementptr inbounds %"struct.NArchive::N7z::CDbEx", ptr %47, i32 0, i32 2
  %49 = call noundef ptr @_ZN9CObjArrayIjEcvPjEv(ptr noundef nonnull align 8 dereferenceable(8) %48)
  %50 = load i32, ptr %12, align 4, !tbaa !9
  %51 = zext i32 %50 to i64
  %52 = getelementptr inbounds i32, ptr %49, i64 %51
  %53 = load i32, ptr %52, align 4, !tbaa !9
  %54 = load i32, ptr %11, align 4, !tbaa !9
  %55 = icmp eq i32 %53, %54
  br i1 %55, label %56, label %61

56:                                               ; preds = %46
  %57 = load ptr, ptr %9, align 8, !tbaa !5
  %58 = getelementptr inbounds %"class.NArchive::N7z::CHandler", ptr %16, i32 0, i32 7
  %59 = load i32, ptr %12, align 4, !tbaa !9
  %60 = call noundef i64 @_ZNK8NArchive3N7z5CDbEx21GetFolderFullPackSizeEj(ptr noundef nonnull align 8 dereferenceable(447) %58, i32 noundef %59)
  call void @_ZN8NWindows4NCOM20PropVarEm_Set_UInt64EP14tagPROPVARIANTy(ptr noundef %57, i64 noundef %60) #5
  br label %61

61:                                               ; preds = %56, %46
  br label %64

62:                                               ; preds = %36
  %63 = load ptr, ptr %9, align 8, !tbaa !5
  call void @_ZN8NWindows4NCOM20PropVarEm_Set_UInt64EP14tagPROPVARIANTy(ptr noundef %63, i64 noundef 0) #5
  br label %64

64:                                               ; preds = %62, %61
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  br label %158

65:                                               ; preds = %4
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  %66 = getelementptr inbounds %"class.NArchive::N7z::CHandler", ptr %16, i32 0, i32 7
  %67 = getelementptr inbounds %"struct.NArchive::N7z::CDatabase", ptr %66, i32 0, i32 5
  %68 = load i32, ptr %11, align 4, !tbaa !9
  %69 = call noundef zeroext i1 @_ZNK8NArchive3N7z16CUInt64DefVector7GetItemEjRy(ptr noundef nonnull align 8 dereferenceable(32) %67, i32 noundef %68, ptr noundef nonnull align 8 dereferenceable(8) %13)
  br i1 %69, label %70, label %73

70:                                               ; preds = %65
  %71 = load ptr, ptr %9, align 8, !tbaa !5
  %72 = load i64, ptr %13, align 8, !tbaa !18
  call void @_ZN8NWindows4NCOM20PropVarEm_Set_UInt64EP14tagPROPVARIANTy(ptr noundef %71, i64 noundef %72) #5
  br label %73

73:                                               ; preds = %70, %65
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  br label %158

74:                                               ; preds = %4
  %75 = load ptr, ptr %9, align 8, !tbaa !5
  %76 = getelementptr inbounds %"class.NArchive::N7z::CHandler", ptr %16, i32 0, i32 7
  %77 = getelementptr inbounds %"struct.NArchive::N7z::CDatabase", ptr %76, i32 0, i32 2
  %78 = load i32, ptr %11, align 4, !tbaa !9
  call void @_ZN8NArchive3N7zL30SetFileTimeProp_From_UInt64DefEP14tagPROPVARIANTRKNS0_16CUInt64DefVectorEi(ptr noundef %75, ptr noundef nonnull align 8 dereferenceable(32) %77, i32 noundef %78)
  br label %158

79:                                               ; preds = %4
  %80 = load ptr, ptr %9, align 8, !tbaa !5
  %81 = getelementptr inbounds %"class.NArchive::N7z::CHandler", ptr %16, i32 0, i32 7
  %82 = getelementptr inbounds %"struct.NArchive::N7z::CDatabase", ptr %81, i32 0, i32 3
  %83 = load i32, ptr %11, align 4, !tbaa !9
  call void @_ZN8NArchive3N7zL30SetFileTimeProp_From_UInt64DefEP14tagPROPVARIANTRKNS0_16CUInt64DefVectorEi(ptr noundef %80, ptr noundef nonnull align 8 dereferenceable(32) %82, i32 noundef %83)
  br label %158

84:                                               ; preds = %4
  %85 = load ptr, ptr %9, align 8, !tbaa !5
  %86 = getelementptr inbounds %"class.NArchive::N7z::CHandler", ptr %16, i32 0, i32 7
  %87 = getelementptr inbounds %"struct.NArchive::N7z::CDatabase", ptr %86, i32 0, i32 4
  %88 = load i32, ptr %11, align 4, !tbaa !9
  call void @_ZN8NArchive3N7zL30SetFileTimeProp_From_UInt64DefEP14tagPROPVARIANTRKNS0_16CUInt64DefVectorEi(ptr noundef %85, ptr noundef nonnull align 8 dereferenceable(32) %87, i32 noundef %88)
  br label %158

89:                                               ; preds = %4
  %90 = getelementptr inbounds %"class.NArchive::N7z::CHandler", ptr %16, i32 0, i32 7
  %91 = getelementptr inbounds %"struct.NArchive::N7z::CDatabase", ptr %90, i32 0, i32 6
  %92 = load i32, ptr %11, align 4, !tbaa !9
  %93 = call noundef zeroext i1 @_ZNK8NArchive3N7z16CUInt32DefVector15ValidAndDefinedEj(ptr noundef nonnull align 8 dereferenceable(32) %91, i32 noundef %92)
  br i1 %93, label %94, label %102

94:                                               ; preds = %89
  %95 = load ptr, ptr %9, align 8, !tbaa !5
  %96 = getelementptr inbounds %"class.NArchive::N7z::CHandler", ptr %16, i32 0, i32 7
  %97 = getelementptr inbounds %"struct.NArchive::N7z::CDatabase", ptr %96, i32 0, i32 6
  %98 = getelementptr inbounds %"struct.NArchive::N7z::CUInt32DefVector", ptr %97, i32 0, i32 1
  %99 = load i32, ptr %11, align 4, !tbaa !9
  %100 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN13CRecordVectorIjEixEj(ptr noundef nonnull align 8 dereferenceable(16) %98, i32 noundef %99)
  %101 = load i32, ptr %100, align 4, !tbaa !9
  call void @_ZN8NWindows4NCOM20PropVarEm_Set_UInt32EP14tagPROPVARIANTj(ptr noundef %95, i32 noundef %101) #5
  br label %102

102:                                              ; preds = %94, %89
  br label %158

103:                                              ; preds = %4
  %104 = load ptr, ptr %10, align 8, !tbaa !5
  %105 = getelementptr inbounds %"struct.NArchive::N7z::CFileItem", ptr %104, i32 0, i32 4
  %106 = load i8, ptr %105, align 2, !tbaa !19, !range !15, !noundef !16
  %107 = trunc i8 %106 to i1
  br i1 %107, label %108, label %113

108:                                              ; preds = %103
  %109 = load ptr, ptr %9, align 8, !tbaa !5
  %110 = load ptr, ptr %10, align 8, !tbaa !5
  %111 = getelementptr inbounds %"struct.NArchive::N7z::CFileItem", ptr %110, i32 0, i32 1
  %112 = load i32, ptr %111, align 8, !tbaa !20
  call void @_ZN8NWindows4NCOM20PropVarEm_Set_UInt32EP14tagPROPVARIANTj(ptr noundef %109, i32 noundef %112) #5
  br label %113

113:                                              ; preds = %108, %103
  br label %158

114:                                              ; preds = %4
  %115 = load ptr, ptr %9, align 8, !tbaa !5
  %116 = getelementptr inbounds %"class.NArchive::N7z::CHandler", ptr %16, i32 0, i32 7
  %117 = getelementptr inbounds %"struct.NArchive::N7z::CDbEx", ptr %116, i32 0, i32 3
  %118 = call noundef ptr @_ZN9CObjArrayIjEcvPjEv(ptr noundef nonnull align 8 dereferenceable(8) %117)
  %119 = load i32, ptr %11, align 4, !tbaa !9
  %120 = zext i32 %119 to i64
  %121 = getelementptr inbounds i32, ptr %118, i64 %120
  %122 = load i32, ptr %121, align 4, !tbaa !9
  %123 = call noundef zeroext i1 @_ZNK8NArchive3N7z8CHandler17IsFolderEncryptedEj(ptr noundef nonnull align 8 dereferenceable(696) %16, i32 noundef %122)
  call void @_ZN8NWindows4NCOM18PropVarEm_Set_BoolEP14tagPROPVARIANTb(ptr noundef %115, i1 noundef zeroext %123) #5
  br label %158

124:                                              ; preds = %4
  %125 = load ptr, ptr %9, align 8, !tbaa !5
  %126 = getelementptr inbounds %"class.NArchive::N7z::CHandler", ptr %16, i32 0, i32 7
  %127 = load i32, ptr %11, align 4, !tbaa !9
  %128 = call noundef zeroext i1 @_ZNK8NArchive3N7z9CDatabase10IsItemAntiEj(ptr noundef nonnull align 8 dereferenceable(352) %126, i32 noundef %127)
  call void @_ZN8NWindows4NCOM18PropVarEm_Set_BoolEP14tagPROPVARIANTb(ptr noundef %125, i1 noundef zeroext %128) #5
  br label %158

129:                                              ; preds = %4
  %130 = getelementptr inbounds %"class.NArchive::N7z::CHandler", ptr %16, i32 0, i32 7
  %131 = load i32, ptr %7, align 4, !tbaa !9
  %132 = load ptr, ptr %9, align 8, !tbaa !5
  %133 = call noundef i32 @_ZNK8NArchive3N7z9CDatabase12GetPath_PropEjP14tagPROPVARIANT(ptr noundef nonnull align 8 dereferenceable(352) %130, i32 noundef %131, ptr noundef %132) #5
  store i32 %133, ptr %5, align 4
  store i32 1, ptr %14, align 4
  br label %159

134:                                              ; preds = %4
  %135 = getelementptr inbounds %"class.NArchive::N7z::CHandler", ptr %16, i32 0, i32 7
  %136 = getelementptr inbounds %"struct.NArchive::N7z::CDbEx", ptr %135, i32 0, i32 3
  %137 = call noundef ptr @_ZN9CObjArrayIjEcvPjEv(ptr noundef nonnull align 8 dereferenceable(8) %136)
  %138 = load i32, ptr %11, align 4, !tbaa !9
  %139 = zext i32 %138 to i64
  %140 = getelementptr inbounds i32, ptr %137, i64 %139
  %141 = load i32, ptr %140, align 4, !tbaa !9
  %142 = load ptr, ptr %9, align 8, !tbaa !5
  %143 = call noundef i32 @_ZNK8NArchive3N7z8CHandler15SetMethodToPropEjP14tagPROPVARIANT(ptr noundef nonnull align 8 dereferenceable(696) %16, i32 noundef %141, ptr noundef %142)
  store i32 %143, ptr %5, align 4
  store i32 1, ptr %14, align 4
  br label %159

144:                                              ; preds = %4
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  %145 = getelementptr inbounds %"class.NArchive::N7z::CHandler", ptr %16, i32 0, i32 7
  %146 = getelementptr inbounds %"struct.NArchive::N7z::CDbEx", ptr %145, i32 0, i32 3
  %147 = call noundef ptr @_ZN9CObjArrayIjEcvPjEv(ptr noundef nonnull align 8 dereferenceable(8) %146)
  %148 = load i32, ptr %11, align 4, !tbaa !9
  %149 = zext i32 %148 to i64
  %150 = getelementptr inbounds i32, ptr %147, i64 %149
  %151 = load i32, ptr %150, align 4, !tbaa !9
  store i32 %151, ptr %15, align 4, !tbaa !9
  %152 = load i32, ptr %15, align 4, !tbaa !9
  %153 = icmp ne i32 %152, -1
  br i1 %153, label %154, label %157

154:                                              ; preds = %144
  %155 = load ptr, ptr %9, align 8, !tbaa !5
  %156 = load i32, ptr %15, align 4, !tbaa !9
  call void @_ZN8NWindows4NCOM20PropVarEm_Set_UInt32EP14tagPROPVARIANTj(ptr noundef %155, i32 noundef %156) #5
  br label %157

157:                                              ; preds = %154, %144
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  br label %158

158:                                              ; preds = %157, %124, %114, %113, %102, %84, %79, %74, %73, %64, %31, %25, %4
  store i32 0, ptr %5, align 4
  store i32 1, ptr %14, align 4
  br label %159

159:                                              ; preds = %158, %134, %129
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  %160 = load i32, ptr %5, align 4
  ret i32 %160
}

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN8NWindows4NCOM18PropVarEm_Set_BoolEP14tagPROPVARIANTb(ptr noundef, i1 noundef zeroext) #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN8NWindows4NCOM20PropVarEm_Set_UInt64EP14tagPROPVARIANTy(ptr noundef, i64 noundef) #4

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK8NArchive3N7z16CUInt64DefVector7GetItemEjRy(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef, ptr noundef nonnull align 8 dereferenceable(8)) #1 align 2

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN8NArchive3N7zL30SetFileTimeProp_From_UInt64DefEP14tagPROPVARIANTRKNS0_16CUInt64DefVectorEi(ptr noundef, ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK8NArchive3N7z16CUInt32DefVector15ValidAndDefinedEj(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN8NWindows4NCOM20PropVarEm_Set_UInt32EP14tagPROPVARIANTj(ptr noundef, i32 noundef) #4

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK8NArchive3N7z9CDatabase10IsItemAntiEj(ptr noundef nonnull align 8 dereferenceable(352), i32 noundef) #3 align 2

; Function Attrs: nounwind
declare noundef i32 @_ZNK8NArchive3N7z9CDatabase12GetPath_PropEjP14tagPROPVARIANT(ptr noundef nonnull align 8 dereferenceable(352), i32 noundef, ptr noundef) #2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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 #3 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 #5 = { 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, !14, i64 13}
!12 = !{!"_ZTSN8NArchive3N7z9CFileItemE", !13, i64 0, !10, i64 8, !14, i64 12, !14, i64 13, !14, i64 14}
!13 = !{!"long long", !7, i64 0}
!14 = !{!"bool", !7, i64 0}
!15 = !{i8 0, i8 2}
!16 = !{}
!17 = !{!12, !13, i64 0}
!18 = !{!13, !13, i64 0}
!19 = !{!12, !14, i64 14}
!20 = !{!12, !10, i64 8}


; 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"

; 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
declare dso_local noundef zeroext i1 @_ZNK8NArchive3N7z8CHandler17IsFolderEncryptedEj(ptr noundef nonnull align 8 dereferenceable(696), i32 noundef) local_unnamed_addr #1 align 2

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

; Function Attrs: nounwind
declare noundef i32 @_ZN8NWindows4NCOM17PropVariant_ClearEP14tagPROPVARIANT(ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN8NArchive3N7z8CHandler11GetPropertyEjjP14tagPROPVARIANT(ptr noundef nonnull align 8 dereferenceable(696) %0, i32 noundef %1, i32 noundef %2, ptr noundef %3) unnamed_addr #1 align 2 {
  %5 = alloca i64, align 8
  %6 = tail call noundef i32 @_ZN8NWindows4NCOM17PropVariant_ClearEP14tagPROPVARIANT(ptr noundef %3) #5
  %7 = getelementptr inbounds i8, ptr %0, i64 192
  %8 = getelementptr inbounds i8, ptr %0, i64 328
  %9 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZN13CRecordVectorIN8NArchive3N7z9CFileItemEEixEj(ptr noundef nonnull align 8 dereferenceable(16) %8, i32 noundef %1)
  switch i32 %2, label %83 [
    i32 6, label %10
    i32 7, label %14
    i32 8, label %16
    i32 29, label %32
    i32 10, label %38
    i32 11, label %40
    i32 12, label %42
    i32 9, label %44
    i32 19, label %51
    i32 15, label %58
    i32 21, label %65
    i32 3, label %67
    i32 22, label %69
    i32 27, label %76
  ]

10:                                               ; preds = %4
  %11 = getelementptr inbounds i8, ptr %9, i64 13
  %12 = load i8, ptr %11, align 1, !tbaa !5, !range !12, !noundef !13
  %13 = trunc nuw i8 %12 to i1
  tail call void @_ZN8NWindows4NCOM18PropVarEm_Set_BoolEP14tagPROPVARIANTb(ptr noundef %3, i1 noundef zeroext %13) #5
  br label %83

14:                                               ; preds = %4
  %15 = load i64, ptr %9, align 8, !tbaa !14
  tail call void @_ZN8NWindows4NCOM20PropVarEm_Set_UInt64EP14tagPROPVARIANTy(ptr noundef %3, i64 noundef %15) #5
  br label %83

16:                                               ; preds = %4
  %17 = getelementptr inbounds i8, ptr %0, i64 608
  %18 = tail call noundef ptr @_ZN9CObjArrayIjEcvPjEv(ptr noundef nonnull align 8 dereferenceable(8) %17)
  %19 = zext i32 %1 to i64
  %20 = getelementptr inbounds i32, ptr %18, i64 %19
  %21 = load i32, ptr %20, align 4, !tbaa !15
  %.not44 = icmp eq i32 %21, -1
  br i1 %.not44, label %31, label %22

22:                                               ; preds = %16
  %23 = getelementptr inbounds i8, ptr %0, i64 600
  %24 = tail call noundef ptr @_ZN9CObjArrayIjEcvPjEv(ptr noundef nonnull align 8 dereferenceable(8) %23)
  %25 = zext i32 %21 to i64
  %26 = getelementptr inbounds i32, ptr %24, i64 %25
  %27 = load i32, ptr %26, align 4, !tbaa !15
  %28 = icmp eq i32 %27, %1
  br i1 %28, label %29, label %83

29:                                               ; preds = %22
  %30 = tail call noundef i64 @_ZNK8NArchive3N7z5CDbEx21GetFolderFullPackSizeEj(ptr noundef nonnull align 8 dereferenceable(447) %7, i32 noundef %21)
  tail call void @_ZN8NWindows4NCOM20PropVarEm_Set_UInt64EP14tagPROPVARIANTy(ptr noundef %3, i64 noundef %30) #5
  br label %83

31:                                               ; preds = %16
  tail call void @_ZN8NWindows4NCOM20PropVarEm_Set_UInt64EP14tagPROPVARIANTy(ptr noundef %3, i64 noundef 0) #5
  br label %83

32:                                               ; preds = %4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #5
  %33 = getelementptr inbounds i8, ptr %0, i64 440
  %34 = call noundef zeroext i1 @_ZNK8NArchive3N7z16CUInt64DefVector7GetItemEjRy(ptr noundef nonnull align 8 dereferenceable(32) %33, i32 noundef %1, ptr noundef nonnull align 8 dereferenceable(8) %5)
  br i1 %34, label %35, label %37

35:                                               ; preds = %32
  %36 = load i64, ptr %5, align 8, !tbaa !16
  call void @_ZN8NWindows4NCOM20PropVarEm_Set_UInt64EP14tagPROPVARIANTy(ptr noundef %3, i64 noundef %36) #5
  br label %37

37:                                               ; preds = %35, %32
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  br label %83

38:                                               ; preds = %4
  %39 = getelementptr inbounds i8, ptr %0, i64 344
  tail call void @_ZN8NArchive3N7zL30SetFileTimeProp_From_UInt64DefEP14tagPROPVARIANTRKNS0_16CUInt64DefVectorEi(ptr noundef %3, ptr noundef nonnull align 8 dereferenceable(32) %39, i32 noundef %1)
  br label %83

40:                                               ; preds = %4
  %41 = getelementptr inbounds i8, ptr %0, i64 376
  tail call void @_ZN8NArchive3N7zL30SetFileTimeProp_From_UInt64DefEP14tagPROPVARIANTRKNS0_16CUInt64DefVectorEi(ptr noundef %3, ptr noundef nonnull align 8 dereferenceable(32) %41, i32 noundef %1)
  br label %83

42:                                               ; preds = %4
  %43 = getelementptr inbounds i8, ptr %0, i64 408
  tail call void @_ZN8NArchive3N7zL30SetFileTimeProp_From_UInt64DefEP14tagPROPVARIANTRKNS0_16CUInt64DefVectorEi(ptr noundef %3, ptr noundef nonnull align 8 dereferenceable(32) %43, i32 noundef %1)
  br label %83

44:                                               ; preds = %4
  %45 = getelementptr inbounds i8, ptr %0, i64 472
  %46 = tail call noundef zeroext i1 @_ZNK8NArchive3N7z16CUInt32DefVector15ValidAndDefinedEj(ptr noundef nonnull align 8 dereferenceable(32) %45, i32 noundef %1)
  br i1 %46, label %47, label %83

47:                                               ; preds = %44
  %48 = getelementptr inbounds i8, ptr %0, i64 488
  %49 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZN13CRecordVectorIjEixEj(ptr noundef nonnull align 8 dereferenceable(16) %48, i32 noundef %1)
  %50 = load i32, ptr %49, align 4, !tbaa !15
  tail call void @_ZN8NWindows4NCOM20PropVarEm_Set_UInt32EP14tagPROPVARIANTj(ptr noundef %3, i32 noundef %50) #5
  br label %83

51:                                               ; preds = %4
  %52 = getelementptr inbounds i8, ptr %9, i64 14
  %53 = load i8, ptr %52, align 2, !tbaa !17, !range !12, !noundef !13
  %54 = trunc nuw i8 %53 to i1
  br i1 %54, label %55, label %83

55:                                               ; preds = %51
  %56 = getelementptr inbounds i8, ptr %9, i64 8
  %57 = load i32, ptr %56, align 8, !tbaa !18
  tail call void @_ZN8NWindows4NCOM20PropVarEm_Set_UInt32EP14tagPROPVARIANTj(ptr noundef %3, i32 noundef %57) #5
  br label %83

58:                                               ; preds = %4
  %59 = getelementptr inbounds i8, ptr %0, i64 608
  %60 = tail call noundef ptr @_ZN9CObjArrayIjEcvPjEv(ptr noundef nonnull align 8 dereferenceable(8) %59)
  %61 = zext i32 %1 to i64
  %62 = getelementptr inbounds i32, ptr %60, i64 %61
  %63 = load i32, ptr %62, align 4, !tbaa !15
  %64 = tail call noundef zeroext i1 @_ZNK8NArchive3N7z8CHandler17IsFolderEncryptedEj(ptr noundef nonnull align 8 dereferenceable(696) %0, i32 noundef %63)
  tail call void @_ZN8NWindows4NCOM18PropVarEm_Set_BoolEP14tagPROPVARIANTb(ptr noundef %3, i1 noundef zeroext %64) #5
  br label %83

65:                                               ; preds = %4
  %66 = tail call noundef zeroext i1 @_ZNK8NArchive3N7z9CDatabase10IsItemAntiEj(ptr noundef nonnull align 8 dereferenceable(352) %7, i32 noundef %1)
  tail call void @_ZN8NWindows4NCOM18PropVarEm_Set_BoolEP14tagPROPVARIANTb(ptr noundef %3, i1 noundef zeroext %66) #5
  br label %83

67:                                               ; preds = %4
  %68 = tail call noundef i32 @_ZNK8NArchive3N7z9CDatabase12GetPath_PropEjP14tagPROPVARIANT(ptr noundef nonnull align 8 dereferenceable(352) %7, i32 noundef %1, ptr noundef %3) #5
  br label %83

69:                                               ; preds = %4
  %70 = getelementptr inbounds i8, ptr %0, i64 608
  %71 = tail call noundef ptr @_ZN9CObjArrayIjEcvPjEv(ptr noundef nonnull align 8 dereferenceable(8) %70)
  %72 = zext i32 %1 to i64
  %73 = getelementptr inbounds i32, ptr %71, i64 %72
  %74 = load i32, ptr %73, align 4, !tbaa !15
  %75 = tail call noundef i32 @_ZNK8NArchive3N7z8CHandler15SetMethodToPropEjP14tagPROPVARIANT(ptr noundef nonnull align 8 dereferenceable(696) %0, i32 noundef %74, ptr noundef %3)
  br label %83

76:                                               ; preds = %4
  %77 = getelementptr inbounds i8, ptr %0, i64 608
  %78 = tail call noundef ptr @_ZN9CObjArrayIjEcvPjEv(ptr noundef nonnull align 8 dereferenceable(8) %77)
  %79 = zext i32 %1 to i64
  %80 = getelementptr inbounds i32, ptr %78, i64 %79
  %81 = load i32, ptr %80, align 4, !tbaa !15
  %.not = icmp eq i32 %81, -1
  br i1 %.not, label %83, label %82

82:                                               ; preds = %76
  tail call void @_ZN8NWindows4NCOM20PropVarEm_Set_UInt32EP14tagPROPVARIANTj(ptr noundef %3, i32 noundef %81) #5
  br label %83

83:                                               ; preds = %4, %10, %14, %37, %38, %40, %42, %58, %65, %47, %44, %55, %51, %22, %29, %31, %82, %76, %69, %67
  %.0 = phi i32 [ %75, %69 ], [ %68, %67 ], [ 0, %76 ], [ 0, %82 ], [ 0, %31 ], [ 0, %29 ], [ 0, %22 ], [ 0, %51 ], [ 0, %55 ], [ 0, %44 ], [ 0, %47 ], [ 0, %65 ], [ 0, %58 ], [ 0, %42 ], [ 0, %40 ], [ 0, %38 ], [ 0, %37 ], [ 0, %14 ], [ 0, %10 ], [ 0, %4 ]
  ret i32 %.0
}

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN8NWindows4NCOM18PropVarEm_Set_BoolEP14tagPROPVARIANTb(ptr noundef, i1 noundef zeroext) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN8NWindows4NCOM20PropVarEm_Set_UInt64EP14tagPROPVARIANTy(ptr noundef, i64 noundef) local_unnamed_addr #4

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK8NArchive3N7z16CUInt64DefVector7GetItemEjRy(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef, ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN8NArchive3N7zL30SetFileTimeProp_From_UInt64DefEP14tagPROPVARIANTRKNS0_16CUInt64DefVectorEi(ptr noundef, ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK8NArchive3N7z16CUInt32DefVector15ValidAndDefinedEj(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN8NWindows4NCOM20PropVarEm_Set_UInt32EP14tagPROPVARIANTj(ptr noundef, i32 noundef) local_unnamed_addr #4

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK8NArchive3N7z9CDatabase10IsItemAntiEj(ptr noundef nonnull align 8 dereferenceable(352), i32 noundef) local_unnamed_addr #3 align 2

; Function Attrs: nounwind
declare noundef i32 @_ZNK8NArchive3N7z9CDatabase12GetPath_PropEjP14tagPROPVARIANT(ptr noundef nonnull align 8 dereferenceable(352), i32 noundef, ptr noundef) local_unnamed_addr #2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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 #3 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 #5 = { 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, !11, i64 13}
!6 = !{!"_ZTSN8NArchive3N7z9CFileItemE", !7, i64 0, !10, i64 8, !11, i64 12, !11, i64 13, !11, i64 14}
!7 = !{!"long long", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"bool", !8, i64 0}
!12 = !{i8 0, i8 2}
!13 = !{}
!14 = !{!6, !7, i64 0}
!15 = !{!10, !10, i64 0}
!16 = !{!7, !7, i64 0}
!17 = !{!6, !11, i64 14}
!18 = !{!6, !10, i64 8}


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