; LLVM IR from zjhellofss/KuiperInfer :: source/runtime/pnnx (store_zip)

; 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.pnnx::local_file_header" = type <{ i16, i16, i16, i16, i16, i32, i32, i32, i16, i16 }>
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"struct.pnnx::zip64_extended_extra_field" = type <{ i64, i64, i64, i32 }>
%"struct.pnnx::StoreZipReader::StoreZipMeta" = type { i64, i64 }
%"struct.pnnx::central_directory_file_header" = type <{ i16, i16, i16, i16, i16, i16, i32, i32, i32, i16, i16, i16, i16, i16, i32, i32 }>
%"struct.pnnx::end_of_central_directory_record" = type <{ i16, i16, i16, i16, i32, i32, i16 }>
%"struct.pnnx::zip64_end_of_central_directory_record" = type <{ i64, i16, i16, i32, i32, i64, i64, i64, i64 }>
%"struct.pnnx::zip64_end_of_central_directory_locator" = type <{ i32, i64, i32 }>
%"class.pnnx::StoreZipReader" = type { ptr, %"class.std::map" }
%"class.std::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, pnnx::StoreZipReader::StoreZipMeta>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, pnnx::StoreZipReader::StoreZipMeta>>, std::less<std::__cxx11::basic_string<char>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, pnnx::StoreZipReader::StoreZipMeta>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, pnnx::StoreZipReader::StoreZipMeta>>, std::less<std::__cxx11::basic_string<char>>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }

@.str = external hidden unnamed_addr constant [3 x i8], align 1
@stderr = external global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [62 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [26 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN4pnnx14StoreZipReader5closeEv(ptr noundef nonnull align 8 dereferenceable(56)) #0 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN4pnnx14StoreZipReader4openERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(56) %0, ptr noundef nonnull align 8 dereferenceable(32) %1) #0 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca %"struct.pnnx::local_file_header", align 1
  %10 = alloca %"class.std::__cxx11::basic_string", align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca i64, align 8
  %14 = alloca i64, align 8
  %15 = alloca i16, align 2
  %16 = alloca i16, align 2
  %17 = alloca i16, align 2
  %18 = alloca %"struct.pnnx::zip64_extended_extra_field", align 1
  %19 = alloca %"struct.pnnx::StoreZipReader::StoreZipMeta", align 8
  %20 = alloca %"struct.pnnx::central_directory_file_header", align 1
  %21 = alloca %"struct.pnnx::end_of_central_directory_record", align 1
  %22 = alloca %"struct.pnnx::zip64_end_of_central_directory_record", align 1
  %23 = alloca %"struct.pnnx::zip64_end_of_central_directory_locator", align 1
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  %24 = load ptr, ptr %4, align 8
  %25 = call noundef i32 @_ZN4pnnx14StoreZipReader5closeEv(ptr noundef nonnull align 8 dereferenceable(56) %24)
  %26 = load ptr, ptr %5, align 8, !tbaa !5
  %27 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %26) #6
  %28 = call noalias ptr @fopen(ptr noundef %27, ptr noundef @.str)
  %29 = getelementptr inbounds %"class.pnnx::StoreZipReader", ptr %24, i32 0, i32 0
  store ptr %28, ptr %29, align 8, !tbaa !9
  %30 = getelementptr inbounds %"class.pnnx::StoreZipReader", ptr %24, i32 0, i32 0
  %31 = load ptr, ptr %30, align 8, !tbaa !9
  %32 = icmp ne ptr %31, null
  br i1 %32, label %36, label %33

33:                                               ; preds = %2
  %34 = load ptr, ptr @stderr, align 8, !tbaa !5
  %35 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %34, ptr noundef @.str.1) #6
  store i32 -1, ptr %3, align 4
  br label %287

36:                                               ; preds = %2
  br label %37

37:                                               ; preds = %285, %36
  %38 = getelementptr inbounds %"class.pnnx::StoreZipReader", ptr %24, i32 0, i32 0
  %39 = load ptr, ptr %38, align 8, !tbaa !9
  %40 = call i32 @feof(ptr noundef %39) #6
  %41 = icmp ne i32 %40, 0
  %42 = xor i1 %41, true
  br i1 %42, label %43, label %286

43:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  %44 = getelementptr inbounds %"class.pnnx::StoreZipReader", ptr %24, i32 0, i32 0
  %45 = load ptr, ptr %44, align 8, !tbaa !9
  %46 = call i64 @fread(ptr noundef %6, i64 noundef 4, i64 noundef 1, ptr noundef %45)
  %47 = trunc i64 %46 to i32
  store i32 %47, ptr %7, align 4, !tbaa !20
  %48 = load i32, ptr %7, align 4, !tbaa !20
  %49 = icmp ne i32 %48, 1
  br i1 %49, label %50, label %51

50:                                               ; preds = %43
  store i32 3, ptr %8, align 4
  br label %283

51:                                               ; preds = %43
  %52 = load i32, ptr %6, align 4, !tbaa !20
  %53 = icmp eq i32 %52, 67324752
  br i1 %53, label %54, label %216

54:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 26, ptr %9) #6
  %55 = getelementptr inbounds %"class.pnnx::StoreZipReader", ptr %24, i32 0, i32 0
  %56 = load ptr, ptr %55, align 8, !tbaa !9
  %57 = call i64 @fread(ptr noundef %9, i64 noundef 26, i64 noundef 1, ptr noundef %56)
  %58 = getelementptr inbounds %"struct.pnnx::local_file_header", ptr %9, i32 0, i32 1
  %59 = load i16, ptr %58, align 1, !tbaa !22
  %60 = zext i16 %59 to i32
  %61 = and i32 %60, 8
  %62 = icmp ne i32 %61, 0
  br i1 %62, label %63, label %66

63:                                               ; preds = %54
  %64 = load ptr, ptr @stderr, align 8, !tbaa !5
  %65 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %64, ptr noundef @.str.2) #6
  store i32 -1, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %207

66:                                               ; preds = %54
  %67 = getelementptr inbounds %"struct.pnnx::local_file_header", ptr %9, i32 0, i32 2
  %68 = load i16, ptr %67, align 1, !tbaa !25
  %69 = zext i16 %68 to i32
  %70 = icmp ne i32 %69, 0
  br i1 %70, label %77, label %71

71:                                               ; preds = %66
  %72 = getelementptr inbounds %"struct.pnnx::local_file_header", ptr %9, i32 0, i32 6
  %73 = load i32, ptr %72, align 1, !tbaa !26
  %74 = getelementptr inbounds %"struct.pnnx::local_file_header", ptr %9, i32 0, i32 7
  %75 = load i32, ptr %74, align 1, !tbaa !27
  %76 = icmp ne i32 %73, %75
  br i1 %76, label %77, label %84

77:                                               ; preds = %71, %66
  %78 = load ptr, ptr @stderr, align 8, !tbaa !5
  %79 = getelementptr inbounds %"struct.pnnx::local_file_header", ptr %9, i32 0, i32 6
  %80 = load i32, ptr %79, align 1, !tbaa !26
  %81 = getelementptr inbounds %"struct.pnnx::local_file_header", ptr %9, i32 0, i32 7
  %82 = load i32, ptr %81, align 1, !tbaa !27
  %83 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %78, ptr noundef @.str.3, i32 noundef %80, i32 noundef %82) #6
  store i32 -1, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %207

84:                                               ; preds = %71
  call void @llvm.lifetime.start.p0(i64 32, ptr %10) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #6
  %85 = getelementptr inbounds %"struct.pnnx::local_file_header", ptr %9, i32 0, i32 8
  %86 = load i16, ptr %85, align 1, !tbaa !28
  %87 = zext i16 %86 to i64
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(32) %10, i64 noundef %87)
          to label %88 unwind label %141

88:                                               ; preds = %84
  %89 = call noundef ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4dataEv(ptr noundef nonnull align 8 dereferenceable(32) %10) #6
  %90 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %10) #6
  %91 = getelementptr inbounds %"class.pnnx::StoreZipReader", ptr %24, i32 0, i32 0
  %92 = load ptr, ptr %91, align 8, !tbaa !9
  %93 = invoke i64 @fread(ptr noundef %89, i64 noundef %90, i64 noundef 1, ptr noundef %92)
          to label %94 unwind label %141

94:                                               ; preds = %88
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  %95 = getelementptr inbounds %"struct.pnnx::local_file_header", ptr %9, i32 0, i32 6
  %96 = load i32, ptr %95, align 1, !tbaa !26
  %97 = zext i32 %96 to i64
  store i64 %97, ptr %13, align 8, !tbaa !29
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  %98 = getelementptr inbounds %"struct.pnnx::local_file_header", ptr %9, i32 0, i32 7
  %99 = load i32, ptr %98, align 1, !tbaa !27
  %100 = zext i32 %99 to i64
  store i64 %100, ptr %14, align 8, !tbaa !29
  %101 = load i64, ptr %13, align 8, !tbaa !29
  %102 = icmp eq i64 %101, 4294967295
  br i1 %102, label %103, label %179

103:                                              ; preds = %94
  %104 = load i64, ptr %14, align 8, !tbaa !29
  %105 = icmp eq i64 %104, 4294967295
  br i1 %105, label %106, label %179

106:                                              ; preds = %103
  call void @llvm.lifetime.start.p0(i64 2, ptr %15) #6
  store i16 0, ptr %15, align 2, !tbaa !30
  br label %107

107:                                              ; preds = %175, %106
  %108 = load i16, ptr %15, align 2, !tbaa !30
  %109 = zext i16 %108 to i32
  %110 = getelementptr inbounds %"struct.pnnx::local_file_header", ptr %9, i32 0, i32 9
  %111 = load i16, ptr %110, align 1, !tbaa !31
  %112 = zext i16 %111 to i32
  %113 = icmp slt i32 %109, %112
  br i1 %113, label %114, label %178

114:                                              ; preds = %107
  call void @llvm.lifetime.start.p0(i64 2, ptr %16) #6
  call void @llvm.lifetime.start.p0(i64 2, ptr %17) #6
  %115 = getelementptr inbounds %"class.pnnx::StoreZipReader", ptr %24, i32 0, i32 0
  %116 = load ptr, ptr %115, align 8, !tbaa !9
  %117 = invoke i64 @fread(ptr noundef %16, i64 noundef 2, i64 noundef 1, ptr noundef %116)
          to label %118 unwind label %145

118:                                              ; preds = %114
  %119 = getelementptr inbounds %"class.pnnx::StoreZipReader", ptr %24, i32 0, i32 0
  %120 = load ptr, ptr %119, align 8, !tbaa !9
  %121 = invoke i64 @fread(ptr noundef %17, i64 noundef 2, i64 noundef 1, ptr noundef %120)
          to label %122 unwind label %145

122:                                              ; preds = %118
  %123 = load i16, ptr %16, align 2, !tbaa !30
  %124 = zext i16 %123 to i32
  %125 = icmp ne i32 %124, 1
  br i1 %125, label %126, label %149

126:                                              ; preds = %122
  %127 = getelementptr inbounds %"class.pnnx::StoreZipReader", ptr %24, i32 0, i32 0
  %128 = load ptr, ptr %127, align 8, !tbaa !9
  %129 = load i16, ptr %17, align 2, !tbaa !30
  %130 = zext i16 %129 to i32
  %131 = sub nsw i32 %130, 4
  %132 = sext i32 %131 to i64
  %133 = invoke i32 @fseek(ptr noundef %128, i64 noundef %132, i32 noundef 1)
          to label %134 unwind label %145

134:                                              ; preds = %126
  %135 = load i16, ptr %17, align 2, !tbaa !30
  %136 = zext i16 %135 to i32
  %137 = load i16, ptr %15, align 2, !tbaa !30
  %138 = zext i16 %137 to i32
  %139 = add nsw i32 %138, %136
  %140 = trunc i32 %139 to i16
  store i16 %140, ptr %15, align 2, !tbaa !30
  store i32 4, ptr %8, align 4
  br label %175, !llvm.loop !32

141:                                              ; preds = %88, %84
  %142 = landingpad { ptr, i32 }
          cleanup
  %143 = extractvalue { ptr, i32 } %142, 0
  store ptr %143, ptr %11, align 8
  %144 = extractvalue { ptr, i32 } %142, 1
  store i32 %144, ptr %12, align 4
  br label %215

145:                                              ; preds = %126, %118, %114
  %146 = landingpad { ptr, i32 }
          cleanup
  %147 = extractvalue { ptr, i32 } %146, 0
  store ptr %147, ptr %11, align 8
  %148 = extractvalue { ptr, i32 } %146, 1
  store i32 %148, ptr %12, align 4
  br label %177

149:                                              ; preds = %122
  call void @llvm.lifetime.start.p0(i64 28, ptr %18) #6
  %150 = getelementptr inbounds %"class.pnnx::StoreZipReader", ptr %24, i32 0, i32 0
  %151 = load ptr, ptr %150, align 8, !tbaa !9
  %152 = invoke i64 @fread(ptr noundef %18, i64 noundef 28, i64 noundef 1, ptr noundef %151)
          to label %153 unwind label %171

153:                                              ; preds = %149
  %154 = getelementptr inbounds %"struct.pnnx::zip64_extended_extra_field", ptr %18, i32 0, i32 1
  %155 = load i64, ptr %154, align 1, !tbaa !34
  store i64 %155, ptr %13, align 8, !tbaa !29
  %156 = getelementptr inbounds %"struct.pnnx::zip64_extended_extra_field", ptr %18, i32 0, i32 0
  %157 = load i64, ptr %156, align 1, !tbaa !36
  store i64 %157, ptr %14, align 8, !tbaa !29
  %158 = getelementptr inbounds %"class.pnnx::StoreZipReader", ptr %24, i32 0, i32 0
  %159 = load ptr, ptr %158, align 8, !tbaa !9
  %160 = getelementptr inbounds %"struct.pnnx::local_file_header", ptr %9, i32 0, i32 9
  %161 = load i16, ptr %160, align 1, !tbaa !31
  %162 = zext i16 %161 to i32
  %163 = load i16, ptr %15, align 2, !tbaa !30
  %164 = zext i16 %163 to i32
  %165 = sub nsw i32 %162, %164
  %166 = sub nsw i32 %165, 4
  %167 = sext i32 %166 to i64
  %168 = sub i64 %167, 28
  %169 = invoke i32 @fseek(ptr noundef %159, i64 noundef %168, i32 noundef 1)
          to label %170 unwind label %171

170:                                              ; preds = %153
  store i32 5, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 28, ptr %18) #6
  br label %175

171:                                              ; preds = %153, %149
  %172 = landingpad { ptr, i32 }
          cleanup
  %173 = extractvalue { ptr, i32 } %172, 0
  store ptr %173, ptr %11, align 8
  %174 = extractvalue { ptr, i32 } %172, 1
  store i32 %174, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 28, ptr %18) #6
  br label %177

175:                                              ; preds = %170, %134
  call void @llvm.lifetime.end.p0(i64 2, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 2, ptr %16) #6
  %176 = load i32, ptr %8, align 4
  switch i32 %176, label %294 [
    i32 4, label %107
    i32 5, label %178
  ]

177:                                              ; preds = %171, %145
  call void @llvm.lifetime.end.p0(i64 2, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 2, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 2, ptr %15) #6
  br label %214

178:                                              ; preds = %175, %107
  call void @llvm.lifetime.end.p0(i64 2, ptr %15) #6
  br label %191

179:                                              ; preds = %103, %94
  %180 = getelementptr inbounds %"class.pnnx::StoreZipReader", ptr %24, i32 0, i32 0
  %181 = load ptr, ptr %180, align 8, !tbaa !9
  %182 = getelementptr inbounds %"struct.pnnx::local_file_header", ptr %9, i32 0, i32 9
  %183 = load i16, ptr %182, align 1, !tbaa !31
  %184 = zext i16 %183 to i64
  %185 = invoke i32 @fseek(ptr noundef %181, i64 noundef %184, i32 noundef 1)
          to label %186 unwind label %187

186:                                              ; preds = %179
  br label %191

187:                                              ; preds = %179
  %188 = landingpad { ptr, i32 }
          cleanup
  %189 = extractvalue { ptr, i32 } %188, 0
  store ptr %189, ptr %11, align 8
  %190 = extractvalue { ptr, i32 } %188, 1
  store i32 %190, ptr %12, align 4
  br label %214

191:                                              ; preds = %186, %178
  call void @llvm.lifetime.start.p0(i64 16, ptr %19) #6
  %192 = getelementptr inbounds %"class.pnnx::StoreZipReader", ptr %24, i32 0, i32 0
  %193 = load ptr, ptr %192, align 8, !tbaa !9
  %194 = invoke i64 @ftell(ptr noundef %193)
          to label %195 unwind label %210

195:                                              ; preds = %191
  %196 = getelementptr inbounds %"struct.pnnx::StoreZipReader::StoreZipMeta", ptr %19, i32 0, i32 0
  store i64 %194, ptr %196, align 8, !tbaa !37
  %197 = load i64, ptr %13, align 8, !tbaa !29
  %198 = getelementptr inbounds %"struct.pnnx::StoreZipReader::StoreZipMeta", ptr %19, i32 0, i32 1
  store i64 %197, ptr %198, align 8, !tbaa !39
  %199 = getelementptr inbounds %"class.pnnx::StoreZipReader", ptr %24, i32 0, i32 1
  %200 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN4pnnx14StoreZipReader12StoreZipMetaESt4lessIS5_ESaISt4pairIKS5_S8_EEEixERSC_(ptr noundef nonnull align 8 dereferenceable(48) %199, ptr noundef nonnull align 8 dereferenceable(32) %10)
          to label %201 unwind label %210

201:                                              ; preds = %195
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %200, ptr align 8 %19, i64 16, i1 false), !tbaa.struct !40
  %202 = getelementptr inbounds %"class.pnnx::StoreZipReader", ptr %24, i32 0, i32 0
  %203 = load ptr, ptr %202, align 8, !tbaa !9
  %204 = load i64, ptr %13, align 8, !tbaa !29
  %205 = invoke i32 @fseek(ptr noundef %203, i64 noundef %204, i32 noundef 1)
          to label %206 unwind label %210

206:                                              ; preds = %201
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %10) #6
  store i32 0, ptr %8, align 4
  br label %207

207:                                              ; preds = %206, %77, %63
  call void @llvm.lifetime.end.p0(i64 26, ptr %9) #6
  %208 = load i32, ptr %8, align 4
  switch i32 %208, label %283 [
    i32 0, label %209
  ]

209:                                              ; preds = %207
  br label %282

210:                                              ; preds = %201, %195, %191
  %211 = landingpad { ptr, i32 }
          cleanup
  %212 = extractvalue { ptr, i32 } %211, 0
  store ptr %212, ptr %11, align 8
  %213 = extractvalue { ptr, i32 } %211, 1
  store i32 %213, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #6
  br label %214

214:                                              ; preds = %210, %187, %177
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  br label %215

215:                                              ; preds = %214, %141
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 26, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  br label %289

216:                                              ; preds = %51
  %217 = load i32, ptr %6, align 4, !tbaa !20
  %218 = icmp eq i32 %217, 33639248
  br i1 %218, label %219, label %241

219:                                              ; preds = %216
  call void @llvm.lifetime.start.p0(i64 42, ptr %20) #6
  %220 = getelementptr inbounds %"class.pnnx::StoreZipReader", ptr %24, i32 0, i32 0
  %221 = load ptr, ptr %220, align 8, !tbaa !9
  %222 = call i64 @fread(ptr noundef %20, i64 noundef 42, i64 noundef 1, ptr noundef %221)
  %223 = getelementptr inbounds %"class.pnnx::StoreZipReader", ptr %24, i32 0, i32 0
  %224 = load ptr, ptr %223, align 8, !tbaa !9
  %225 = getelementptr inbounds %"struct.pnnx::central_directory_file_header", ptr %20, i32 0, i32 9
  %226 = load i16, ptr %225, align 1, !tbaa !41
  %227 = zext i16 %226 to i64
  %228 = call i32 @fseek(ptr noundef %224, i64 noundef %227, i32 noundef 1)
  %229 = getelementptr inbounds %"class.pnnx::StoreZipReader", ptr %24, i32 0, i32 0
  %230 = load ptr, ptr %229, align 8, !tbaa !9
  %231 = getelementptr inbounds %"struct.pnnx::central_directory_file_header", ptr %20, i32 0, i32 10
  %232 = load i16, ptr %231, align 1, !tbaa !43
  %233 = zext i16 %232 to i64
  %234 = call i32 @fseek(ptr noundef %230, i64 noundef %233, i32 noundef 1)
  %235 = getelementptr inbounds %"class.pnnx::StoreZipReader", ptr %24, i32 0, i32 0
  %236 = load ptr, ptr %235, align 8, !tbaa !9
  %237 = getelementptr inbounds %"struct.pnnx::central_directory_file_header", ptr %20, i32 0, i32 11
  %238 = load i16, ptr %237, align 1, !tbaa !44
  %239 = zext i16 %238 to i64
  %240 = call i32 @fseek(ptr noundef %236, i64 noundef %239, i32 noundef 1)
  call void @llvm.lifetime.end.p0(i64 42, ptr %20) #6
  br label %281

241:                                              ; preds = %216
  %242 = load i32, ptr %6, align 4, !tbaa !20
  %243 = icmp eq i32 %242, 101010256
  br i1 %243, label %244, label %254

244:                                              ; preds = %241
  call void @llvm.lifetime.start.p0(i64 18, ptr %21) #6
  %245 = getelementptr inbounds %"class.pnnx::StoreZipReader", ptr %24, i32 0, i32 0
  %246 = load ptr, ptr %245, align 8, !tbaa !9
  %247 = call i64 @fread(ptr noundef %21, i64 noundef 18, i64 noundef 1, ptr noundef %246)
  %248 = getelementptr inbounds %"class.pnnx::StoreZipReader", ptr %24, i32 0, i32 0
  %249 = load ptr, ptr %248, align 8, !tbaa !9
  %250 = getelementptr inbounds %"struct.pnnx::end_of_central_directory_record", ptr %21, i32 0, i32 6
  %251 = load i16, ptr %250, align 1, !tbaa !45
  %252 = zext i16 %251 to i64
  %253 = call i32 @fseek(ptr noundef %249, i64 noundef %252, i32 noundef 1)
  call void @llvm.lifetime.end.p0(i64 18, ptr %21) #6
  br label %280

254:                                              ; preds = %241
  %255 = load i32, ptr %6, align 4, !tbaa !20
  %256 = icmp eq i32 %255, 101075792
  br i1 %256, label %257, label %267

257:                                              ; preds = %254
  call void @llvm.lifetime.start.p0(i64 52, ptr %22) #6
  %258 = getelementptr inbounds %"class.pnnx::StoreZipReader", ptr %24, i32 0, i32 0
  %259 = load ptr, ptr %258, align 8, !tbaa !9
  %260 = call i64 @fread(ptr noundef %22, i64 noundef 52, i64 noundef 1, ptr noundef %259)
  %261 = getelementptr inbounds %"class.pnnx::StoreZipReader", ptr %24, i32 0, i32 0
  %262 = load ptr, ptr %261, align 8, !tbaa !9
  %263 = getelementptr inbounds %"struct.pnnx::zip64_end_of_central_directory_record", ptr %22, i32 0, i32 0
  %264 = load i64, ptr %263, align 1, !tbaa !47
  %265 = sub i64 %264, 44
  %266 = call i32 @fseek(ptr noundef %262, i64 noundef %265, i32 noundef 1)
  call void @llvm.lifetime.end.p0(i64 52, ptr %22) #6
  br label %279

267:                                              ; preds = %254
  %268 = load i32, ptr %6, align 4, !tbaa !20
  %269 = icmp eq i32 %268, 117853008
  br i1 %269, label %270, label %274

270:                                              ; preds = %267
  call void @llvm.lifetime.start.p0(i64 16, ptr %23) #6
  %271 = getelementptr inbounds %"class.pnnx::StoreZipReader", ptr %24, i32 0, i32 0
  %272 = load ptr, ptr %271, align 8, !tbaa !9
  %273 = call i64 @fread(ptr noundef %23, i64 noundef 16, i64 noundef 1, ptr noundef %272)
  call void @llvm.lifetime.end.p0(i64 16, ptr %23) #6
  br label %278

274:                                              ; preds = %267
  %275 = load ptr, ptr @stderr, align 8, !tbaa !5
  %276 = load i32, ptr %6, align 4, !tbaa !20
  %277 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %275, ptr noundef @.str.4, i32 noundef %276) #6
  store i32 -1, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %283

278:                                              ; preds = %270
  br label %279

279:                                              ; preds = %278, %257
  br label %280

280:                                              ; preds = %279, %244
  br label %281

281:                                              ; preds = %280, %219
  br label %282

282:                                              ; preds = %281, %209
  store i32 0, ptr %8, align 4
  br label %283

283:                                              ; preds = %282, %274, %207, %50
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  %284 = load i32, ptr %8, align 4
  switch i32 %284, label %294 [
    i32 0, label %285
    i32 3, label %286
    i32 1, label %287
  ]

285:                                              ; preds = %283
  br label %37, !llvm.loop !49

286:                                              ; preds = %283, %37
  store i32 0, ptr %3, align 4
  br label %287

287:                                              ; preds = %286, %283, %33
  %288 = load i32, ptr %3, align 4
  ret i32 %288

289:                                              ; preds = %215
  %290 = load ptr, ptr %11, align 8
  %291 = load i32, ptr %12, align 4
  %292 = insertvalue { ptr, i32 } poison, ptr %290, 0
  %293 = insertvalue { ptr, i32 } %292, i32 %291, 1
  resume { ptr, i32 } %293

294:                                              ; preds = %283, %175
  unreachable
}

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

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

; Function Attrs: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #3

; Function Attrs: nounwind
declare i32 @feof(ptr noundef) #3

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

declare i64 @fread(ptr noundef, i64 noundef, i64 noundef, ptr noundef) #1

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

; Function Attrs: mustprogress uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(32), i64 noundef) #0 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32)) #2 align 2

declare i32 @fseek(ptr noundef, i64 noundef, i32 noundef) #1

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

declare i64 @ftell(ptr noundef) #1

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN4pnnx14StoreZipReader12StoreZipMetaESt4lessIS5_ESaISt4pairIKS5_S8_EEEixERSC_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(32)) #0 align 2

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

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

attributes #0 = { 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 #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress 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 #3 = { 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 #4 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #6 = { 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, !6, i64 0}
!10 = !{!"_ZTSN4pnnx14StoreZipReaderE", !6, i64 0, !11, i64 8}
!11 = !{!"_ZTSSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN4pnnx14StoreZipReader12StoreZipMetaESt4lessIS5_ESaISt4pairIKS5_S8_EEE", !12, i64 0}
!12 = !{!"_ZTSSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_N4pnnx14StoreZipReader12StoreZipMetaEESt10_Select1stISB_ESt4lessIS5_ESaISB_EE", !13, i64 0}
!13 = !{!"_ZTSNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_N4pnnx14StoreZipReader12StoreZipMetaEESt10_Select1stISB_ESt4lessIS5_ESaISB_EE13_Rb_tree_implISF_Lb1EEE", !14, i64 0, !16, i64 8}
!14 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEE", !15, i64 0}
!15 = !{!"_ZTSSt4lessINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE"}
!16 = !{!"_ZTSSt15_Rb_tree_header", !17, i64 0, !19, i64 32}
!17 = !{!"_ZTSSt18_Rb_tree_node_base", !18, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!18 = !{!"_ZTSSt14_Rb_tree_color", !7, i64 0}
!19 = !{!"long", !7, i64 0}
!20 = !{!21, !21, i64 0}
!21 = !{!"int", !7, i64 0}
!22 = !{!23, !24, i64 2}
!23 = !{!"_ZTSN4pnnx17local_file_headerE", !24, i64 0, !24, i64 2, !24, i64 4, !24, i64 6, !24, i64 8, !21, i64 10, !21, i64 14, !21, i64 18, !24, i64 22, !24, i64 24}
!24 = !{!"short", !7, i64 0}
!25 = !{!23, !24, i64 4}
!26 = !{!23, !21, i64 14}
!27 = !{!23, !21, i64 18}
!28 = !{!23, !24, i64 22}
!29 = !{!19, !19, i64 0}
!30 = !{!24, !24, i64 0}
!31 = !{!23, !24, i64 24}
!32 = distinct !{!32, !33}
!33 = !{!"llvm.loop.mustprogress"}
!34 = !{!35, !19, i64 8}
!35 = !{!"_ZTSN4pnnx26zip64_extended_extra_fieldE", !19, i64 0, !19, i64 8, !19, i64 16, !21, i64 24}
!36 = !{!35, !19, i64 0}
!37 = !{!38, !19, i64 0}
!38 = !{!"_ZTSN4pnnx14StoreZipReader12StoreZipMetaE", !19, i64 0, !19, i64 8}
!39 = !{!38, !19, i64 8}
!40 = !{i64 0, i64 8, !29, i64 8, i64 8, !29}
!41 = !{!42, !24, i64 24}
!42 = !{!"_ZTSN4pnnx29central_directory_file_headerE", !24, i64 0, !24, i64 2, !24, i64 4, !24, i64 6, !24, i64 8, !24, i64 10, !21, i64 12, !21, i64 16, !21, i64 20, !24, i64 24, !24, i64 26, !24, i64 28, !24, i64 30, !24, i64 32, !21, i64 34, !21, i64 38}
!43 = !{!42, !24, i64 26}
!44 = !{!42, !24, i64 28}
!45 = !{!46, !24, i64 16}
!46 = !{!"_ZTSN4pnnx31end_of_central_directory_recordE", !24, i64 0, !24, i64 2, !24, i64 4, !24, i64 6, !21, i64 8, !21, i64 12, !24, i64 16}
!47 = !{!48, !19, i64 0}
!48 = !{!"_ZTSN4pnnx37zip64_end_of_central_directory_recordE", !19, i64 0, !24, i64 8, !24, i64 10, !21, i64 12, !21, i64 16, !19, i64 20, !19, i64 28, !19, i64 36, !19, i64 44}
!49 = distinct !{!49, !33}


; 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.pnnx::local_file_header" = type <{ i16, i16, i16, i16, i16, i32, i32, i32, i16, i16 }>
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"struct.pnnx::zip64_extended_extra_field" = type <{ i64, i64, i64, i32 }>
%"struct.pnnx::central_directory_file_header" = type <{ i16, i16, i16, i16, i16, i16, i32, i32, i32, i16, i16, i16, i16, i16, i32, i32 }>
%"struct.pnnx::end_of_central_directory_record" = type <{ i16, i16, i16, i16, i32, i32, i16 }>
%"struct.pnnx::zip64_end_of_central_directory_record" = type <{ i64, i16, i16, i32, i32, i64, i64, i64, i64 }>
%"struct.pnnx::zip64_end_of_central_directory_locator" = type <{ i32, i64, i32 }>

@.str = external hidden unnamed_addr constant [3 x i8], align 1
@stderr = external local_unnamed_addr global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [62 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [26 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN4pnnx14StoreZipReader5closeEv(ptr noundef nonnull align 8 dereferenceable(56)) local_unnamed_addr #0 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN4pnnx14StoreZipReader4openERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(56) %0, ptr noundef nonnull align 8 dereferenceable(32) %1) local_unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca i32, align 4
  %4 = alloca %"struct.pnnx::local_file_header", align 1
  %5 = alloca %"class.std::__cxx11::basic_string", align 8
  %6 = alloca i16, align 2
  %7 = alloca i16, align 2
  %8 = alloca %"struct.pnnx::zip64_extended_extra_field", align 1
  %9 = alloca %"struct.pnnx::central_directory_file_header", align 1
  %10 = alloca %"struct.pnnx::end_of_central_directory_record", align 1
  %11 = alloca %"struct.pnnx::zip64_end_of_central_directory_record", align 8
  %12 = alloca %"struct.pnnx::zip64_end_of_central_directory_locator", align 1
  %13 = tail call noundef i32 @_ZN4pnnx14StoreZipReader5closeEv(ptr noundef nonnull align 8 dereferenceable(56) %0)
  %14 = tail call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %1) #4
  %15 = tail call noalias ptr @fopen(ptr noundef %14, ptr noundef nonnull @.str)
  store ptr %15, ptr %0, align 8, !tbaa !5
  %.not = icmp eq ptr %15, null
  br i1 %.not, label %29, label %.preheader46

.preheader46:                                     ; preds = %2
  %16 = tail call i32 @feof(ptr noundef nonnull %15) #4
  %.not3056 = icmp eq i32 %16, 0
  br i1 %.not3056, label %.lr.ph57, label %.loopexit47

.lr.ph57:                                         ; preds = %.preheader46
  %17 = getelementptr inbounds i8, ptr %10, i64 16
  %18 = getelementptr inbounds i8, ptr %9, i64 24
  %19 = getelementptr inbounds i8, ptr %9, i64 26
  %20 = getelementptr inbounds i8, ptr %9, i64 28
  %21 = getelementptr inbounds i8, ptr %4, i64 2
  %22 = getelementptr inbounds i8, ptr %4, i64 4
  %23 = getelementptr inbounds i8, ptr %4, i64 14
  %24 = getelementptr inbounds i8, ptr %4, i64 18
  %25 = getelementptr inbounds i8, ptr %4, i64 22
  %26 = getelementptr inbounds i8, ptr %4, i64 24
  %27 = getelementptr inbounds i8, ptr %8, i64 8
  %28 = getelementptr inbounds i8, ptr %0, i64 8
  br label %32

29:                                               ; preds = %2
  %30 = load ptr, ptr @stderr, align 8, !tbaa !19
  %31 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %30, ptr noundef nonnull @.str.1) #5
  br label %.loopexit47

32:                                               ; preds = %.lr.ph57, %132
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #4
  %33 = load ptr, ptr %0, align 8, !tbaa !5
  %34 = call i64 @fread(ptr noundef nonnull %3, i64 noundef 4, i64 noundef 1, ptr noundef %33)
  %35 = and i64 %34, 4294967295
  %.not31 = icmp eq i64 %35, 1
  br i1 %.not31, label %36, label %.thread44

.thread44:                                        ; preds = %32
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #4
  br label %.loopexit47

36:                                               ; preds = %32
  %37 = load i32, ptr %3, align 4, !tbaa !20
  switch i32 %37, label %129 [
    i32 67324752, label %38
    i32 33639248, label %97
    i32 101010256, label %112
    i32 101075792, label %119
    i32 117853008, label %126
  ]

38:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 26, ptr nonnull %4) #4
  %39 = load ptr, ptr %0, align 8, !tbaa !5
  %40 = call i64 @fread(ptr noundef nonnull %4, i64 noundef 26, i64 noundef 1, ptr noundef %39)
  %41 = load i16, ptr %21, align 1, !tbaa !22
  %42 = and i16 %41, 8
  %.not32 = icmp eq i16 %42, 0
  br i1 %.not32, label %46, label %43

43:                                               ; preds = %38
  %44 = load ptr, ptr @stderr, align 8, !tbaa !19
  %45 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %44, ptr noundef nonnull @.str.2) #5
  br label %.critedge

46:                                               ; preds = %38
  %47 = load i16, ptr %22, align 1, !tbaa !25
  %.not33 = icmp eq i16 %47, 0
  %.pre = load i32, ptr %23, align 1, !tbaa !26
  %.pre65 = load i32, ptr %24, align 1, !tbaa !27
  %.not34 = icmp eq i32 %.pre, %.pre65
  %or.cond76 = select i1 %.not33, i1 %.not34, i1 false
  br i1 %or.cond76, label %51, label %48

48:                                               ; preds = %46
  %49 = load ptr, ptr @stderr, align 8, !tbaa !19
  %50 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %49, ptr noundef nonnull @.str.3, i32 noundef %.pre, i32 noundef %.pre65) #5
  br label %.critedge

51:                                               ; preds = %46
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #4
  %52 = load i16, ptr %25, align 1, !tbaa !28
  %53 = zext i16 %52 to i64
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(32) %5, i64 noundef %53)
          to label %54 unwind label %65

54:                                               ; preds = %51
  %55 = call noundef ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4dataEv(ptr noundef nonnull align 8 dereferenceable(32) %5) #4
  %56 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %5) #4
  %57 = load ptr, ptr %0, align 8, !tbaa !5
  %58 = call i64 @fread(ptr noundef %55, i64 noundef %56, i64 noundef 1, ptr noundef %57)
  %or.cond = icmp eq i32 %.pre, -1
  br i1 %or.cond, label %.preheader, label %82

.preheader:                                       ; preds = %54
  %59 = load i16, ptr %26, align 1, !tbaa !29
  %.not58 = icmp eq i16 %59, 0
  br i1 %.not58, label %.loopexit, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader, %74
  %.01955 = phi i16 [ %80, %74 ], [ 0, %.preheader ]
  call void @llvm.lifetime.start.p0(i64 2, ptr nonnull %6) #4
  call void @llvm.lifetime.start.p0(i64 2, ptr nonnull %7) #4
  %60 = load ptr, ptr %0, align 8, !tbaa !5
  %61 = call i64 @fread(ptr noundef nonnull %6, i64 noundef 2, i64 noundef 1, ptr noundef %60)
  %62 = load ptr, ptr %0, align 8, !tbaa !5
  %63 = call i64 @fread(ptr noundef nonnull %7, i64 noundef 2, i64 noundef 1, ptr noundef %62)
  %64 = load i16, ptr %6, align 2, !tbaa !30
  %.not35 = icmp eq i16 %64, 1
  br i1 %.not35, label %.thread, label %74

65:                                               ; preds = %51
  %66 = landingpad { ptr, i32 }
          cleanup
  br label %96

.thread:                                          ; preds = %.lr.ph
  %67 = zext i16 %.01955 to i64
  call void @llvm.lifetime.start.p0(i64 28, ptr nonnull %8) #4
  %68 = load ptr, ptr %0, align 8, !tbaa !5
  %69 = call i64 @fread(ptr noundef nonnull %8, i64 noundef 28, i64 noundef 1, ptr noundef %68)
  %70 = load i64, ptr %27, align 1, !tbaa !31
  %71 = load ptr, ptr %0, align 8, !tbaa !5
  %72 = zext i16 %59 to i64
  %reass.sub = sub nsw i64 %72, %67
  %narrow = add nsw i64 %reass.sub, -32
  %73 = call i32 @fseek(ptr noundef %71, i64 noundef %narrow, i32 noundef 1)
  call void @llvm.lifetime.end.p0(i64 28, ptr nonnull %8) #4
  call void @llvm.lifetime.end.p0(i64 2, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 2, ptr nonnull %6) #4
  br label %.loopexit

74:                                               ; preds = %.lr.ph
  %75 = load ptr, ptr %0, align 8, !tbaa !5
  %76 = load i16, ptr %7, align 2, !tbaa !30
  %77 = zext i16 %76 to i64
  %78 = add nsw i64 %77, -4
  %79 = call i32 @fseek(ptr noundef %75, i64 noundef %78, i32 noundef 1)
  %80 = add i16 %76, %.01955
  call void @llvm.lifetime.end.p0(i64 2, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 2, ptr nonnull %6) #4
  %81 = icmp ult i16 %80, %59
  br i1 %81, label %.lr.ph, label %.loopexit

82:                                               ; preds = %54
  %83 = zext i32 %.pre to i64
  %84 = load ptr, ptr %0, align 8, !tbaa !5
  %85 = load i16, ptr %26, align 1, !tbaa !29
  %86 = zext i16 %85 to i64
  %87 = call i32 @fseek(ptr noundef %84, i64 noundef %86, i32 noundef 1)
  br label %.loopexit

.loopexit:                                        ; preds = %74, %.preheader, %.thread, %82
  %.324 = phi i64 [ %83, %82 ], [ %70, %.thread ], [ 4294967295, %.preheader ], [ 4294967295, %74 ]
  %88 = load ptr, ptr %0, align 8, !tbaa !5
  %89 = call i64 @ftell(ptr noundef %88)
  %90 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN4pnnx14StoreZipReader12StoreZipMetaESt4lessIS5_ESaISt4pairIKS5_S8_EEEixERSC_(ptr noundef nonnull align 8 dereferenceable(48) %28, ptr noundef nonnull align 8 dereferenceable(32) %5)
          to label %91 unwind label %94

91:                                               ; preds = %.loopexit
  store i64 %89, ptr %90, align 8, !tbaa !33
  %.sroa.5.0..sroa_idx = getelementptr inbounds i8, ptr %90, i64 8
  store i64 %.324, ptr %.sroa.5.0..sroa_idx, align 8, !tbaa !33
  %92 = load ptr, ptr %0, align 8, !tbaa !5
  %93 = call i32 @fseek(ptr noundef %92, i64 noundef %.324, i32 noundef 1)
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #4
  call void @llvm.lifetime.end.p0(i64 26, ptr nonnull %4) #4
  br label %132

94:                                               ; preds = %.loopexit
  %95 = landingpad { ptr, i32 }
          cleanup
  br label %96

96:                                               ; preds = %94, %65
  %.pn = phi { ptr, i32 } [ %95, %94 ], [ %66, %65 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #4
  call void @llvm.lifetime.end.p0(i64 26, ptr nonnull %4) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #4
  resume { ptr, i32 } %.pn

97:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 42, ptr nonnull %9) #4
  %98 = load ptr, ptr %0, align 8, !tbaa !5
  %99 = call i64 @fread(ptr noundef nonnull %9, i64 noundef 42, i64 noundef 1, ptr noundef %98)
  %100 = load ptr, ptr %0, align 8, !tbaa !5
  %101 = load i16, ptr %18, align 1, !tbaa !34
  %102 = zext i16 %101 to i64
  %103 = call i32 @fseek(ptr noundef %100, i64 noundef %102, i32 noundef 1)
  %104 = load ptr, ptr %0, align 8, !tbaa !5
  %105 = load i16, ptr %19, align 1, !tbaa !36
  %106 = zext i16 %105 to i64
  %107 = call i32 @fseek(ptr noundef %104, i64 noundef %106, i32 noundef 1)
  %108 = load ptr, ptr %0, align 8, !tbaa !5
  %109 = load i16, ptr %20, align 1, !tbaa !37
  %110 = zext i16 %109 to i64
  %111 = call i32 @fseek(ptr noundef %108, i64 noundef %110, i32 noundef 1)
  call void @llvm.lifetime.end.p0(i64 42, ptr nonnull %9) #4
  br label %132

112:                                              ; preds = %36
  call void @llvm.lifetime.start.p0(i64 18, ptr nonnull %10) #4
  %113 = load ptr, ptr %0, align 8, !tbaa !5
  %114 = call i64 @fread(ptr noundef nonnull %10, i64 noundef 18, i64 noundef 1, ptr noundef %113)
  %115 = load ptr, ptr %0, align 8, !tbaa !5
  %116 = load i16, ptr %17, align 1, !tbaa !38
  %117 = zext i16 %116 to i64
  %118 = call i32 @fseek(ptr noundef %115, i64 noundef %117, i32 noundef 1)
  call void @llvm.lifetime.end.p0(i64 18, ptr nonnull %10) #4
  br label %132

119:                                              ; preds = %36
  call void @llvm.lifetime.start.p0(i64 52, ptr nonnull %11) #4
  %120 = load ptr, ptr %0, align 8, !tbaa !5
  %121 = call i64 @fread(ptr noundef nonnull %11, i64 noundef 52, i64 noundef 1, ptr noundef %120)
  %122 = load ptr, ptr %0, align 8, !tbaa !5
  %123 = load i64, ptr %11, align 8, !tbaa !40
  %124 = add i64 %123, -44
  %125 = call i32 @fseek(ptr noundef %122, i64 noundef %124, i32 noundef 1)
  call void @llvm.lifetime.end.p0(i64 52, ptr nonnull %11) #4
  br label %132

126:                                              ; preds = %36
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %12) #4
  %127 = load ptr, ptr %0, align 8, !tbaa !5
  %128 = call i64 @fread(ptr noundef nonnull %12, i64 noundef 16, i64 noundef 1, ptr noundef %127)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %12) #4
  br label %132

129:                                              ; preds = %36
  %130 = load ptr, ptr @stderr, align 8, !tbaa !19
  %131 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %130, ptr noundef nonnull @.str.4, i32 noundef %37) #5
  br label %.thread42

.critedge:                                        ; preds = %48, %43
  call void @llvm.lifetime.end.p0(i64 26, ptr nonnull %4) #4
  br label %.thread42

.thread42:                                        ; preds = %129, %.critedge
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #4
  br label %.loopexit47

132:                                              ; preds = %112, %126, %119, %97, %91
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #4
  %133 = load ptr, ptr %0, align 8, !tbaa !5
  %134 = call i32 @feof(ptr noundef %133) #4
  %.not30 = icmp eq i32 %134, 0
  br i1 %.not30, label %32, label %.loopexit47

.loopexit47:                                      ; preds = %132, %.preheader46, %.thread44, %.thread42, %29
  %.4 = phi i32 [ -1, %29 ], [ -1, %.thread42 ], [ 0, %.thread44 ], [ 0, %.preheader46 ], [ 0, %132 ]
  ret i32 %.4
}

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(32), i64 noundef) local_unnamed_addr #0 align 2

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

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

; Function Attrs: nofree nounwind
declare noundef i32 @fseek(ptr nocapture noundef, i64 noundef, i32 noundef) local_unnamed_addr #1

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

; Function Attrs: nofree nounwind
declare noundef i64 @ftell(ptr nocapture noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN4pnnx14StoreZipReader12StoreZipMetaESt4lessIS5_ESaISt4pairIKS5_S8_EEEixERSC_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #0 align 2

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

attributes #0 = { 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 #1 = { 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 #2 = { 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 #3 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { nounwind }
attributes #5 = { cold 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, !7, i64 0}
!6 = !{!"_ZTSN4pnnx14StoreZipReaderE", !7, i64 0, !10, i64 8}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN4pnnx14StoreZipReader12StoreZipMetaESt4lessIS5_ESaISt4pairIKS5_S8_EEE", !11, i64 0}
!11 = !{!"_ZTSSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_N4pnnx14StoreZipReader12StoreZipMetaEESt10_Select1stISB_ESt4lessIS5_ESaISB_EE", !12, i64 0}
!12 = !{!"_ZTSNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_N4pnnx14StoreZipReader12StoreZipMetaEESt10_Select1stISB_ESt4lessIS5_ESaISB_EE13_Rb_tree_implISF_Lb1EEE", !13, i64 0, !15, i64 8}
!13 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEE", !14, i64 0}
!14 = !{!"_ZTSSt4lessINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE"}
!15 = !{!"_ZTSSt15_Rb_tree_header", !16, i64 0, !18, i64 32}
!16 = !{!"_ZTSSt18_Rb_tree_node_base", !17, i64 0, !7, i64 8, !7, i64 16, !7, i64 24}
!17 = !{!"_ZTSSt14_Rb_tree_color", !8, i64 0}
!18 = !{!"long", !8, i64 0}
!19 = !{!7, !7, i64 0}
!20 = !{!21, !21, i64 0}
!21 = !{!"int", !8, i64 0}
!22 = !{!23, !24, i64 2}
!23 = !{!"_ZTSN4pnnx17local_file_headerE", !24, i64 0, !24, i64 2, !24, i64 4, !24, i64 6, !24, i64 8, !21, i64 10, !21, i64 14, !21, i64 18, !24, i64 22, !24, i64 24}
!24 = !{!"short", !8, i64 0}
!25 = !{!23, !24, i64 4}
!26 = !{!23, !21, i64 14}
!27 = !{!23, !21, i64 18}
!28 = !{!23, !24, i64 22}
!29 = !{!23, !24, i64 24}
!30 = !{!24, !24, i64 0}
!31 = !{!32, !18, i64 8}
!32 = !{!"_ZTSN4pnnx26zip64_extended_extra_fieldE", !18, i64 0, !18, i64 8, !18, i64 16, !21, i64 24}
!33 = !{!18, !18, i64 0}
!34 = !{!35, !24, i64 24}
!35 = !{!"_ZTSN4pnnx29central_directory_file_headerE", !24, i64 0, !24, i64 2, !24, i64 4, !24, i64 6, !24, i64 8, !24, i64 10, !21, i64 12, !21, i64 16, !21, i64 20, !24, i64 24, !24, i64 26, !24, i64 28, !24, i64 30, !24, i64 32, !21, i64 34, !21, i64 38}
!36 = !{!35, !24, i64 26}
!37 = !{!35, !24, i64 28}
!38 = !{!39, !24, i64 16}
!39 = !{!"_ZTSN4pnnx31end_of_central_directory_recordE", !24, i64 0, !24, i64 2, !24, i64 4, !24, i64 6, !21, i64 8, !21, i64 12, !24, i64 16}
!40 = !{!41, !18, i64 0}
!41 = !{!"_ZTSN4pnnx37zip64_end_of_central_directory_recordE", !18, i64 0, !24, i64 8, !24, i64 10, !21, i64 12, !21, i64 16, !18, i64 20, !18, i64 28, !18, i64 36, !18, i64 44}


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