; LLVM IR from mncoppola/rpef :: utilities_src/squashfs2.1/lzma/C/7zip/Archive/7z_C (7zIn)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct._CFolder = type { i32, ptr, i32, ptr, i32, ptr, ptr, i32, i32, i32 }
%struct._ISzAlloc = type { ptr, ptr }

; Function Attrs: nounwind uwtable
declare dso_local i32 @MySzInAlloc(ptr noundef, i64 noundef, ptr noundef) #0

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

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @SzReadSize(ptr noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local i32 @SzReadNumber32(ptr noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local i32 @SzReadID(ptr noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local i32 @SzSkeepData(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local i32 @SzWaitAttribute(ptr noundef, i64 noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local i32 @SzReadHashDigests(ptr noundef, i64 noundef, ptr noundef, ptr noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local i32 @SzReadSwitch(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local i32 @SzGetNextFolderItem(ptr noundef, ptr noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
define dso_local i32 @SzReadUnPackInfo(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4) #0 {
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca ptr, align 8
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca i64, align 8
  %26 = alloca i32, align 4
  %27 = alloca i32, align 4
  %28 = alloca ptr, align 8
  %29 = alloca ptr, align 8
  %30 = alloca ptr, align 8
  %31 = alloca i32, align 4
  %32 = alloca i32, align 4
  store ptr %0, ptr %7, align 8, !tbaa !5
  store ptr %1, ptr %8, align 8, !tbaa !5
  store ptr %2, ptr %9, align 8, !tbaa !5
  store ptr %3, ptr %10, align 8, !tbaa !5
  store ptr %4, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #3
  %33 = load ptr, ptr %7, align 8, !tbaa !5
  %34 = call i32 @SzWaitAttribute(ptr noundef %33, i64 noundef 11)
  store i32 %34, ptr %13, align 4, !tbaa !9
  %35 = load i32, ptr %13, align 4, !tbaa !9
  %36 = icmp ne i32 %35, 0
  br i1 %36, label %37, label %39

37:                                               ; preds = %5
  %38 = load i32, ptr %13, align 4, !tbaa !9
  store i32 %38, ptr %6, align 4
  store i32 1, ptr %14, align 4
  br label %40

39:                                               ; preds = %5
  store i32 0, ptr %14, align 4
  br label %40

40:                                               ; preds = %39, %37
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #3
  %41 = load i32, ptr %14, align 4
  switch i32 %41, label %283 [
    i32 0, label %42
  ]

42:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #3
  %43 = load ptr, ptr %7, align 8, !tbaa !5
  %44 = load ptr, ptr %8, align 8, !tbaa !5
  %45 = call i32 @SzReadNumber32(ptr noundef %43, ptr noundef %44)
  store i32 %45, ptr %15, align 4, !tbaa !9
  %46 = load i32, ptr %15, align 4, !tbaa !9
  %47 = icmp ne i32 %46, 0
  br i1 %47, label %48, label %50

48:                                               ; preds = %42
  %49 = load i32, ptr %15, align 4, !tbaa !9
  store i32 %49, ptr %6, align 4
  store i32 1, ptr %14, align 4
  br label %51

50:                                               ; preds = %42
  store i32 0, ptr %14, align 4
  br label %51

51:                                               ; preds = %50, %48
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #3
  %52 = load i32, ptr %14, align 4
  switch i32 %52, label %283 [
    i32 0, label %53
  ]

53:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #3
  %54 = load ptr, ptr %7, align 8, !tbaa !5
  %55 = call i32 @SzReadSwitch(ptr noundef %54)
  store i32 %55, ptr %16, align 4, !tbaa !9
  %56 = load i32, ptr %16, align 4, !tbaa !9
  %57 = icmp ne i32 %56, 0
  br i1 %57, label %58, label %60

58:                                               ; preds = %53
  %59 = load i32, ptr %16, align 4, !tbaa !9
  store i32 %59, ptr %6, align 4
  store i32 1, ptr %14, align 4
  br label %61

60:                                               ; preds = %53
  store i32 0, ptr %14, align 4
  br label %61

61:                                               ; preds = %60, %58
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #3
  %62 = load i32, ptr %14, align 4
  switch i32 %62, label %283 [
    i32 0, label %63
  ]

63:                                               ; preds = %61
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #3
  %64 = load ptr, ptr %9, align 8, !tbaa !5
  %65 = load ptr, ptr %8, align 8, !tbaa !5
  %66 = load i32, ptr %65, align 4, !tbaa !9
  %67 = zext i32 %66 to i64
  %68 = mul i64 %67, 72
  %69 = load ptr, ptr %10, align 8, !tbaa !5
  %70 = call i32 @MySzInAlloc(ptr noundef %64, i64 noundef %68, ptr noundef %69)
  store i32 %70, ptr %17, align 4, !tbaa !9
  %71 = load i32, ptr %17, align 4, !tbaa !9
  %72 = icmp ne i32 %71, 0
  br i1 %72, label %73, label %75

73:                                               ; preds = %63
  %74 = load i32, ptr %17, align 4, !tbaa !9
  store i32 %74, ptr %6, align 4
  store i32 1, ptr %14, align 4
  br label %76

75:                                               ; preds = %63
  store i32 0, ptr %14, align 4
  br label %76

76:                                               ; preds = %75, %73
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #3
  %77 = load i32, ptr %14, align 4
  switch i32 %77, label %283 [
    i32 0, label %78
  ]

78:                                               ; preds = %76
  store i32 0, ptr %12, align 4, !tbaa !9
  br label %79

79:                                               ; preds = %90, %78
  %80 = load i32, ptr %12, align 4, !tbaa !9
  %81 = load ptr, ptr %8, align 8, !tbaa !5
  %82 = load i32, ptr %81, align 4, !tbaa !9
  %83 = icmp ult i32 %80, %82
  br i1 %83, label %84, label %93

84:                                               ; preds = %79
  %85 = load ptr, ptr %9, align 8, !tbaa !5
  %86 = load ptr, ptr %85, align 8, !tbaa !5
  %87 = load i32, ptr %12, align 4, !tbaa !9
  %88 = zext i32 %87 to i64
  %89 = getelementptr inbounds %struct._CFolder, ptr %86, i64 %88
  call void @SzFolderInit(ptr noundef %89)
  br label %90

90:                                               ; preds = %84
  %91 = load i32, ptr %12, align 4, !tbaa !9
  %92 = add i32 %91, 1
  store i32 %92, ptr %12, align 4, !tbaa !9
  br label %79, !llvm.loop !11

93:                                               ; preds = %79
  store i32 0, ptr %12, align 4, !tbaa !9
  br label %94

94:                                               ; preds = %116, %93
  %95 = load i32, ptr %12, align 4, !tbaa !9
  %96 = load ptr, ptr %8, align 8, !tbaa !5
  %97 = load i32, ptr %96, align 4, !tbaa !9
  %98 = icmp ult i32 %95, %97
  br i1 %98, label %99, label %119

99:                                               ; preds = %94
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #3
  %100 = load ptr, ptr %7, align 8, !tbaa !5
  %101 = load ptr, ptr %9, align 8, !tbaa !5
  %102 = load ptr, ptr %101, align 8, !tbaa !5
  %103 = load i32, ptr %12, align 4, !tbaa !9
  %104 = zext i32 %103 to i64
  %105 = getelementptr inbounds %struct._CFolder, ptr %102, i64 %104
  %106 = load ptr, ptr %10, align 8, !tbaa !5
  %107 = call i32 @SzGetNextFolderItem(ptr noundef %100, ptr noundef %105, ptr noundef %106)
  store i32 %107, ptr %18, align 4, !tbaa !9
  %108 = load i32, ptr %18, align 4, !tbaa !9
  %109 = icmp ne i32 %108, 0
  br i1 %109, label %110, label %112

110:                                              ; preds = %99
  %111 = load i32, ptr %18, align 4, !tbaa !9
  store i32 %111, ptr %6, align 4
  store i32 1, ptr %14, align 4
  br label %113

112:                                              ; preds = %99
  store i32 0, ptr %14, align 4
  br label %113

113:                                              ; preds = %112, %110
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #3
  %114 = load i32, ptr %14, align 4
  switch i32 %114, label %283 [
    i32 0, label %115
  ]

115:                                              ; preds = %113
  br label %116

116:                                              ; preds = %115
  %117 = load i32, ptr %12, align 4, !tbaa !9
  %118 = add i32 %117, 1
  store i32 %118, ptr %12, align 4, !tbaa !9
  br label %94, !llvm.loop !13

119:                                              ; preds = %94
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #3
  %120 = load ptr, ptr %7, align 8, !tbaa !5
  %121 = call i32 @SzWaitAttribute(ptr noundef %120, i64 noundef 12)
  store i32 %121, ptr %19, align 4, !tbaa !9
  %122 = load i32, ptr %19, align 4, !tbaa !9
  %123 = icmp ne i32 %122, 0
  br i1 %123, label %124, label %126

124:                                              ; preds = %119
  %125 = load i32, ptr %19, align 4, !tbaa !9
  store i32 %125, ptr %6, align 4
  store i32 1, ptr %14, align 4
  br label %127

126:                                              ; preds = %119
  store i32 0, ptr %14, align 4
  br label %127

127:                                              ; preds = %126, %124
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #3
  %128 = load i32, ptr %14, align 4
  switch i32 %128, label %283 [
    i32 0, label %129
  ]

129:                                              ; preds = %127
  store i32 0, ptr %12, align 4, !tbaa !9
  br label %130

130:                                              ; preds = %186, %129
  %131 = load i32, ptr %12, align 4, !tbaa !9
  %132 = load ptr, ptr %8, align 8, !tbaa !5
  %133 = load i32, ptr %132, align 4, !tbaa !9
  %134 = icmp ult i32 %131, %133
  br i1 %134, label %135, label %189

135:                                              ; preds = %130
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #3
  %136 = load ptr, ptr %9, align 8, !tbaa !5
  %137 = load ptr, ptr %136, align 8, !tbaa !5
  %138 = load i32, ptr %12, align 4, !tbaa !9
  %139 = zext i32 %138 to i64
  %140 = getelementptr inbounds %struct._CFolder, ptr %137, i64 %139
  store ptr %140, ptr %21, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #3
  %141 = load ptr, ptr %21, align 8, !tbaa !5
  %142 = call i32 @SzFolderGetNumOutStreams(ptr noundef %141)
  store i32 %142, ptr %22, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #3
  %143 = load ptr, ptr %21, align 8, !tbaa !5
  %144 = getelementptr inbounds %struct._CFolder, ptr %143, i32 0, i32 6
  %145 = load i32, ptr %22, align 4, !tbaa !9
  %146 = zext i32 %145 to i64
  %147 = mul i64 %146, 4
  %148 = load ptr, ptr %10, align 8, !tbaa !5
  %149 = call i32 @MySzInAlloc(ptr noundef %144, i64 noundef %147, ptr noundef %148)
  store i32 %149, ptr %23, align 4, !tbaa !9
  %150 = load i32, ptr %23, align 4, !tbaa !9
  %151 = icmp ne i32 %150, 0
  br i1 %151, label %152, label %154

152:                                              ; preds = %135
  %153 = load i32, ptr %23, align 4, !tbaa !9
  store i32 %153, ptr %6, align 4
  store i32 1, ptr %14, align 4
  br label %155

154:                                              ; preds = %135
  store i32 0, ptr %14, align 4
  br label %155

155:                                              ; preds = %154, %152
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #3
  %156 = load i32, ptr %14, align 4
  switch i32 %156, label %183 [
    i32 0, label %157
  ]

157:                                              ; preds = %155
  store i32 0, ptr %20, align 4, !tbaa !9
  br label %158

158:                                              ; preds = %179, %157
  %159 = load i32, ptr %20, align 4, !tbaa !9
  %160 = load i32, ptr %22, align 4, !tbaa !9
  %161 = icmp ult i32 %159, %160
  br i1 %161, label %162, label %182

162:                                              ; preds = %158
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #3
  %163 = load ptr, ptr %7, align 8, !tbaa !5
  %164 = load ptr, ptr %21, align 8, !tbaa !5
  %165 = getelementptr inbounds %struct._CFolder, ptr %164, i32 0, i32 6
  %166 = load ptr, ptr %165, align 8, !tbaa !14
  %167 = load i32, ptr %20, align 4, !tbaa !9
  %168 = zext i32 %167 to i64
  %169 = getelementptr inbounds i32, ptr %166, i64 %168
  %170 = call i32 @SzReadSize(ptr noundef %163, ptr noundef %169)
  store i32 %170, ptr %24, align 4, !tbaa !9
  %171 = load i32, ptr %24, align 4, !tbaa !9
  %172 = icmp ne i32 %171, 0
  br i1 %172, label %173, label %175

173:                                              ; preds = %162
  %174 = load i32, ptr %24, align 4, !tbaa !9
  store i32 %174, ptr %6, align 4
  store i32 1, ptr %14, align 4
  br label %176

175:                                              ; preds = %162
  store i32 0, ptr %14, align 4
  br label %176

176:                                              ; preds = %175, %173
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #3
  %177 = load i32, ptr %14, align 4
  switch i32 %177, label %183 [
    i32 0, label %178
  ]

178:                                              ; preds = %176
  br label %179

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

182:                                              ; preds = %158
  store i32 0, ptr %14, align 4
  br label %183

183:                                              ; preds = %182, %176, %155
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #3
  %184 = load i32, ptr %14, align 4
  switch i32 %184, label %283 [
    i32 0, label %185
  ]

185:                                              ; preds = %183
  br label %186

186:                                              ; preds = %185
  %187 = load i32, ptr %12, align 4, !tbaa !9
  %188 = add i32 %187, 1
  store i32 %188, ptr %12, align 4, !tbaa !9
  br label %130, !llvm.loop !17

189:                                              ; preds = %130
  br label %190

190:                                              ; preds = %282, %280, %189
  br label %191

191:                                              ; preds = %190
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #3
  %192 = load ptr, ptr %7, align 8, !tbaa !5
  %193 = call i32 @SzReadID(ptr noundef %192, ptr noundef %25)
  store i32 %193, ptr %26, align 4, !tbaa !9
  %194 = load i32, ptr %26, align 4, !tbaa !9
  %195 = icmp ne i32 %194, 0
  br i1 %195, label %196, label %198

196:                                              ; preds = %191
  %197 = load i32, ptr %26, align 4, !tbaa !9
  store i32 %197, ptr %6, align 4
  store i32 1, ptr %14, align 4
  br label %199

198:                                              ; preds = %191
  store i32 0, ptr %14, align 4
  br label %199

199:                                              ; preds = %198, %196
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #3
  %200 = load i32, ptr %14, align 4
  switch i32 %200, label %280 [
    i32 0, label %201
  ]

201:                                              ; preds = %199
  %202 = load i64, ptr %25, align 8, !tbaa !18
  %203 = icmp eq i64 %202, 0
  br i1 %203, label %204, label %205

204:                                              ; preds = %201
  store i32 0, ptr %6, align 4
  store i32 1, ptr %14, align 4
  br label %280

205:                                              ; preds = %201
  %206 = load i64, ptr %25, align 8, !tbaa !18
  %207 = icmp eq i64 %206, 10
  br i1 %207, label %208, label %269

208:                                              ; preds = %205
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #3
  store ptr null, ptr %28, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #3
  store ptr null, ptr %29, align 8, !tbaa !5
  %209 = load ptr, ptr %7, align 8, !tbaa !5
  %210 = load ptr, ptr %8, align 8, !tbaa !5
  %211 = load i32, ptr %210, align 4, !tbaa !9
  %212 = zext i32 %211 to i64
  %213 = load ptr, ptr %11, align 8, !tbaa !5
  %214 = getelementptr inbounds %struct._ISzAlloc, ptr %213, i32 0, i32 0
  %215 = load ptr, ptr %214, align 8, !tbaa !20
  %216 = call i32 @SzReadHashDigests(ptr noundef %209, i64 noundef %212, ptr noundef %28, ptr noundef %29, ptr noundef %215)
  store i32 %216, ptr %27, align 4, !tbaa !9
  %217 = load i32, ptr %27, align 4, !tbaa !9
  %218 = icmp eq i32 %217, 0
  br i1 %218, label %219, label %250

219:                                              ; preds = %208
  store i32 0, ptr %12, align 4, !tbaa !9
  br label %220

220:                                              ; preds = %246, %219
  %221 = load i32, ptr %12, align 4, !tbaa !9
  %222 = load ptr, ptr %8, align 8, !tbaa !5
  %223 = load i32, ptr %222, align 4, !tbaa !9
  %224 = icmp ult i32 %221, %223
  br i1 %224, label %225, label %249

225:                                              ; preds = %220
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #3
  %226 = load ptr, ptr %9, align 8, !tbaa !5
  %227 = load ptr, ptr %226, align 8, !tbaa !5
  %228 = load i32, ptr %12, align 4, !tbaa !9
  %229 = zext i32 %228 to i64
  %230 = getelementptr inbounds %struct._CFolder, ptr %227, i64 %229
  store ptr %230, ptr %30, align 8, !tbaa !5
  %231 = load ptr, ptr %28, align 8, !tbaa !5
  %232 = load i32, ptr %12, align 4, !tbaa !9
  %233 = zext i32 %232 to i64
  %234 = getelementptr inbounds i8, ptr %231, i64 %233
  %235 = load i8, ptr %234, align 1, !tbaa !22
  %236 = zext i8 %235 to i32
  %237 = load ptr, ptr %30, align 8, !tbaa !5
  %238 = getelementptr inbounds %struct._CFolder, ptr %237, i32 0, i32 7
  store i32 %236, ptr %238, align 8, !tbaa !23
  %239 = load ptr, ptr %29, align 8, !tbaa !5
  %240 = load i32, ptr %12, align 4, !tbaa !9
  %241 = zext i32 %240 to i64
  %242 = getelementptr inbounds i32, ptr %239, i64 %241
  %243 = load i32, ptr %242, align 4, !tbaa !9
  %244 = load ptr, ptr %30, align 8, !tbaa !5
  %245 = getelementptr inbounds %struct._CFolder, ptr %244, i32 0, i32 8
  store i32 %243, ptr %245, align 4, !tbaa !24
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #3
  br label %246

246:                                              ; preds = %225
  %247 = load i32, ptr %12, align 4, !tbaa !9
  %248 = add i32 %247, 1
  store i32 %248, ptr %12, align 4, !tbaa !9
  br label %220, !llvm.loop !25

249:                                              ; preds = %220
  br label %250

250:                                              ; preds = %249, %208
  %251 = load ptr, ptr %11, align 8, !tbaa !5
  %252 = getelementptr inbounds %struct._ISzAlloc, ptr %251, i32 0, i32 1
  %253 = load ptr, ptr %252, align 8, !tbaa !26
  %254 = load ptr, ptr %29, align 8, !tbaa !5
  call void %253(ptr noundef %254)
  %255 = load ptr, ptr %11, align 8, !tbaa !5
  %256 = getelementptr inbounds %struct._ISzAlloc, ptr %255, i32 0, i32 1
  %257 = load ptr, ptr %256, align 8, !tbaa !26
  %258 = load ptr, ptr %28, align 8, !tbaa !5
  call void %257(ptr noundef %258)
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #3
  %259 = load i32, ptr %27, align 4, !tbaa !9
  store i32 %259, ptr %31, align 4, !tbaa !9
  %260 = load i32, ptr %31, align 4, !tbaa !9
  %261 = icmp ne i32 %260, 0
  br i1 %261, label %262, label %264

262:                                              ; preds = %250
  %263 = load i32, ptr %31, align 4, !tbaa !9
  store i32 %263, ptr %6, align 4
  store i32 1, ptr %14, align 4
  br label %265

264:                                              ; preds = %250
  store i32 0, ptr %14, align 4
  br label %265

265:                                              ; preds = %264, %262
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #3
  %266 = load i32, ptr %14, align 4
  switch i32 %266, label %268 [
    i32 0, label %267
  ]

267:                                              ; preds = %265
  store i32 14, ptr %14, align 4
  br label %268

268:                                              ; preds = %267, %265
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #3
  br label %280

269:                                              ; preds = %205
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #3
  %270 = load ptr, ptr %7, align 8, !tbaa !5
  %271 = call i32 @SzSkeepData(ptr noundef %270)
  store i32 %271, ptr %32, align 4, !tbaa !9
  %272 = load i32, ptr %32, align 4, !tbaa !9
  %273 = icmp ne i32 %272, 0
  br i1 %273, label %274, label %276

274:                                              ; preds = %269
  %275 = load i32, ptr %32, align 4, !tbaa !9
  store i32 %275, ptr %6, align 4
  store i32 1, ptr %14, align 4
  br label %277

276:                                              ; preds = %269
  store i32 0, ptr %14, align 4
  br label %277

277:                                              ; preds = %276, %274
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #3
  %278 = load i32, ptr %14, align 4
  switch i32 %278, label %280 [
    i32 0, label %279
  ]

279:                                              ; preds = %277
  store i32 0, ptr %14, align 4
  br label %280

280:                                              ; preds = %279, %277, %268, %204, %199
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #3
  %281 = load i32, ptr %14, align 4
  switch i32 %281, label %283 [
    i32 0, label %282
    i32 14, label %190
  ]

282:                                              ; preds = %280
  br label %190

283:                                              ; preds = %280, %183, %127, %113, %76, %61, %51, %40
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #3
  %284 = load i32, ptr %6, align 4
  ret i32 %284
}

declare void @SzFolderInit(ptr noundef) #2

declare i32 @SzFolderGetNumOutStreams(ptr noundef) #2

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = !{!15, !6, i64 48}
!15 = !{!"_CFolder", !10, i64 0, !6, i64 8, !10, i64 16, !6, i64 24, !10, i64 32, !6, i64 40, !6, i64 48, !10, i64 56, !10, i64 60, !10, i64 64}
!16 = distinct !{!16, !12}
!17 = distinct !{!17, !12}
!18 = !{!19, !19, i64 0}
!19 = !{!"long long", !7, i64 0}
!20 = !{!21, !6, i64 0}
!21 = !{!"_ISzAlloc", !6, i64 0, !6, i64 8}
!22 = !{!7, !7, i64 0}
!23 = !{!15, !10, i64 56}
!24 = !{!15, !10, i64 60}
!25 = distinct !{!25, !12}
!26 = !{!21, !6, 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"

%struct._CFolder = type { i32, ptr, i32, ptr, i32, ptr, ptr, i32, i32, i32 }

; Function Attrs: nounwind uwtable
declare dso_local i32 @MySzInAlloc(ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #0

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

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @SzReadSize(ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local i32 @SzReadNumber32(ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local i32 @SzReadID(ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local i32 @SzSkeepData(ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local i32 @SzWaitAttribute(ptr noundef, i64 noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local i32 @SzReadHashDigests(ptr noundef, i64 noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local i32 @SzReadSwitch(ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local i32 @SzGetNextFolderItem(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local i32 @SzReadUnPackInfo(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr nocapture noundef readonly %4) local_unnamed_addr #0 {
  %6 = alloca i64, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = tail call i32 @SzWaitAttribute(ptr noundef %0, i64 noundef 11)
  %.not = icmp eq i32 %9, 0
  br i1 %.not, label %10, label %.thread

10:                                               ; preds = %5
  %11 = tail call i32 @SzReadNumber32(ptr noundef %0, ptr noundef %1)
  %.not128 = icmp eq i32 %11, 0
  br i1 %.not128, label %12, label %.thread

12:                                               ; preds = %10
  %13 = tail call i32 @SzReadSwitch(ptr noundef %0)
  %.not129 = icmp eq i32 %13, 0
  br i1 %.not129, label %14, label %.thread

14:                                               ; preds = %12
  %15 = load i32, ptr %1, align 4, !tbaa !5
  %16 = zext i32 %15 to i64
  %17 = mul nuw nsw i64 %16, 72
  %18 = tail call i32 @MySzInAlloc(ptr noundef %2, i64 noundef %17, ptr noundef %3)
  %.not130 = icmp eq i32 %18, 0
  br i1 %.not130, label %.preheader155, label %.thread

.preheader155:                                    ; preds = %14
  %19 = load i32, ptr %1, align 4, !tbaa !5
  %.not180 = icmp eq i32 %19, 0
  br i1 %.not180, label %._crit_edge, label %.lr.ph

.preheader153:                                    ; preds = %.lr.ph
  %20 = icmp eq i32 %23, 0
  br i1 %20, label %._crit_edge, label %.lr.ph162

.lr.ph:                                           ; preds = %.preheader155, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %.preheader155 ]
  %21 = load ptr, ptr %2, align 8, !tbaa !9
  %22 = getelementptr inbounds %struct._CFolder, ptr %21, i64 %indvars.iv
  tail call void @SzFolderInit(ptr noundef %22) #3
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %23 = load i32, ptr %1, align 4, !tbaa !5
  %24 = zext i32 %23 to i64
  %25 = icmp ult i64 %indvars.iv.next, %24
  br i1 %25, label %.lr.ph, label %.preheader153, !llvm.loop !11

26:                                               ; preds = %.lr.ph162
  %indvars.iv.next196 = add nuw nsw i64 %indvars.iv195, 1
  %27 = load i32, ptr %1, align 4, !tbaa !5
  %28 = zext i32 %27 to i64
  %29 = icmp ult i64 %indvars.iv.next196, %28
  br i1 %29, label %.lr.ph162, label %._crit_edge, !llvm.loop !13

.lr.ph162:                                        ; preds = %.preheader153, %26
  %indvars.iv195 = phi i64 [ %indvars.iv.next196, %26 ], [ 0, %.preheader153 ]
  %30 = load ptr, ptr %2, align 8, !tbaa !9
  %31 = getelementptr inbounds %struct._CFolder, ptr %30, i64 %indvars.iv195
  %32 = tail call i32 @SzGetNextFolderItem(ptr noundef %0, ptr noundef %31, ptr noundef %3)
  %.not137 = icmp eq i32 %32, 0
  br i1 %.not137, label %26, label %.thread

._crit_edge:                                      ; preds = %26, %.preheader155, %.preheader153
  %33 = tail call i32 @SzWaitAttribute(ptr noundef %0, i64 noundef 12)
  %.not131 = icmp eq i32 %33, 0
  br i1 %.not131, label %.preheader151, label %.thread

.preheader151:                                    ; preds = %._crit_edge
  %34 = load i32, ptr %1, align 4, !tbaa !5
  %.not182 = icmp eq i32 %34, 0
  br i1 %.not182, label %.preheader149, label %.lr.ph167

.preheader149:                                    ; preds = %._crit_edge165, %.preheader151
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #3
  %35 = call i32 @SzReadID(ptr noundef %0, ptr noundef nonnull %6)
  %.not132171 = icmp eq i32 %35, 0
  br i1 %.not132171, label %.lr.ph175, label %.thread146

.lr.ph175:                                        ; preds = %.preheader149
  %36 = getelementptr inbounds i8, ptr %4, i64 8
  br label %51

.lr.ph167:                                        ; preds = %.preheader151, %._crit_edge165
  %indvars.iv201 = phi i64 [ %indvars.iv.next202, %._crit_edge165 ], [ 0, %.preheader151 ]
  %37 = load ptr, ptr %2, align 8, !tbaa !9
  %38 = getelementptr inbounds %struct._CFolder, ptr %37, i64 %indvars.iv201
  %39 = tail call i32 @SzFolderGetNumOutStreams(ptr noundef %38) #3
  %40 = getelementptr inbounds i8, ptr %38, i64 48
  %41 = zext i32 %39 to i64
  %42 = shl nuw nsw i64 %41, 2
  %43 = tail call i32 @MySzInAlloc(ptr noundef nonnull %40, i64 noundef %42, ptr noundef %3)
  %.not135 = icmp eq i32 %43, 0
  br i1 %.not135, label %.preheader150, label %.thread

.preheader150:                                    ; preds = %.lr.ph167
  %.not183 = icmp eq i32 %39, 0
  br i1 %.not183, label %._crit_edge165, label %.lr.ph164

44:                                               ; preds = %.lr.ph164
  %indvars.iv.next199 = add nuw nsw i64 %indvars.iv198, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next199, %41
  br i1 %exitcond.not, label %._crit_edge165, label %.lr.ph164, !llvm.loop !14

.lr.ph164:                                        ; preds = %.preheader150, %44
  %indvars.iv198 = phi i64 [ %indvars.iv.next199, %44 ], [ 0, %.preheader150 ]
  %45 = load ptr, ptr %40, align 8, !tbaa !15
  %46 = getelementptr inbounds i32, ptr %45, i64 %indvars.iv198
  %47 = tail call i32 @SzReadSize(ptr noundef %0, ptr noundef %46)
  %.not136 = icmp eq i32 %47, 0
  br i1 %.not136, label %44, label %.thread

._crit_edge165:                                   ; preds = %44, %.preheader150
  %indvars.iv.next202 = add nuw nsw i64 %indvars.iv201, 1
  %48 = load i32, ptr %1, align 4, !tbaa !5
  %49 = zext i32 %48 to i64
  %50 = icmp ult i64 %indvars.iv.next202, %49
  br i1 %50, label %.lr.ph167, label %.preheader149, !llvm.loop !17

51:                                               ; preds = %.lr.ph175, %select.unfold
  %52 = load i64, ptr %6, align 8, !tbaa !18
  switch i64 %52, label %77 [
    i64 0, label %.thread146
    i64 10, label %53
  ]

53:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #3
  store ptr null, ptr %7, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #3
  store ptr null, ptr %8, align 8, !tbaa !9
  %54 = load i32, ptr %1, align 4, !tbaa !5
  %55 = zext i32 %54 to i64
  %56 = load ptr, ptr %4, align 8, !tbaa !20
  %57 = call i32 @SzReadHashDigests(ptr noundef %0, i64 noundef %55, ptr noundef nonnull %7, ptr noundef nonnull %8, ptr noundef %56)
  %58 = icmp eq i32 %57, 0
  br i1 %58, label %.preheader, label %.thread146.critedge

.preheader:                                       ; preds = %53
  %59 = load i32, ptr %1, align 4, !tbaa !5
  %.not184 = icmp eq i32 %59, 0
  %.pre = load ptr, ptr %8, align 8, !tbaa !9
  br i1 %.not184, label %._crit_edge170, label %.lr.ph169

.lr.ph169:                                        ; preds = %.preheader
  %60 = load ptr, ptr %2, align 8, !tbaa !9
  %61 = load ptr, ptr %7, align 8, !tbaa !9
  br label %62

62:                                               ; preds = %.lr.ph169, %62
  %indvars.iv204 = phi i64 [ 0, %.lr.ph169 ], [ %indvars.iv.next205, %62 ]
  %63 = getelementptr inbounds %struct._CFolder, ptr %60, i64 %indvars.iv204
  %64 = getelementptr inbounds i8, ptr %61, i64 %indvars.iv204
  %65 = load i8, ptr %64, align 1, !tbaa !22
  %66 = zext i8 %65 to i32
  %67 = getelementptr inbounds i8, ptr %63, i64 56
  store i32 %66, ptr %67, align 8, !tbaa !23
  %68 = getelementptr inbounds i32, ptr %.pre, i64 %indvars.iv204
  %69 = load i32, ptr %68, align 4, !tbaa !5
  %70 = getelementptr inbounds i8, ptr %63, i64 60
  store i32 %69, ptr %70, align 4, !tbaa !24
  %indvars.iv.next205 = add nuw nsw i64 %indvars.iv204, 1
  %71 = load i32, ptr %1, align 4, !tbaa !5
  %72 = zext i32 %71 to i64
  %73 = icmp ult i64 %indvars.iv.next205, %72
  br i1 %73, label %62, label %._crit_edge170, !llvm.loop !25

._crit_edge170:                                   ; preds = %62, %.preheader
  %74 = load ptr, ptr %36, align 8, !tbaa !26
  call void %74(ptr noundef %.pre) #3
  %75 = load ptr, ptr %36, align 8, !tbaa !26
  %76 = load ptr, ptr %7, align 8, !tbaa !9
  call void %75(ptr noundef %76) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #3
  br label %select.unfold

77:                                               ; preds = %51
  %78 = call i32 @SzSkeepData(ptr noundef %0)
  %.not133 = icmp eq i32 %78, 0
  br i1 %.not133, label %select.unfold, label %.thread146

.thread146.critedge:                              ; preds = %53
  %79 = load ptr, ptr %36, align 8, !tbaa !26
  %80 = load ptr, ptr %8, align 8, !tbaa !9
  call void %79(ptr noundef %80) #3
  %81 = load ptr, ptr %36, align 8, !tbaa !26
  %82 = load ptr, ptr %7, align 8, !tbaa !9
  call void %81(ptr noundef %82) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #3
  br label %.thread146

.thread146:                                       ; preds = %51, %select.unfold, %77, %.preheader149, %.thread146.critedge
  %.16.ph = phi i32 [ %57, %.thread146.critedge ], [ %35, %.preheader149 ], [ 0, %51 ], [ %83, %select.unfold ], [ %78, %77 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #3
  br label %.thread

select.unfold:                                    ; preds = %._crit_edge170, %77
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #3
  %83 = call i32 @SzReadID(ptr noundef %0, ptr noundef nonnull %6)
  %.not132 = icmp eq i32 %83, 0
  br i1 %.not132, label %51, label %.thread146

.thread:                                          ; preds = %.lr.ph162, %.lr.ph167, %.lr.ph164, %.thread146, %._crit_edge, %14, %12, %10, %5
  %.17 = phi i32 [ %33, %._crit_edge ], [ %18, %14 ], [ %13, %12 ], [ %11, %10 ], [ %9, %5 ], [ %.16.ph, %.thread146 ], [ %47, %.lr.ph164 ], [ %43, %.lr.ph167 ], [ %32, %.lr.ph162 ]
  ret i32 %.17
}

declare void @SzFolderInit(ptr noundef) local_unnamed_addr #2

declare i32 @SzFolderGetNumOutStreams(ptr noundef) local_unnamed_addr #2

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = !{!16, !10, i64 48}
!16 = !{!"_CFolder", !6, i64 0, !10, i64 8, !6, i64 16, !10, i64 24, !6, i64 32, !10, i64 40, !10, i64 48, !6, i64 56, !6, i64 60, !6, i64 64}
!17 = distinct !{!17, !12}
!18 = !{!19, !19, i64 0}
!19 = !{!"long long", !7, i64 0}
!20 = !{!21, !10, i64 0}
!21 = !{!"_ISzAlloc", !10, i64 0, !10, i64 8}
!22 = !{!7, !7, i64 0}
!23 = !{!16, !6, i64 56}
!24 = !{!16, !6, i64 60}
!25 = distinct !{!25, !12}
!26 = !{!21, !10, i64 8}


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