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

; 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._CFileInStream = type { %struct._ISzInStream, ptr }
%struct._ISzInStream = type { ptr, ptr }
%struct._CArchiveDatabaseEx = type { %struct._CArchiveDatabase, %struct._CInArchiveInfo, ptr, ptr, ptr, ptr }
%struct._CArchiveDatabase = type { i32, ptr, ptr, ptr, i32, ptr, i32, ptr }
%struct._CInArchiveInfo = type { i32, i32 }
%struct._ISzAlloc = type { ptr, ptr }
%struct._CFileItem = type { i32, i32, ptr, i8, i8, i8, i8 }

@.str.1 = external hidden unnamed_addr constant [74 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [145 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [12 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local i32 @SzFileReadImp(ptr noundef, 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 @SzFileSeekImp(ptr noundef, i32 noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local void @PrintError(ptr noundef) #0

declare i32 @printf(ptr noundef, ...) #2

; Function Attrs: nounwind uwtable
define dso_local i32 @main(i32 noundef %0, ptr noundef %1) #0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca %struct._CFileInStream, align 8
  %7 = alloca %struct._CArchiveDatabaseEx, align 8
  %8 = alloca i32, align 4
  %9 = alloca %struct._ISzAlloc, align 8
  %10 = alloca %struct._ISzAlloc, align 8
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca ptr, align 8
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca ptr, align 8
  %21 = alloca i64, align 8
  %22 = alloca i64, align 8
  %23 = alloca i64, align 8
  %24 = alloca ptr, align 8
  %25 = alloca ptr, align 8
  %26 = alloca i32, align 4
  %27 = alloca ptr, align 8
  %28 = alloca i64, align 8
  store i32 0, ptr %3, align 4
  store i32 %0, ptr %4, align 4, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 24, ptr %6) #4
  call void @llvm.lifetime.start.p0(i64 104, ptr %7) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr %9) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr %10) #4
  %29 = call i32 (ptr, ...) @printf(ptr noundef @.str.1)
  %30 = load i32, ptr %4, align 4, !tbaa !5
  %31 = icmp eq i32 %30, 1
  br i1 %31, label %32, label %34

32:                                               ; preds = %2
  %33 = call i32 (ptr, ...) @printf(ptr noundef @.str.2)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %11, align 4
  br label %254

34:                                               ; preds = %2
  %35 = load i32, ptr %4, align 4, !tbaa !5
  %36 = icmp slt i32 %35, 3
  br i1 %36, label %37, label %38

37:                                               ; preds = %34
  call void @PrintError(ptr noundef @.str.3)
  store i32 1, ptr %3, align 4
  store i32 1, ptr %11, align 4
  br label %254

38:                                               ; preds = %34
  %39 = load ptr, ptr %5, align 8, !tbaa !9
  %40 = getelementptr inbounds ptr, ptr %39, i64 2
  %41 = load ptr, ptr %40, align 8, !tbaa !9
  %42 = call noalias ptr @fopen(ptr noundef %41, ptr noundef @.str.4)
  %43 = getelementptr inbounds %struct._CFileInStream, ptr %6, i32 0, i32 1
  store ptr %42, ptr %43, align 8, !tbaa !11
  %44 = getelementptr inbounds %struct._CFileInStream, ptr %6, i32 0, i32 1
  %45 = load ptr, ptr %44, align 8, !tbaa !11
  %46 = icmp eq ptr %45, null
  br i1 %46, label %47, label %48

47:                                               ; preds = %38
  call void @PrintError(ptr noundef @.str.5)
  store i32 1, ptr %3, align 4
  store i32 1, ptr %11, align 4
  br label %254

48:                                               ; preds = %38
  %49 = getelementptr inbounds %struct._CFileInStream, ptr %6, i32 0, i32 0
  %50 = getelementptr inbounds %struct._ISzInStream, ptr %49, i32 0, i32 0
  store ptr @SzFileReadImp, ptr %50, align 8, !tbaa !14
  %51 = getelementptr inbounds %struct._CFileInStream, ptr %6, i32 0, i32 0
  %52 = getelementptr inbounds %struct._ISzInStream, ptr %51, i32 0, i32 1
  store ptr @SzFileSeekImp, ptr %52, align 8, !tbaa !15
  %53 = getelementptr inbounds %struct._ISzAlloc, ptr %9, i32 0, i32 0
  store ptr @SzAlloc, ptr %53, align 8, !tbaa !16
  %54 = getelementptr inbounds %struct._ISzAlloc, ptr %9, i32 0, i32 1
  store ptr @SzFree, ptr %54, align 8, !tbaa !18
  %55 = getelementptr inbounds %struct._ISzAlloc, ptr %10, i32 0, i32 0
  store ptr @SzAllocTemp, ptr %55, align 8, !tbaa !16
  %56 = getelementptr inbounds %struct._ISzAlloc, ptr %10, i32 0, i32 1
  store ptr @SzFreeTemp, ptr %56, align 8, !tbaa !18
  call void (...) @InitCrcTable()
  call void @SzArDbExInit(ptr noundef %7)
  %57 = getelementptr inbounds %struct._CFileInStream, ptr %6, i32 0, i32 0
  %58 = call i32 @SzArchiveOpen(ptr noundef %57, ptr noundef %7, ptr noundef %9, ptr noundef %10)
  store i32 %58, ptr %8, align 4, !tbaa !5
  %59 = load i32, ptr %8, align 4, !tbaa !5
  %60 = icmp eq i32 %59, 0
  br i1 %60, label %61, label %236

61:                                               ; preds = %48
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  %62 = load ptr, ptr %5, align 8, !tbaa !9
  %63 = getelementptr inbounds ptr, ptr %62, i64 1
  %64 = load ptr, ptr %63, align 8, !tbaa !9
  store ptr %64, ptr %12, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  store i32 0, ptr %13, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #4
  store i32 0, ptr %14, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #4
  store i32 0, ptr %15, align 4, !tbaa !5
  %65 = load ptr, ptr %12, align 8, !tbaa !9
  %66 = call i32 @strcmp(ptr noundef %65, ptr noundef @.str.6) #5
  %67 = icmp eq i32 %66, 0
  br i1 %67, label %68, label %69

68:                                               ; preds = %61
  store i32 1, ptr %13, align 4, !tbaa !5
  br label %69

69:                                               ; preds = %68, %61
  %70 = load ptr, ptr %12, align 8, !tbaa !9
  %71 = call i32 @strcmp(ptr noundef %70, ptr noundef @.str.7) #5
  %72 = icmp eq i32 %71, 0
  br i1 %72, label %73, label %74

73:                                               ; preds = %69
  store i32 1, ptr %14, align 4, !tbaa !5
  br label %80

74:                                               ; preds = %69
  %75 = load ptr, ptr %12, align 8, !tbaa !9
  %76 = call i32 @strcmp(ptr noundef %75, ptr noundef @.str.8) #5
  %77 = icmp eq i32 %76, 0
  br i1 %77, label %78, label %79

78:                                               ; preds = %74
  store i32 1, ptr %15, align 4, !tbaa !5
  br label %79

79:                                               ; preds = %78, %74
  br label %80

80:                                               ; preds = %79, %73
  %81 = load i32, ptr %13, align 4, !tbaa !5
  %82 = icmp ne i32 %81, 0
  br i1 %82, label %83, label %108

83:                                               ; preds = %80
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #4
  store i32 0, ptr %16, align 4, !tbaa !5
  br label %84

84:                                               ; preds = %104, %83
  %85 = load i32, ptr %16, align 4, !tbaa !5
  %86 = getelementptr inbounds %struct._CArchiveDatabaseEx, ptr %7, i32 0, i32 0
  %87 = getelementptr inbounds %struct._CArchiveDatabase, ptr %86, i32 0, i32 6
  %88 = load i32, ptr %87, align 8, !tbaa !19
  %89 = icmp ult i32 %85, %88
  br i1 %89, label %90, label %107

90:                                               ; preds = %84
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #4
  %91 = getelementptr inbounds %struct._CArchiveDatabaseEx, ptr %7, i32 0, i32 0
  %92 = getelementptr inbounds %struct._CArchiveDatabase, ptr %91, i32 0, i32 7
  %93 = load ptr, ptr %92, align 8, !tbaa !23
  %94 = load i32, ptr %16, align 4, !tbaa !5
  %95 = zext i32 %94 to i64
  %96 = getelementptr inbounds %struct._CFileItem, ptr %93, i64 %95
  store ptr %96, ptr %17, align 8, !tbaa !9
  %97 = load ptr, ptr %17, align 8, !tbaa !9
  %98 = getelementptr inbounds %struct._CFileItem, ptr %97, i32 0, i32 0
  %99 = load i32, ptr %98, align 8, !tbaa !24
  %100 = load ptr, ptr %17, align 8, !tbaa !9
  %101 = getelementptr inbounds %struct._CFileItem, ptr %100, i32 0, i32 2
  %102 = load ptr, ptr %101, align 8, !tbaa !26
  %103 = call i32 (ptr, ...) @printf(ptr noundef @.str.9, i32 noundef %99, ptr noundef %102)
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #4
  br label %104

104:                                              ; preds = %90
  %105 = load i32, ptr %16, align 4, !tbaa !5
  %106 = add i32 %105, 1
  store i32 %106, ptr %16, align 4, !tbaa !5
  br label %84, !llvm.loop !27

107:                                              ; preds = %84
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #4
  br label %235

108:                                              ; preds = %80
  %109 = load i32, ptr %14, align 4, !tbaa !5
  %110 = icmp ne i32 %109, 0
  br i1 %110, label %114, label %111

111:                                              ; preds = %108
  %112 = load i32, ptr %15, align 4, !tbaa !5
  %113 = icmp ne i32 %112, 0
  br i1 %113, label %114, label %233

114:                                              ; preds = %111, %108
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #4
  store i32 -1, ptr %19, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #4
  store ptr null, ptr %20, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #4
  store i64 0, ptr %21, align 8, !tbaa !29
  %115 = call i32 (ptr, ...) @printf(ptr noundef @.str.10)
  store i32 0, ptr %18, align 4, !tbaa !5
  br label %116

116:                                              ; preds = %226, %114
  %117 = load i32, ptr %18, align 4, !tbaa !5
  %118 = getelementptr inbounds %struct._CArchiveDatabaseEx, ptr %7, i32 0, i32 0
  %119 = getelementptr inbounds %struct._CArchiveDatabase, ptr %118, i32 0, i32 6
  %120 = load i32, ptr %119, align 8, !tbaa !19
  %121 = icmp ult i32 %117, %120
  br i1 %121, label %122, label %229

122:                                              ; preds = %116
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #4
  %123 = getelementptr inbounds %struct._CArchiveDatabaseEx, ptr %7, i32 0, i32 0
  %124 = getelementptr inbounds %struct._CArchiveDatabase, ptr %123, i32 0, i32 7
  %125 = load ptr, ptr %124, align 8, !tbaa !23
  %126 = load i32, ptr %18, align 4, !tbaa !5
  %127 = zext i32 %126 to i64
  %128 = getelementptr inbounds %struct._CFileItem, ptr %125, i64 %127
  store ptr %128, ptr %24, align 8, !tbaa !9
  %129 = load ptr, ptr %24, align 8, !tbaa !9
  %130 = getelementptr inbounds %struct._CFileItem, ptr %129, i32 0, i32 5
  %131 = load i8, ptr %130, align 2, !tbaa !31
  %132 = icmp ne i8 %131, 0
  br i1 %132, label %133, label %135

133:                                              ; preds = %122
  %134 = call i32 (ptr, ...) @printf(ptr noundef @.str.11)
  br label %141

135:                                              ; preds = %122
  %136 = load i32, ptr %14, align 4, !tbaa !5
  %137 = icmp ne i32 %136, 0
  %138 = zext i1 %137 to i64
  %139 = select i1 %137, ptr @.str.12, ptr @.str.13
  %140 = call i32 (ptr, ...) @printf(ptr noundef %139)
  br label %141

141:                                              ; preds = %135, %133
  %142 = load ptr, ptr %24, align 8, !tbaa !9
  %143 = getelementptr inbounds %struct._CFileItem, ptr %142, i32 0, i32 2
  %144 = load ptr, ptr %143, align 8, !tbaa !26
  %145 = call i32 (ptr, ...) @printf(ptr noundef @.str.14, ptr noundef %144)
  %146 = load ptr, ptr %24, align 8, !tbaa !9
  %147 = getelementptr inbounds %struct._CFileItem, ptr %146, i32 0, i32 5
  %148 = load i8, ptr %147, align 2, !tbaa !31
  %149 = icmp ne i8 %148, 0
  br i1 %149, label %150, label %152

150:                                              ; preds = %141
  %151 = call i32 (ptr, ...) @printf(ptr noundef @.str.10)
  store i32 7, ptr %11, align 4
  br label %223

152:                                              ; preds = %141
  %153 = getelementptr inbounds %struct._CFileInStream, ptr %6, i32 0, i32 0
  %154 = load i32, ptr %18, align 4, !tbaa !5
  %155 = call i32 @SzExtract(ptr noundef %153, ptr noundef %7, i32 noundef %154, ptr noundef %19, ptr noundef %20, ptr noundef %21, ptr noundef %22, ptr noundef %23, ptr noundef %9, ptr noundef %10)
  store i32 %155, ptr %8, align 4, !tbaa !5
  %156 = load i32, ptr %8, align 4, !tbaa !5
  %157 = icmp ne i32 %156, 0
  br i1 %157, label %158, label %159

158:                                              ; preds = %152
  store i32 5, ptr %11, align 4
  br label %223

159:                                              ; preds = %152
  %160 = load i32, ptr %14, align 4, !tbaa !5
  %161 = icmp ne i32 %160, 0
  br i1 %161, label %221, label %162

162:                                              ; preds = %159
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #4
  %163 = load ptr, ptr %24, align 8, !tbaa !9
  %164 = getelementptr inbounds %struct._CFileItem, ptr %163, i32 0, i32 2
  %165 = load ptr, ptr %164, align 8, !tbaa !26
  store ptr %165, ptr %27, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #4
  %166 = load ptr, ptr %24, align 8, !tbaa !9
  %167 = getelementptr inbounds %struct._CFileItem, ptr %166, i32 0, i32 2
  %168 = load ptr, ptr %167, align 8, !tbaa !26
  %169 = call i64 @strlen(ptr noundef %168) #5
  store i64 %169, ptr %28, align 8, !tbaa !29
  br label %170

170:                                              ; preds = %190, %162
  %171 = load i64, ptr %28, align 8, !tbaa !29
  %172 = icmp ugt i64 %171, 0
  br i1 %172, label %173, label %193

173:                                              ; preds = %170
  %174 = load ptr, ptr %24, align 8, !tbaa !9
  %175 = getelementptr inbounds %struct._CFileItem, ptr %174, i32 0, i32 2
  %176 = load ptr, ptr %175, align 8, !tbaa !26
  %177 = load i64, ptr %28, align 8, !tbaa !29
  %178 = sub i64 %177, 1
  %179 = getelementptr inbounds i8, ptr %176, i64 %178
  %180 = load i8, ptr %179, align 1, !tbaa !32
  %181 = sext i8 %180 to i32
  %182 = icmp eq i32 %181, 47
  br i1 %182, label %183, label %189

183:                                              ; preds = %173
  %184 = load ptr, ptr %24, align 8, !tbaa !9
  %185 = getelementptr inbounds %struct._CFileItem, ptr %184, i32 0, i32 2
  %186 = load ptr, ptr %185, align 8, !tbaa !26
  %187 = load i64, ptr %28, align 8, !tbaa !29
  %188 = getelementptr inbounds i8, ptr %186, i64 %187
  store ptr %188, ptr %27, align 8, !tbaa !9
  br label %193

189:                                              ; preds = %173
  br label %190

190:                                              ; preds = %189
  %191 = load i64, ptr %28, align 8, !tbaa !29
  %192 = add i64 %191, -1
  store i64 %192, ptr %28, align 8, !tbaa !29
  br label %170, !llvm.loop !33

193:                                              ; preds = %183, %170
  %194 = load ptr, ptr %27, align 8, !tbaa !9
  %195 = call noalias ptr @fopen(ptr noundef %194, ptr noundef @.str.15)
  store ptr %195, ptr %25, align 8, !tbaa !9
  %196 = load ptr, ptr %25, align 8, !tbaa !9
  %197 = icmp eq ptr %196, null
  br i1 %197, label %198, label %199

198:                                              ; preds = %193
  call void @PrintError(ptr noundef @.str.16)
  store i32 5, ptr %8, align 4, !tbaa !5
  store i32 5, ptr %11, align 4
  br label %218

199:                                              ; preds = %193
  %200 = load ptr, ptr %20, align 8, !tbaa !9
  %201 = load i64, ptr %22, align 8, !tbaa !29
  %202 = getelementptr inbounds i8, ptr %200, i64 %201
  %203 = load i64, ptr %23, align 8, !tbaa !29
  %204 = load ptr, ptr %25, align 8, !tbaa !9
  %205 = call i64 @fwrite(ptr noundef %202, i64 noundef 1, i64 noundef %203, ptr noundef %204)
  %206 = trunc i64 %205 to i32
  store i32 %206, ptr %26, align 4, !tbaa !5
  %207 = load i32, ptr %26, align 4, !tbaa !5
  %208 = zext i32 %207 to i64
  %209 = load i64, ptr %23, align 8, !tbaa !29
  %210 = icmp ne i64 %208, %209
  br i1 %210, label %211, label %212

211:                                              ; preds = %199
  call void @PrintError(ptr noundef @.str.17)
  store i32 5, ptr %8, align 4, !tbaa !5
  store i32 5, ptr %11, align 4
  br label %218

212:                                              ; preds = %199
  %213 = load ptr, ptr %25, align 8, !tbaa !9
  %214 = call i32 @fclose(ptr noundef %213)
  %215 = icmp ne i32 %214, 0
  br i1 %215, label %216, label %217

216:                                              ; preds = %212
  call void @PrintError(ptr noundef @.str.18)
  store i32 5, ptr %8, align 4, !tbaa !5
  store i32 5, ptr %11, align 4
  br label %218

217:                                              ; preds = %212
  store i32 0, ptr %11, align 4
  br label %218

218:                                              ; preds = %217, %216, %211, %198
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #4
  %219 = load i32, ptr %11, align 4
  switch i32 %219, label %223 [
    i32 0, label %220
  ]

220:                                              ; preds = %218
  br label %221

221:                                              ; preds = %220, %159
  %222 = call i32 (ptr, ...) @printf(ptr noundef @.str.10)
  store i32 0, ptr %11, align 4
  br label %223

223:                                              ; preds = %221, %218, %158, %150
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #4
  %224 = load i32, ptr %11, align 4
  switch i32 %224, label %256 [
    i32 0, label %225
    i32 7, label %226
    i32 5, label %229
  ]

225:                                              ; preds = %223
  br label %226

226:                                              ; preds = %225, %223
  %227 = load i32, ptr %18, align 4, !tbaa !5
  %228 = add i32 %227, 1
  store i32 %228, ptr %18, align 4, !tbaa !5
  br label %116, !llvm.loop !34

229:                                              ; preds = %223, %116
  %230 = getelementptr inbounds %struct._ISzAlloc, ptr %9, i32 0, i32 1
  %231 = load ptr, ptr %230, align 8, !tbaa !18
  %232 = load ptr, ptr %20, align 8, !tbaa !9
  call void %231(ptr noundef %232)
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #4
  br label %234

233:                                              ; preds = %111
  call void @PrintError(ptr noundef @.str.3)
  store i32 5, ptr %8, align 4, !tbaa !5
  br label %234

234:                                              ; preds = %233, %229
  br label %235

235:                                              ; preds = %234, %107
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  br label %236

236:                                              ; preds = %235, %48
  %237 = getelementptr inbounds %struct._ISzAlloc, ptr %9, i32 0, i32 1
  %238 = load ptr, ptr %237, align 8, !tbaa !18
  call void @SzArDbExFree(ptr noundef %7, ptr noundef %238)
  %239 = getelementptr inbounds %struct._CFileInStream, ptr %6, i32 0, i32 1
  %240 = load ptr, ptr %239, align 8, !tbaa !11
  %241 = call i32 @fclose(ptr noundef %240)
  %242 = load i32, ptr %8, align 4, !tbaa !5
  %243 = icmp eq i32 %242, 0
  br i1 %243, label %244, label %246

244:                                              ; preds = %236
  %245 = call i32 (ptr, ...) @printf(ptr noundef @.str.19)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %11, align 4
  br label %254

246:                                              ; preds = %236
  %247 = load i32, ptr %8, align 4, !tbaa !5
  %248 = icmp eq i32 %247, 2
  br i1 %248, label %249, label %250

249:                                              ; preds = %246
  call void @PrintError(ptr noundef @.str.20)
  br label %253

250:                                              ; preds = %246
  %251 = load i32, ptr %8, align 4, !tbaa !5
  %252 = call i32 (ptr, ...) @printf(ptr noundef @.str.21, i32 noundef %251)
  br label %253

253:                                              ; preds = %250, %249
  store i32 1, ptr %3, align 4
  store i32 1, ptr %11, align 4
  br label %254

254:                                              ; preds = %253, %244, %47, %37, %32
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 104, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %6) #4
  %255 = load i32, ptr %3, align 4
  ret i32 %255

256:                                              ; preds = %223
  unreachable
}

declare noalias ptr @fopen(ptr noundef, ptr noundef) #2

declare ptr @SzAlloc(i64 noundef) #2

declare void @SzFree(ptr noundef) #2

declare ptr @SzAllocTemp(i64 noundef) #2

declare void @SzFreeTemp(ptr noundef) #2

declare void @InitCrcTable(...) #2

declare void @SzArDbExInit(ptr noundef) #2

declare i32 @SzArchiveOpen(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #2

; Function Attrs: nounwind willreturn memory(read)
declare i32 @strcmp(ptr noundef, ptr noundef) #3

declare i32 @SzExtract(ptr noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #2

; Function Attrs: nounwind willreturn memory(read)
declare i64 @strlen(ptr noundef) #3

declare i64 @fwrite(ptr noundef, i64 noundef, i64 noundef, ptr noundef) #2

declare i32 @fclose(ptr noundef) #2

declare void @SzArDbExFree(ptr noundef, 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 willreturn memory(read) "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 = { nounwind }
attributes #5 = { nounwind willreturn memory(read) }

!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 = !{!12, !10, i64 16}
!12 = !{!"_CFileInStream", !13, i64 0, !10, i64 16}
!13 = !{!"_ISzInStream", !10, i64 0, !10, i64 8}
!14 = !{!12, !10, i64 0}
!15 = !{!12, !10, i64 8}
!16 = !{!17, !10, i64 0}
!17 = !{!"_ISzAlloc", !10, i64 0, !10, i64 8}
!18 = !{!17, !10, i64 8}
!19 = !{!20, !6, i64 48}
!20 = !{!"_CArchiveDatabaseEx", !21, i64 0, !22, i64 64, !10, i64 72, !10, i64 80, !10, i64 88, !10, i64 96}
!21 = !{!"_CArchiveDatabase", !6, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !6, i64 32, !10, i64 40, !6, i64 48, !10, i64 56}
!22 = !{!"_CInArchiveInfo", !6, i64 0, !6, i64 4}
!23 = !{!20, !10, i64 56}
!24 = !{!25, !6, i64 0}
!25 = !{!"_CFileItem", !6, i64 0, !6, i64 4, !10, i64 8, !7, i64 16, !7, i64 17, !7, i64 18, !7, i64 19}
!26 = !{!25, !10, i64 8}
!27 = distinct !{!27, !28}
!28 = !{!"llvm.loop.mustprogress"}
!29 = !{!30, !30, i64 0}
!30 = !{!"long", !7, i64 0}
!31 = !{!25, !7, i64 18}
!32 = !{!7, !7, i64 0}
!33 = distinct !{!33, !28}
!34 = distinct !{!34, !28}


; 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._CFileInStream = type { %struct._ISzInStream, ptr }
%struct._ISzInStream = type { ptr, ptr }
%struct._CArchiveDatabaseEx = type { %struct._CArchiveDatabase, %struct._CInArchiveInfo, ptr, ptr, ptr, ptr }
%struct._CArchiveDatabase = type { i32, ptr, ptr, ptr, i32, ptr, i32, ptr }
%struct._CInArchiveInfo = type { i32, i32 }
%struct._ISzAlloc = type { ptr, ptr }
%struct._CFileItem = type { i32, i32, ptr, i8, i8, i8, i8 }

@.str.1 = external hidden unnamed_addr constant [74 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [145 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [12 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local i32 @SzFileReadImp(ptr noundef, ptr noundef, i64 noundef, ptr noundef) #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 @SzFileSeekImp(ptr noundef, i32 noundef) #0

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

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
define dso_local range(i32 0, 2) i32 @main(i32 noundef %0, ptr nocapture noundef readonly %1) local_unnamed_addr #0 {
  %3 = alloca %struct._CFileInStream, align 8
  %4 = alloca %struct._CArchiveDatabaseEx, align 8
  %5 = alloca %struct._ISzAlloc, align 8
  %6 = alloca %struct._ISzAlloc, align 8
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #5
  call void @llvm.lifetime.start.p0(i64 104, ptr nonnull %4) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #5
  %12 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1)
  %13 = icmp eq i32 %0, 1
  br i1 %13, label %14, label %16

14:                                               ; preds = %2
  %15 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2)
  br label %135

16:                                               ; preds = %2
  %17 = icmp slt i32 %0, 3
  br i1 %17, label %18, label %19

18:                                               ; preds = %16
  tail call void @PrintError(ptr noundef nonnull @.str.3)
  br label %135

19:                                               ; preds = %16
  %20 = getelementptr inbounds i8, ptr %1, i64 16
  %21 = load ptr, ptr %20, align 8, !tbaa !5
  %22 = tail call noalias ptr @fopen(ptr noundef %21, ptr noundef nonnull @.str.4)
  %23 = getelementptr inbounds i8, ptr %3, i64 16
  store ptr %22, ptr %23, align 8, !tbaa !9
  %24 = icmp eq ptr %22, null
  br i1 %24, label %25, label %26

25:                                               ; preds = %19
  tail call void @PrintError(ptr noundef nonnull @.str.5)
  br label %135

26:                                               ; preds = %19
  store ptr @SzFileReadImp, ptr %3, align 8, !tbaa !12
  %27 = getelementptr inbounds i8, ptr %3, i64 8
  store ptr @SzFileSeekImp, ptr %27, align 8, !tbaa !13
  store ptr @SzAlloc, ptr %5, align 8, !tbaa !14
  %28 = getelementptr inbounds i8, ptr %5, i64 8
  store ptr @SzFree, ptr %28, align 8, !tbaa !16
  store ptr @SzAllocTemp, ptr %6, align 8, !tbaa !14
  %29 = getelementptr inbounds i8, ptr %6, i64 8
  store ptr @SzFreeTemp, ptr %29, align 8, !tbaa !16
  tail call void (...) @InitCrcTable() #5
  call void @SzArDbExInit(ptr noundef nonnull %4) #5
  %30 = call i32 @SzArchiveOpen(ptr noundef nonnull %3, ptr noundef nonnull %4, ptr noundef nonnull %5, ptr noundef nonnull %6) #5
  %31 = icmp eq i32 %30, 0
  br i1 %31, label %32, label %126

32:                                               ; preds = %26
  %33 = getelementptr inbounds i8, ptr %1, i64 8
  %34 = load ptr, ptr %33, align 8, !tbaa !5
  %35 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %34, ptr noundef nonnull dereferenceable(1) @.str.6) #6
  %.not = icmp eq i32 %35, 0
  %36 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %34, ptr noundef nonnull dereferenceable(1) @.str.7) #6
  %37 = icmp eq i32 %36, 0
  br i1 %37, label %41, label %38

38:                                               ; preds = %32
  %39 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %34, ptr noundef nonnull dereferenceable(1) @.str.8) #6
  %40 = icmp eq i32 %39, 0
  br label %41

41:                                               ; preds = %38, %32
  %42 = phi i1 [ false, %32 ], [ %40, %38 ]
  br i1 %.not, label %.preheader, label %59

.preheader:                                       ; preds = %41
  %43 = getelementptr inbounds i8, ptr %4, i64 48
  %44 = load i32, ptr %43, align 8, !tbaa !17
  %.not93 = icmp eq i32 %44, 0
  br i1 %.not93, label %.thread78, label %.lr.ph91

.lr.ph91:                                         ; preds = %.preheader
  %45 = getelementptr inbounds i8, ptr %4, i64 56
  br label %49

.thread78:                                        ; preds = %49, %.preheader
  %46 = load ptr, ptr %28, align 8, !tbaa !16
  call void @SzArDbExFree(ptr noundef nonnull %4, ptr noundef %46) #5
  %47 = load ptr, ptr %23, align 8, !tbaa !9
  %48 = call i32 @fclose(ptr noundef %47)
  br label %130

49:                                               ; preds = %.lr.ph91, %49
  %indvars.iv104 = phi i64 [ 0, %.lr.ph91 ], [ %indvars.iv.next105, %49 ]
  %50 = load ptr, ptr %45, align 8, !tbaa !22
  %51 = getelementptr inbounds %struct._CFileItem, ptr %50, i64 %indvars.iv104
  %52 = load i32, ptr %51, align 8, !tbaa !23
  %53 = getelementptr inbounds i8, ptr %51, i64 8
  %54 = load ptr, ptr %53, align 8, !tbaa !25
  %55 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.9, i32 noundef %52, ptr noundef %54)
  %indvars.iv.next105 = add nuw nsw i64 %indvars.iv104, 1
  %56 = load i32, ptr %43, align 8, !tbaa !17
  %57 = zext i32 %56 to i64
  %58 = icmp ult i64 %indvars.iv.next105, %57
  br i1 %58, label %49, label %.thread78, !llvm.loop !26

59:                                               ; preds = %41
  %or.cond = or i1 %37, %42
  br i1 %or.cond, label %60, label %.thread75

60:                                               ; preds = %59
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #5
  store i32 -1, ptr %7, align 4, !tbaa !28
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #5
  store ptr null, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #5
  store i64 0, ptr %9, align 8, !tbaa !29
  %61 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.10)
  %62 = getelementptr inbounds i8, ptr %4, i64 48
  %63 = load i32, ptr %62, align 8, !tbaa !17
  %.not92 = icmp eq i32 %63, 0
  br i1 %.not92, label %.loopexit, label %.lr.ph89

.lr.ph89:                                         ; preds = %60
  %64 = getelementptr inbounds i8, ptr %4, i64 56
  %65 = select i1 %37, ptr @.str.12, ptr @.str.13
  br i1 %37, label %.lr.ph89.split.us, label %.lr.ph89.split

.lr.ph89.split.us:                                ; preds = %.lr.ph89, %78
  %indvars.iv101 = phi i64 [ %indvars.iv.next102, %78 ], [ 0, %.lr.ph89 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #5
  %66 = load ptr, ptr %64, align 8, !tbaa !22
  %67 = getelementptr inbounds %struct._CFileItem, ptr %66, i64 %indvars.iv101
  %68 = getelementptr inbounds i8, ptr %67, i64 18
  %69 = load i8, ptr %68, align 2, !tbaa !31
  %.not61.us = icmp eq i8 %69, 0
  %..str.11 = select i1 %.not61.us, ptr %65, ptr @.str.11
  %70 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %..str.11)
  %71 = getelementptr inbounds i8, ptr %67, i64 8
  %72 = load ptr, ptr %71, align 8, !tbaa !25
  %73 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.14, ptr noundef %72)
  %74 = load i8, ptr %68, align 2, !tbaa !31
  %.not62.us = icmp eq i8 %74, 0
  br i1 %.not62.us, label %75, label %78

75:                                               ; preds = %.lr.ph89.split.us
  %76 = trunc nuw i64 %indvars.iv101 to i32
  %77 = call i32 @SzExtract(ptr noundef nonnull %3, ptr noundef nonnull %4, i32 noundef %76, ptr noundef nonnull %7, ptr noundef nonnull %8, ptr noundef nonnull %9, ptr noundef nonnull %10, ptr noundef nonnull %11, ptr noundef nonnull %5, ptr noundef nonnull %6) #5
  %.not63.us = icmp eq i32 %77, 0
  br i1 %.not63.us, label %78, label %.thread70

78:                                               ; preds = %75, %.lr.ph89.split.us
  %79 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.10)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #5
  %indvars.iv.next102 = add nuw nsw i64 %indvars.iv101, 1
  %80 = load i32, ptr %62, align 8, !tbaa !17
  %81 = zext i32 %80 to i64
  %82 = icmp ult i64 %indvars.iv.next102, %81
  br i1 %82, label %.lr.ph89.split.us, label %.loopexit, !llvm.loop !32

.lr.ph89.split:                                   ; preds = %.lr.ph89, %116
  %indvars.iv = phi i64 [ %indvars.iv.next, %116 ], [ 0, %.lr.ph89 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #5
  %83 = load ptr, ptr %64, align 8, !tbaa !22
  %84 = getelementptr inbounds %struct._CFileItem, ptr %83, i64 %indvars.iv
  %85 = getelementptr inbounds i8, ptr %84, i64 18
  %86 = load i8, ptr %85, align 2, !tbaa !31
  %.not61 = icmp eq i8 %86, 0
  %..str.11114 = select i1 %.not61, ptr %65, ptr @.str.11
  %87 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %..str.11114)
  %88 = getelementptr inbounds i8, ptr %84, i64 8
  %89 = load ptr, ptr %88, align 8, !tbaa !25
  %90 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.14, ptr noundef %89)
  %91 = load i8, ptr %85, align 2, !tbaa !31
  %.not62 = icmp eq i8 %91, 0
  br i1 %.not62, label %92, label %116

92:                                               ; preds = %.lr.ph89.split
  %93 = trunc nuw i64 %indvars.iv to i32
  %94 = call i32 @SzExtract(ptr noundef nonnull %3, ptr noundef nonnull %4, i32 noundef %93, ptr noundef nonnull %7, ptr noundef nonnull %8, ptr noundef nonnull %9, ptr noundef nonnull %10, ptr noundef nonnull %11, ptr noundef nonnull %5, ptr noundef nonnull %6) #5
  %.not63 = icmp eq i32 %94, 0
  br i1 %.not63, label %95, label %.thread70

95:                                               ; preds = %92
  %96 = load ptr, ptr %88, align 8, !tbaa !25
  %97 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %96) #6
  %.not6483 = icmp eq i64 %97, 0
  br i1 %.not6483, label %._crit_edge, label %.lr.ph

98:                                               ; preds = %.lr.ph
  %99 = add i64 %.084, -1
  %.not64 = icmp eq i64 %99, 0
  br i1 %.not64, label %._crit_edge, label %.lr.ph, !llvm.loop !33

.lr.ph:                                           ; preds = %95, %98
  %.084 = phi i64 [ %99, %98 ], [ %97, %95 ]
  %100 = getelementptr i8, ptr %96, i64 %.084
  %101 = getelementptr i8, ptr %100, i64 -1
  %102 = load i8, ptr %101, align 1, !tbaa !34
  %103 = icmp eq i8 %102, 47
  br i1 %103, label %._crit_edge, label %98

._crit_edge:                                      ; preds = %98, %.lr.ph, %95
  %.045 = phi ptr [ %96, %95 ], [ %100, %.lr.ph ], [ %96, %98 ]
  %104 = call noalias ptr @fopen(ptr noundef %.045, ptr noundef nonnull @.str.15)
  %105 = icmp eq ptr %104, null
  br i1 %105, label %.thread70.sink.split, label %106

106:                                              ; preds = %._crit_edge
  %107 = load ptr, ptr %8, align 8, !tbaa !5
  %108 = load i64, ptr %10, align 8, !tbaa !29
  %109 = getelementptr inbounds i8, ptr %107, i64 %108
  %110 = load i64, ptr %11, align 8, !tbaa !29
  %111 = call i64 @fwrite(ptr noundef %109, i64 noundef 1, i64 noundef %110, ptr noundef nonnull %104)
  %112 = and i64 %111, 4294967295
  %113 = load i64, ptr %11, align 8, !tbaa !29
  %.not65 = icmp eq i64 %112, %113
  br i1 %.not65, label %114, label %.thread70.sink.split

114:                                              ; preds = %106
  %115 = call i32 @fclose(ptr noundef nonnull %104)
  %.not66 = icmp eq i32 %115, 0
  br i1 %.not66, label %116, label %.thread70.sink.split

.thread70.sink.split:                             ; preds = %114, %106, %._crit_edge
  %.str.16.sink = phi ptr [ @.str.16, %._crit_edge ], [ @.str.17, %106 ], [ @.str.18, %114 ]
  call void @PrintError(ptr noundef nonnull %.str.16.sink)
  br label %.thread70

.thread70:                                        ; preds = %92, %75, %.thread70.sink.split
  %.3.ph = phi i32 [ 5, %.thread70.sink.split ], [ %77, %75 ], [ %94, %92 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #5
  br label %.loopexit

116:                                              ; preds = %114, %.lr.ph89.split
  %117 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.10)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %118 = load i32, ptr %62, align 8, !tbaa !17
  %119 = zext i32 %118 to i64
  %120 = icmp ult i64 %indvars.iv.next, %119
  br i1 %120, label %.lr.ph89.split, label %.loopexit, !llvm.loop !32

.loopexit:                                        ; preds = %116, %78, %60, %.thread70
  %.4 = phi i32 [ %.3.ph, %.thread70 ], [ 0, %60 ], [ 0, %78 ], [ 0, %116 ]
  %121 = load ptr, ptr %28, align 8, !tbaa !16
  %122 = load ptr, ptr %8, align 8, !tbaa !5
  call void %121(ptr noundef %122) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #5
  br label %126

.thread75:                                        ; preds = %59
  call void @PrintError(ptr noundef nonnull @.str.3)
  %123 = load ptr, ptr %28, align 8, !tbaa !16
  call void @SzArDbExFree(ptr noundef nonnull %4, ptr noundef %123) #5
  %124 = load ptr, ptr %23, align 8, !tbaa !9
  %125 = call i32 @fclose(ptr noundef %124)
  br label %133

126:                                              ; preds = %.loopexit, %26
  %.6 = phi i32 [ %30, %26 ], [ %.4, %.loopexit ]
  %127 = load ptr, ptr %28, align 8, !tbaa !16
  call void @SzArDbExFree(ptr noundef nonnull %4, ptr noundef %127) #5
  %128 = load ptr, ptr %23, align 8, !tbaa !9
  %129 = call i32 @fclose(ptr noundef %128)
  switch i32 %.6, label %133 [
    i32 0, label %130
    i32 2, label %132
  ]

130:                                              ; preds = %.thread78, %126
  %131 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.19)
  br label %135

132:                                              ; preds = %126
  call void @PrintError(ptr noundef nonnull @.str.20)
  br label %135

133:                                              ; preds = %.thread75, %126
  %.677 = phi i32 [ 5, %.thread75 ], [ %.6, %126 ]
  %134 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.21, i32 noundef %.677)
  br label %135

135:                                              ; preds = %132, %133, %130, %25, %18, %14
  %.046 = phi i32 [ 0, %14 ], [ 1, %18 ], [ 1, %25 ], [ 0, %130 ], [ 1, %133 ], [ 1, %132 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 104, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #5
  ret i32 %.046
}

; Function Attrs: nofree nounwind
declare noalias noundef ptr @fopen(ptr nocapture noundef readonly, ptr nocapture noundef readonly) local_unnamed_addr #2

declare ptr @SzAlloc(i64 noundef) #3

declare void @SzFree(ptr noundef) #3

declare ptr @SzAllocTemp(i64 noundef) #3

declare void @SzFreeTemp(ptr noundef) #3

declare void @InitCrcTable(...) local_unnamed_addr #3

declare void @SzArDbExInit(ptr noundef) local_unnamed_addr #3

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i32 @strcmp(ptr nocapture noundef, ptr nocapture noundef) local_unnamed_addr #4

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #4

; Function Attrs: nofree nounwind
declare noundef i64 @fwrite(ptr nocapture noundef, i64 noundef, i64 noundef, ptr nocapture noundef) local_unnamed_addr #2

; Function Attrs: nofree nounwind
declare noundef i32 @fclose(ptr nocapture noundef) local_unnamed_addr #2

declare void @SzArDbExFree(ptr noundef, ptr noundef) local_unnamed_addr #3

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 = { nofree 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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress nofree nounwind willreturn memory(argmem: read) "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 }
attributes #6 = { nounwind willreturn memory(read) }

!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, !6, i64 16}
!10 = !{!"_CFileInStream", !11, i64 0, !6, i64 16}
!11 = !{!"_ISzInStream", !6, i64 0, !6, i64 8}
!12 = !{!10, !6, i64 0}
!13 = !{!10, !6, i64 8}
!14 = !{!15, !6, i64 0}
!15 = !{!"_ISzAlloc", !6, i64 0, !6, i64 8}
!16 = !{!15, !6, i64 8}
!17 = !{!18, !20, i64 48}
!18 = !{!"_CArchiveDatabaseEx", !19, i64 0, !21, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96}
!19 = !{!"_CArchiveDatabase", !20, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !20, i64 32, !6, i64 40, !20, i64 48, !6, i64 56}
!20 = !{!"int", !7, i64 0}
!21 = !{!"_CInArchiveInfo", !20, i64 0, !20, i64 4}
!22 = !{!18, !6, i64 56}
!23 = !{!24, !20, i64 0}
!24 = !{!"_CFileItem", !20, i64 0, !20, i64 4, !6, i64 8, !7, i64 16, !7, i64 17, !7, i64 18, !7, i64 19}
!25 = !{!24, !6, i64 8}
!26 = distinct !{!26, !27}
!27 = !{!"llvm.loop.mustprogress"}
!28 = !{!20, !20, i64 0}
!29 = !{!30, !30, i64 0}
!30 = !{!"long", !7, i64 0}
!31 = !{!24, !7, i64 18}
!32 = distinct !{!32, !27}
!33 = distinct !{!33, !27}
!34 = !{!7, !7, i64 0}


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