; LLVM IR from specinfo-ua/UAPKI :: library/cm-pkcs12/src/storage (file-storage)

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

%"class.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.SafeContents = type { %struct.anon.12, %struct.asn_struct_ctx_s }
%struct.anon.12 = type { ptr, i32, i32, ptr }
%struct.asn_struct_ctx_s = type { i16, i16, i32, ptr, i64 }
%struct.SafeBag = type { %struct.ASN__PRIMITIVE_TYPE_s, %struct.ANY, ptr, %struct.asn_struct_ctx_s }
%struct.ASN__PRIMITIVE_TYPE_s = type { ptr, i32 }
%struct.ANY = type { ptr, i32, %struct.asn_struct_ctx_s }
%class.FileStorage = type { ptr, %"class.std::__cxx11::basic_string", i8, i8, %"class.std::__cxx11::basic_string", i8, %"class.std::vector", ptr, %struct.FileStorageParam }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<StoreBag *, std::allocator<StoreBag *>>::_Vector_impl" }
%"struct.std::_Vector_base<StoreBag *, std::allocator<StoreBag *>>::_Vector_impl" = type { %"struct.std::_Vector_base<StoreBag *, std::allocator<StoreBag *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<StoreBag *, std::allocator<StoreBag *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.FileStorageParam = type { ptr, ptr, ptr, i64 }

@OID_PKCS12_P8_SHROUDED_KEY_BAG = external global ptr, align 8
@.str = external hidden unnamed_addr constant [35 x i8], align 1
@OID_PBE_WITH_SHA1_TDES_CBC = external global ptr, align 8
@OID_DES_EDE3_CBC = external global ptr, align 8
@OID_PKCS12_CERT_BAG = external global ptr, align 8
@OID_PKCS12_BAGTYPES = external global ptr, align 8

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

declare zeroext i1 @oid_is_equal(ptr noundef, ptr noundef) #3

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

; Function Attrs: nounwind
declare void @free(ptr noundef) #4

; Function Attrs: nounwind
declare void @_ZN8StoreBagD1Ev(ptr noundef nonnull align 8 dereferenceable(120)) unnamed_addr #4

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

declare void @ba_free(ptr noundef) #3

declare void @stacktrace_add(ptr noundef, i64 noundef, i32 noundef) #3

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

declare void @_ZN8StoreBagC1Ev(ptr noundef nonnull align 8 dereferenceable(120)) unnamed_addr #3

declare void @_ZN8StoreBag8setBagIdERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(120), ptr noundef nonnull align 8 dereferenceable(32)) #3

declare void @_ZN8StoreBag7setDataENS_8BAG_TYPEEP12ByteArray_st(ptr noundef nonnull align 8 dereferenceable(120), i32 noundef, ptr noundef) #3

declare void @stacktrace_create(ptr noundef, i64 noundef, i32 noundef, ptr noundef) #3

declare void @_ZN8StoreBag12scanStdAttrsEv(ptr noundef nonnull align 8 dereferenceable(120)) #3

declare ptr @asn_decode_ba_with_alloc(ptr noundef, ptr noundef) #3

declare void @asn_free(ptr noundef, ptr noundef) #3

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN11FileStorage16readSafeContentsEPK12ByteArray_stPKc(ptr noundef nonnull align 8 dereferenceable(152) %0, ptr noundef %1, ptr noundef %2) #1 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca %"class.std::__cxx11::basic_string", align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca ptr, align 8
  %20 = alloca i8, align 1
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  %21 = load ptr, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  store i32 0, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  store ptr null, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  store ptr null, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  store ptr null, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %12) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  store ptr null, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  store ptr null, ptr %14, align 8, !tbaa !5
  br label %22

22:                                               ; preds = %3
  %23 = invoke ptr @get_SafeContents_desc()
          to label %24 unwind label %32

24:                                               ; preds = %22
  %25 = load ptr, ptr %6, align 8, !tbaa !5
  %26 = invoke ptr @asn_decode_ba_with_alloc(ptr noundef %23, ptr noundef %25)
          to label %27 unwind label %32

27:                                               ; preds = %24
  store ptr %26, ptr %9, align 8, !tbaa !5
  %28 = icmp eq ptr null, %26
  br i1 %28, label %29, label %36

29:                                               ; preds = %27
  store i32 2, ptr %8, align 4, !tbaa !9
  %30 = load i32, ptr %8, align 4, !tbaa !9
  invoke void @stacktrace_add(ptr noundef @.str, i64 noundef 554, i32 noundef %30)
          to label %31 unwind label %32

31:                                               ; preds = %29
  br label %307

32:                                               ; preds = %320, %318, %315, %29, %24, %22
  %33 = landingpad { ptr, i32 }
          cleanup
  %34 = extractvalue { ptr, i32 } %33, 0
  store ptr %34, ptr %15, align 8
  %35 = extractvalue { ptr, i32 } %33, 1
  store i32 %35, ptr %16, align 4
  br label %326

36:                                               ; preds = %27
  br label %37

37:                                               ; preds = %36
  br label %38

38:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  store i32 0, ptr %17, align 4, !tbaa !9
  br label %39

39:                                               ; preds = %299, %38
  %40 = load i32, ptr %17, align 4, !tbaa !9
  %41 = load ptr, ptr %9, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct.SafeContents, ptr %41, i32 0, i32 0
  %43 = getelementptr inbounds %struct.anon.12, ptr %42, i32 0, i32 1
  %44 = load i32, ptr %43, align 8, !tbaa !11
  %45 = icmp slt i32 %40, %44
  br i1 %45, label %47, label %46

46:                                               ; preds = %39
  store i32 5, ptr %18, align 4
  br label %303

47:                                               ; preds = %39
  br label %48

48:                                               ; preds = %47
  %49 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 120) #8
          to label %50 unwind label %56

50:                                               ; preds = %48
  invoke void @_ZN8StoreBagC1Ev(ptr noundef nonnull align 8 dereferenceable(120) %49)
          to label %51 unwind label %60

51:                                               ; preds = %50
  store ptr %49, ptr %10, align 8, !tbaa !5
  %52 = icmp eq ptr null, %49
  br i1 %52, label %53, label %64

53:                                               ; preds = %51
  store i32 2, ptr %8, align 4, !tbaa !9
  %54 = load i32, ptr %8, align 4, !tbaa !9
  invoke void @stacktrace_add(ptr noundef @.str, i64 noundef 557, i32 noundef %54)
          to label %55 unwind label %56

55:                                               ; preds = %53
  store i32 4, ptr %18, align 4
  br label %303

56:                                               ; preds = %53, %48
  %57 = landingpad { ptr, i32 }
          cleanup
  %58 = extractvalue { ptr, i32 } %57, 0
  store ptr %58, ptr %15, align 8
  %59 = extractvalue { ptr, i32 } %57, 1
  store i32 %59, ptr %16, align 4
  br label %305

60:                                               ; preds = %50
  %61 = landingpad { ptr, i32 }
          cleanup
  %62 = extractvalue { ptr, i32 } %61, 0
  store ptr %62, ptr %15, align 8
  %63 = extractvalue { ptr, i32 } %61, 1
  store i32 %63, ptr %16, align 4
  call void @_ZdlPvm(ptr noundef %49, i64 noundef 120) #9
  br label %305

64:                                               ; preds = %51
  br label %65

65:                                               ; preds = %64
  br label %66

66:                                               ; preds = %65
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #7
  %67 = load ptr, ptr %9, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct.SafeContents, ptr %67, i32 0, i32 0
  %69 = getelementptr inbounds %struct.anon.12, ptr %68, i32 0, i32 0
  %70 = load ptr, ptr %69, align 8, !tbaa !17
  %71 = load i32, ptr %17, align 4, !tbaa !9
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds ptr, ptr %70, i64 %72
  %74 = load ptr, ptr %73, align 8, !tbaa !5
  store ptr %74, ptr %19, align 8, !tbaa !5
  br label %75

75:                                               ; preds = %66
  %76 = load ptr, ptr %19, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.SafeBag, ptr %76, i32 0, i32 0
  %78 = invoke noundef i32 @_ZN7UapkiNS4Util11oidFromAsn1EPK21ASN__PRIMITIVE_TYPE_sRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef %77, ptr noundef nonnull align 8 dereferenceable(32) %12)
          to label %79 unwind label %85

79:                                               ; preds = %75
  store i32 %78, ptr %8, align 4, !tbaa !9
  %80 = load i32, ptr %8, align 4, !tbaa !9
  %81 = icmp ne i32 %80, 0
  br i1 %81, label %82, label %89

82:                                               ; preds = %79
  %83 = load i32, ptr %8, align 4, !tbaa !9
  invoke void @stacktrace_add(ptr noundef @.str, i64 noundef 560, i32 noundef %83)
          to label %84 unwind label %85

84:                                               ; preds = %82
  store i32 4, ptr %18, align 4
  br label %296

85:                                               ; preds = %293, %291, %288, %283, %277, %275, %269, %264, %258, %250, %245, %240, %233, %231, %227, %223, %172, %168, %162, %155, %144, %142, %136, %129, %123, %118, %110, %106, %102, %97, %93, %82, %75
  %86 = landingpad { ptr, i32 }
          cleanup
  %87 = extractvalue { ptr, i32 } %86, 0
  store ptr %87, ptr %15, align 8
  %88 = extractvalue { ptr, i32 } %86, 1
  store i32 %88, ptr %16, align 4
  br label %302

89:                                               ; preds = %79
  br label %90

90:                                               ; preds = %89
  br label %91

91:                                               ; preds = %90
  %92 = call noundef zeroext i1 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32) %12) #7
  br i1 %92, label %96, label %93

93:                                               ; preds = %91
  %94 = load ptr, ptr %10, align 8, !tbaa !5
  invoke void @_ZN8StoreBag8setBagIdERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(120) %94, ptr noundef nonnull align 8 dereferenceable(32) %12)
          to label %95 unwind label %85

95:                                               ; preds = %93
  br label %102

96:                                               ; preds = %91
  br label %97

97:                                               ; preds = %96
  store i32 1039, ptr %8, align 4, !tbaa !9
  %98 = load i32, ptr %8, align 4, !tbaa !9
  invoke void @stacktrace_create(ptr noundef @.str, i64 noundef 566, i32 noundef %98, ptr noundef null)
          to label %99 unwind label %85

99:                                               ; preds = %97
  store i32 4, ptr %18, align 4
  br label %296

100:                                              ; No predecessors!
  br label %101

101:                                              ; preds = %100
  br label %102

102:                                              ; preds = %101, %95
  %103 = load ptr, ptr @OID_PKCS12_P8_SHROUDED_KEY_BAG, align 8, !tbaa !5
  %104 = load ptr, ptr %10, align 8, !tbaa !5
  %105 = invoke noundef ptr @_ZNK8StoreBag5bagIdEv(ptr noundef nonnull align 8 dereferenceable(120) %104)
          to label %106 unwind label %85

106:                                              ; preds = %102
  %107 = invoke zeroext i1 @oid_is_equal(ptr noundef %103, ptr noundef %105)
          to label %108 unwind label %85

108:                                              ; preds = %106
  br i1 %107, label %109, label %168

109:                                              ; preds = %108
  br label %110

110:                                              ; preds = %109
  %111 = load ptr, ptr %19, align 8, !tbaa !5
  %112 = getelementptr inbounds %struct.SafeBag, ptr %111, i32 0, i32 1
  %113 = load ptr, ptr %7, align 8, !tbaa !5
  %114 = invoke i32 @pkcs12_read_shrouded_key_bag(ptr noundef %112, ptr noundef %113, ptr noundef %11, ptr noundef %13, ptr noundef %14)
          to label %115 unwind label %85

115:                                              ; preds = %110
  store i32 %114, ptr %8, align 4, !tbaa !9
  %116 = load i32, ptr %8, align 4, !tbaa !9
  %117 = icmp ne i32 %116, 0
  br i1 %117, label %118, label %121

118:                                              ; preds = %115
  %119 = load i32, ptr %8, align 4, !tbaa !9
  invoke void @stacktrace_add(ptr noundef @.str, i64 noundef 570, i32 noundef %119)
          to label %120 unwind label %85

120:                                              ; preds = %118
  store i32 4, ptr %18, align 4
  br label %296

121:                                              ; preds = %115
  br label %122

122:                                              ; preds = %121
  br label %123

123:                                              ; preds = %122
  %124 = load ptr, ptr %10, align 8, !tbaa !5
  %125 = load ptr, ptr %11, align 8, !tbaa !5
  invoke void @_ZN8StoreBag7setDataENS_8BAG_TYPEEP12ByteArray_st(ptr noundef nonnull align 8 dereferenceable(120) %124, i32 noundef 1, ptr noundef %125)
          to label %126 unwind label %85

126:                                              ; preds = %123
  %127 = load ptr, ptr %13, align 8, !tbaa !5
  %128 = icmp ne ptr %127, null
  br i1 %128, label %129, label %144

129:                                              ; preds = %126
  %130 = load ptr, ptr %10, align 8, !tbaa !5
  %131 = load ptr, ptr %13, align 8, !tbaa !5
  %132 = getelementptr inbounds %class.FileStorage, ptr %21, i32 0, i32 8
  %133 = getelementptr inbounds %struct.FileStorageParam, ptr %132, i32 0, i32 1
  %134 = load ptr, ptr %133, align 8, !tbaa !18
  %135 = invoke noundef ptr @_ZN11FileStorage12checkHashOidEPKcS1_(ptr noundef %131, ptr noundef %134)
          to label %136 unwind label %85

136:                                              ; preds = %129
  %137 = load ptr, ptr %14, align 8, !tbaa !5
  %138 = getelementptr inbounds %class.FileStorage, ptr %21, i32 0, i32 8
  %139 = getelementptr inbounds %struct.FileStorageParam, ptr %138, i32 0, i32 0
  %140 = load ptr, ptr %139, align 8, !tbaa !28
  %141 = invoke noundef ptr @_ZN11FileStorage14checkCipherOidEPKcS1_(ptr noundef %137, ptr noundef %140)
          to label %142 unwind label %85

142:                                              ; preds = %136
  invoke void @_ZN8StoreBag13setPbes2ParamEPKcS1_(ptr noundef nonnull align 8 dereferenceable(120) %130, ptr noundef %135, ptr noundef %141)
          to label %143 unwind label %85

143:                                              ; preds = %142
  br label %165

144:                                              ; preds = %126
  %145 = load ptr, ptr %10, align 8, !tbaa !5
  %146 = getelementptr inbounds %class.FileStorage, ptr %21, i32 0, i32 8
  %147 = getelementptr inbounds %struct.FileStorageParam, ptr %146, i32 0, i32 1
  %148 = load ptr, ptr %147, align 8, !tbaa !18
  %149 = load ptr, ptr @OID_PBE_WITH_SHA1_TDES_CBC, align 8, !tbaa !5
  %150 = load ptr, ptr %14, align 8, !tbaa !5
  %151 = invoke zeroext i1 @oid_is_equal(ptr noundef %149, ptr noundef %150)
          to label %152 unwind label %85

152:                                              ; preds = %144
  br i1 %151, label %153, label %155

153:                                              ; preds = %152
  %154 = load ptr, ptr @OID_DES_EDE3_CBC, align 8, !tbaa !5
  br label %162

155:                                              ; preds = %152
  %156 = load ptr, ptr %14, align 8, !tbaa !5
  %157 = getelementptr inbounds %class.FileStorage, ptr %21, i32 0, i32 8
  %158 = getelementptr inbounds %struct.FileStorageParam, ptr %157, i32 0, i32 0
  %159 = load ptr, ptr %158, align 8, !tbaa !28
  %160 = invoke noundef ptr @_ZN11FileStorage14checkCipherOidEPKcS1_(ptr noundef %156, ptr noundef %159)
          to label %161 unwind label %85

161:                                              ; preds = %155
  br label %162

162:                                              ; preds = %161, %153
  %163 = phi ptr [ %154, %153 ], [ %160, %161 ]
  invoke void @_ZN8StoreBag13setPbes2ParamEPKcS1_(ptr noundef nonnull align 8 dereferenceable(120) %145, ptr noundef %148, ptr noundef %163)
          to label %164 unwind label %85

164:                                              ; preds = %162
  br label %165

165:                                              ; preds = %164, %143
  %166 = load ptr, ptr %13, align 8, !tbaa !5
  call void @free(ptr noundef %166) #7
  store ptr null, ptr %13, align 8, !tbaa !5
  %167 = load ptr, ptr %14, align 8, !tbaa !5
  call void @free(ptr noundef %167) #7
  store ptr null, ptr %14, align 8, !tbaa !5
  br label %257

168:                                              ; preds = %108
  %169 = load ptr, ptr @OID_PKCS12_CERT_BAG, align 8, !tbaa !5
  %170 = load ptr, ptr %10, align 8, !tbaa !5
  %171 = invoke noundef ptr @_ZNK8StoreBag5bagIdEv(ptr noundef nonnull align 8 dereferenceable(120) %170)
          to label %172 unwind label %85

172:                                              ; preds = %168
  %173 = invoke zeroext i1 @oid_is_equal(ptr noundef %169, ptr noundef %171)
          to label %174 unwind label %85

174:                                              ; preds = %172
  br i1 %173, label %175, label %223

175:                                              ; preds = %174
  call void @llvm.lifetime.start.p0(i64 1, ptr %20) #7
  br label %176

176:                                              ; preds = %175
  %177 = load ptr, ptr %19, align 8, !tbaa !5
  %178 = getelementptr inbounds %struct.SafeBag, ptr %177, i32 0, i32 1
  %179 = invoke i32 @pkcs12_read_cert_bag(ptr noundef %178, ptr noundef %11, ptr noundef %20)
          to label %180 unwind label %186

180:                                              ; preds = %176
  store i32 %179, ptr %8, align 4, !tbaa !9
  %181 = load i32, ptr %8, align 4, !tbaa !9
  %182 = icmp ne i32 %181, 0
  br i1 %182, label %183, label %190

183:                                              ; preds = %180
  %184 = load i32, ptr %8, align 4, !tbaa !9
  invoke void @stacktrace_add(ptr noundef @.str, i64 noundef 594, i32 noundef %184)
          to label %185 unwind label %186

185:                                              ; preds = %183
  store i32 4, ptr %18, align 4
  br label %220

186:                                              ; preds = %211, %205, %198, %196, %183, %176
  %187 = landingpad { ptr, i32 }
          cleanup
  %188 = extractvalue { ptr, i32 } %187, 0
  store ptr %188, ptr %15, align 8
  %189 = extractvalue { ptr, i32 } %187, 1
  store i32 %189, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %20) #7
  br label %302

190:                                              ; preds = %180
  br label %191

191:                                              ; preds = %190
  br label %192

192:                                              ; preds = %191
  %193 = load i8, ptr %20, align 1, !tbaa !29, !range !30, !noundef !31
  %194 = trunc i8 %193 to i1
  br i1 %194, label %195, label %211

195:                                              ; preds = %192
  br label %196

196:                                              ; preds = %195
  %197 = invoke ptr @get_ANY_desc()
          to label %198 unwind label %186

198:                                              ; preds = %196
  %199 = load ptr, ptr %19, align 8, !tbaa !5
  %200 = getelementptr inbounds %struct.SafeBag, ptr %199, i32 0, i32 1
  %201 = invoke i32 @asn_encode_ba(ptr noundef %197, ptr noundef %200, ptr noundef %11)
          to label %202 unwind label %186

202:                                              ; preds = %198
  store i32 %201, ptr %8, align 4, !tbaa !9
  %203 = load i32, ptr %8, align 4, !tbaa !9
  %204 = icmp ne i32 %203, 0
  br i1 %204, label %205, label %208

205:                                              ; preds = %202
  %206 = load i32, ptr %8, align 4, !tbaa !9
  invoke void @stacktrace_add(ptr noundef @.str, i64 noundef 596, i32 noundef %206)
          to label %207 unwind label %186

207:                                              ; preds = %205
  store i32 4, ptr %18, align 4
  br label %220

208:                                              ; preds = %202
  br label %209

209:                                              ; preds = %208
  br label %210

210:                                              ; preds = %209
  br label %211

211:                                              ; preds = %210, %192
  %212 = load ptr, ptr %10, align 8, !tbaa !5
  %213 = load i8, ptr %20, align 1, !tbaa !29, !range !30, !noundef !31
  %214 = trunc i8 %213 to i1
  %215 = xor i1 %214, true
  %216 = zext i1 %215 to i64
  %217 = select i1 %215, i32 2, i32 3
  %218 = load ptr, ptr %11, align 8, !tbaa !5
  invoke void @_ZN8StoreBag7setDataENS_8BAG_TYPEEP12ByteArray_st(ptr noundef nonnull align 8 dereferenceable(120) %212, i32 noundef %217, ptr noundef %218)
          to label %219 unwind label %186

219:                                              ; preds = %211
  store i32 0, ptr %18, align 4
  br label %220

220:                                              ; preds = %219, %207, %185
  call void @llvm.lifetime.end.p0(i64 1, ptr %20) #7
  %221 = load i32, ptr %18, align 4
  switch i32 %221, label %296 [
    i32 0, label %222
  ]

222:                                              ; preds = %220
  br label %256

223:                                              ; preds = %174
  %224 = load ptr, ptr @OID_PKCS12_BAGTYPES, align 8, !tbaa !5
  %225 = load ptr, ptr %10, align 8, !tbaa !5
  %226 = invoke noundef ptr @_ZNK8StoreBag5bagIdEv(ptr noundef nonnull align 8 dereferenceable(120) %225)
          to label %227 unwind label %85

227:                                              ; preds = %223
  %228 = invoke zeroext i1 @oid_is_parent(ptr noundef %224, ptr noundef %226)
          to label %229 unwind label %85

229:                                              ; preds = %227
  br i1 %228, label %230, label %249

230:                                              ; preds = %229
  br label %231

231:                                              ; preds = %230
  %232 = invoke ptr @get_ANY_desc()
          to label %233 unwind label %85

233:                                              ; preds = %231
  %234 = load ptr, ptr %19, align 8, !tbaa !5
  %235 = getelementptr inbounds %struct.SafeBag, ptr %234, i32 0, i32 1
  %236 = invoke i32 @asn_encode_ba(ptr noundef %232, ptr noundef %235, ptr noundef %11)
          to label %237 unwind label %85

237:                                              ; preds = %233
  store i32 %236, ptr %8, align 4, !tbaa !9
  %238 = load i32, ptr %8, align 4, !tbaa !9
  %239 = icmp ne i32 %238, 0
  br i1 %239, label %240, label %243

240:                                              ; preds = %237
  %241 = load i32, ptr %8, align 4, !tbaa !9
  invoke void @stacktrace_add(ptr noundef @.str, i64 noundef 601, i32 noundef %241)
          to label %242 unwind label %85

242:                                              ; preds = %240
  store i32 4, ptr %18, align 4
  br label %296

243:                                              ; preds = %237
  br label %244

244:                                              ; preds = %243
  br label %245

245:                                              ; preds = %244
  %246 = load ptr, ptr %10, align 8, !tbaa !5
  %247 = load ptr, ptr %11, align 8, !tbaa !5
  invoke void @_ZN8StoreBag7setDataENS_8BAG_TYPEEP12ByteArray_st(ptr noundef nonnull align 8 dereferenceable(120) %246, i32 noundef 3, ptr noundef %247)
          to label %248 unwind label %85

248:                                              ; preds = %245
  br label %255

249:                                              ; preds = %229
  br label %250

250:                                              ; preds = %249
  store i32 1039, ptr %8, align 4, !tbaa !9
  %251 = load i32, ptr %8, align 4, !tbaa !9
  invoke void @stacktrace_create(ptr noundef @.str, i64 noundef 605, i32 noundef %251, ptr noundef null)
          to label %252 unwind label %85

252:                                              ; preds = %250
  store i32 4, ptr %18, align 4
  br label %296

253:                                              ; No predecessors!
  br label %254

254:                                              ; preds = %253
  br label %255

255:                                              ; preds = %254, %248
  br label %256

256:                                              ; preds = %255, %222
  br label %257

257:                                              ; preds = %256, %165
  store ptr null, ptr %11, align 8, !tbaa !5
  br label %258

258:                                              ; preds = %257
  %259 = load ptr, ptr %19, align 8, !tbaa !5
  %260 = getelementptr inbounds %struct.SafeBag, ptr %259, i32 0, i32 2
  %261 = load ptr, ptr %260, align 8, !tbaa !32
  %262 = load ptr, ptr %10, align 8, !tbaa !5
  %263 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN8StoreBag13bagAttributesEv(ptr noundef nonnull align 8 dereferenceable(120) %262)
          to label %264 unwind label %85

264:                                              ; preds = %258
  %265 = invoke noundef i32 @_ZL17readBagAttributesPK10AttributesRSt6vectorIP9StoreAttrSaIS4_EE(ptr noundef %261, ptr noundef nonnull align 8 dereferenceable(24) %263)
          to label %266 unwind label %85

266:                                              ; preds = %264
  store i32 %265, ptr %8, align 4, !tbaa !9
  %267 = load i32, ptr %8, align 4, !tbaa !9
  %268 = icmp ne i32 %267, 0
  br i1 %268, label %269, label %272

269:                                              ; preds = %266
  %270 = load i32, ptr %8, align 4, !tbaa !9
  invoke void @stacktrace_add(ptr noundef @.str, i64 noundef 609, i32 noundef %270)
          to label %271 unwind label %85

271:                                              ; preds = %269
  store i32 4, ptr %18, align 4
  br label %296

272:                                              ; preds = %266
  br label %273

273:                                              ; preds = %272
  br label %274

274:                                              ; preds = %273
  br label %275

275:                                              ; preds = %274
  %276 = invoke ptr @get_SafeBag_desc()
          to label %277 unwind label %85

277:                                              ; preds = %275
  %278 = load ptr, ptr %19, align 8, !tbaa !5
  %279 = invoke i32 @asn_encode_ba(ptr noundef %276, ptr noundef %278, ptr noundef %11)
          to label %280 unwind label %85

280:                                              ; preds = %277
  store i32 %279, ptr %8, align 4, !tbaa !9
  %281 = load i32, ptr %8, align 4, !tbaa !9
  %282 = icmp ne i32 %281, 0
  br i1 %282, label %283, label %286

283:                                              ; preds = %280
  %284 = load i32, ptr %8, align 4, !tbaa !9
  invoke void @stacktrace_add(ptr noundef @.str, i64 noundef 612, i32 noundef %284)
          to label %285 unwind label %85

285:                                              ; preds = %283
  store i32 4, ptr %18, align 4
  br label %296

286:                                              ; preds = %280
  br label %287

287:                                              ; preds = %286
  br label %288

288:                                              ; preds = %287
  %289 = load ptr, ptr %10, align 8, !tbaa !5
  %290 = load ptr, ptr %11, align 8, !tbaa !5
  invoke void @_ZN8StoreBag13setEncodedBagEPK12ByteArray_st(ptr noundef nonnull align 8 dereferenceable(120) %289, ptr noundef %290)
          to label %291 unwind label %85

291:                                              ; preds = %288
  store ptr null, ptr %11, align 8, !tbaa !5
  %292 = load ptr, ptr %10, align 8, !tbaa !5
  invoke void @_ZN8StoreBag12scanStdAttrsEv(ptr noundef nonnull align 8 dereferenceable(120) %292)
          to label %293 unwind label %85

293:                                              ; preds = %291
  %294 = load ptr, ptr %10, align 8, !tbaa !5
  invoke void @_ZN11FileStorage6addBagEPK8StoreBag(ptr noundef nonnull align 8 dereferenceable(152) %21, ptr noundef %294)
          to label %295 unwind label %85

295:                                              ; preds = %293
  store ptr null, ptr %10, align 8, !tbaa !5
  store i32 0, ptr %18, align 4
  br label %296

296:                                              ; preds = %295, %285, %271, %252, %242, %220, %120, %99, %84
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  %297 = load i32, ptr %18, align 4
  switch i32 %297, label %303 [
    i32 0, label %298
  ]

298:                                              ; preds = %296
  br label %299

299:                                              ; preds = %298
  %300 = load i32, ptr %17, align 4, !tbaa !9
  %301 = add nsw i32 %300, 1
  store i32 %301, ptr %17, align 4, !tbaa !9
  br label %39, !llvm.loop !36

302:                                              ; preds = %186, %85
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  br label %305

303:                                              ; preds = %296, %55, %46
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  %304 = load i32, ptr %18, align 4
  switch i32 %304, label %324 [
    i32 5, label %306
    i32 4, label %307
  ]

305:                                              ; preds = %302, %60, %56
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  br label %326

306:                                              ; preds = %303
  br label %307

307:                                              ; preds = %306, %303, %31
  %308 = load ptr, ptr %10, align 8, !tbaa !5
  %309 = icmp ne ptr %308, null
  br i1 %309, label %310, label %315

310:                                              ; preds = %307
  %311 = load ptr, ptr %10, align 8, !tbaa !5
  %312 = icmp eq ptr %311, null
  br i1 %312, label %314, label %313

313:                                              ; preds = %310
  call void @_ZN8StoreBagD1Ev(ptr noundef nonnull align 8 dereferenceable(120) %311) #7
  call void @_ZdlPvm(ptr noundef %311, i64 noundef 120) #9
  br label %314

314:                                              ; preds = %313, %310
  br label %315

315:                                              ; preds = %314, %307
  %316 = load ptr, ptr %13, align 8, !tbaa !5
  call void @free(ptr noundef %316) #7
  %317 = load ptr, ptr %11, align 8, !tbaa !5
  invoke void @ba_free(ptr noundef %317)
          to label %318 unwind label %32

318:                                              ; preds = %315
  %319 = invoke ptr @get_SafeContents_desc()
          to label %320 unwind label %32

320:                                              ; preds = %318
  %321 = load ptr, ptr %9, align 8, !tbaa !5
  invoke void @asn_free(ptr noundef %319, ptr noundef %321)
          to label %322 unwind label %32

322:                                              ; preds = %320
  %323 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %323, ptr %4, align 4
  store i32 1, ptr %18, align 4
  br label %324

324:                                              ; preds = %322, %303
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  %325 = load i32, ptr %4, align 4
  ret i32 %325

326:                                              ; preds = %305, %32
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  br label %327

327:                                              ; preds = %326
  %328 = load ptr, ptr %15, align 8
  %329 = load i32, ptr %16, align 4
  %330 = insertvalue { ptr, i32 } poison, ptr %328, 0
  %331 = insertvalue { ptr, i32 } %330, i32 %329, 1
  resume { ptr, i32 } %331
}

declare ptr @get_SafeContents_desc() #3

declare noundef i32 @_ZN7UapkiNS4Util11oidFromAsn1EPK21ASN__PRIMITIVE_TYPE_sRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef, ptr noundef nonnull align 8 dereferenceable(32)) #3

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

declare i32 @pkcs12_read_shrouded_key_bag(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #3

declare void @_ZN8StoreBag13setPbes2ParamEPKcS1_(ptr noundef nonnull align 8 dereferenceable(120), ptr noundef, ptr noundef) #3

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN11FileStorage12checkHashOidEPKcS1_(ptr noundef, ptr noundef) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN11FileStorage14checkCipherOidEPKcS1_(ptr noundef, ptr noundef) #1 align 2

declare i32 @pkcs12_read_cert_bag(ptr noundef, ptr noundef, ptr noundef) #3

declare i32 @asn_encode_ba(ptr noundef, ptr noundef, ptr noundef) #3

declare ptr @get_ANY_desc() #3

declare zeroext i1 @oid_is_parent(ptr noundef, ptr noundef) #3

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZN8StoreBag13bagAttributesEv(ptr noundef nonnull align 8 dereferenceable(120)) #0 align 2

declare ptr @get_SafeBag_desc() #3

declare void @_ZN8StoreBag13setEncodedBagEPK12ByteArray_st(ptr noundef nonnull align 8 dereferenceable(120), ptr noundef) #3

attributes #0 = { 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 #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nobuiltin nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nobuiltin allocsize(0) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nounwind }
attributes #8 = { builtin allocsize(0) }
attributes #9 = { builtin nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 8}
!12 = !{!"_ZTS12SafeContents", !13, i64 0, !14, i64 24}
!13 = !{!"_ZTSN12SafeContentsUt_E", !6, i64 0, !10, i64 8, !10, i64 12, !6, i64 16}
!14 = !{!"_ZTS16asn_struct_ctx_s", !15, i64 0, !15, i64 2, !10, i64 4, !6, i64 8, !16, i64 16}
!15 = !{!"short", !7, i64 0}
!16 = !{!"long", !7, i64 0}
!17 = !{!12, !6, i64 0}
!18 = !{!19, !6, i64 128}
!19 = !{!"_ZTS11FileStorage", !6, i64 0, !20, i64 8, !22, i64 40, !22, i64 41, !20, i64 48, !22, i64 80, !23, i64 88, !6, i64 112, !27, i64 120}
!20 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !21, i64 0, !16, i64 8, !7, i64 16}
!21 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!22 = !{!"bool", !7, i64 0}
!23 = !{!"_ZTSSt6vectorIP8StoreBagSaIS1_EE", !24, i64 0}
!24 = !{!"_ZTSSt12_Vector_baseIP8StoreBagSaIS1_EE", !25, i64 0}
!25 = !{!"_ZTSNSt12_Vector_baseIP8StoreBagSaIS1_EE12_Vector_implE", !26, i64 0}
!26 = !{!"_ZTSNSt12_Vector_baseIP8StoreBagSaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!27 = !{!"_ZTS16FileStorageParam", !6, i64 0, !6, i64 8, !6, i64 16, !16, i64 24}
!28 = !{!19, !6, i64 120}
!29 = !{!22, !22, i64 0}
!30 = !{i8 0, i8 2}
!31 = !{}
!32 = !{!33, !6, i64 56}
!33 = !{!"_ZTS7SafeBag", !34, i64 0, !35, i64 16, !6, i64 56, !14, i64 64}
!34 = !{!"_ZTS21ASN__PRIMITIVE_TYPE_s", !6, i64 0, !10, i64 8}
!35 = !{!"_ZTS3ANY", !6, i64 0, !10, i64 8, !14, i64 16}
!36 = distinct !{!36, !37}
!37 = !{!"llvm.loop.mustprogress"}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.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] }

@OID_PKCS12_P8_SHROUDED_KEY_BAG = external local_unnamed_addr global ptr, align 8
@.str = external hidden unnamed_addr constant [35 x i8], align 1
@OID_PBE_WITH_SHA1_TDES_CBC = external local_unnamed_addr global ptr, align 8
@OID_DES_EDE3_CBC = external local_unnamed_addr global ptr, align 8
@OID_PKCS12_CERT_BAG = external local_unnamed_addr global ptr, align 8
@OID_PKCS12_BAGTYPES = external local_unnamed_addr global ptr, align 8

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

declare zeroext i1 @oid_is_equal(ptr noundef, ptr noundef) local_unnamed_addr #3

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

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #4

; Function Attrs: nounwind
declare void @_ZN8StoreBagD1Ev(ptr noundef nonnull align 8 dereferenceable(120)) unnamed_addr #5

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

declare void @ba_free(ptr noundef) local_unnamed_addr #3

declare void @stacktrace_add(ptr noundef, i64 noundef, i32 noundef) local_unnamed_addr #3

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

declare void @_ZN8StoreBagC1Ev(ptr noundef nonnull align 8 dereferenceable(120)) unnamed_addr #3

declare void @_ZN8StoreBag8setBagIdERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(120), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #3

declare void @_ZN8StoreBag7setDataENS_8BAG_TYPEEP12ByteArray_st(ptr noundef nonnull align 8 dereferenceable(120), i32 noundef, ptr noundef) local_unnamed_addr #3

declare void @stacktrace_create(ptr noundef, i64 noundef, i32 noundef, ptr noundef) local_unnamed_addr #3

declare void @_ZN8StoreBag12scanStdAttrsEv(ptr noundef nonnull align 8 dereferenceable(120)) local_unnamed_addr #3

declare ptr @asn_decode_ba_with_alloc(ptr noundef, ptr noundef) local_unnamed_addr #3

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN11FileStorage16readSafeContentsEPK12ByteArray_stPKc(ptr noundef nonnull align 8 dereferenceable(152) %0, ptr noundef %1, ptr noundef %2) local_unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca %"class.std::__cxx11::basic_string", align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i8, align 1
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #8
  store ptr null, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #8
  store ptr null, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #8
  store ptr null, ptr %7, align 8, !tbaa !5
  %9 = invoke ptr @get_SafeContents_desc()
          to label %10 unwind label %20

10:                                               ; preds = %3
  %11 = invoke ptr @asn_decode_ba_with_alloc(ptr noundef %9, ptr noundef %1)
          to label %12 unwind label %20

12:                                               ; preds = %10
  %13 = icmp eq ptr %11, null
  br i1 %13, label %19, label %.preheader

.preheader:                                       ; preds = %12
  %14 = getelementptr inbounds i8, ptr %11, i64 8
  %15 = load i32, ptr %14, align 8, !tbaa !9
  %16 = icmp sgt i32 %15, 0
  br i1 %16, label %.lr.ph, label %.thread105

.lr.ph:                                           ; preds = %.preheader
  %17 = getelementptr inbounds i8, ptr %0, i64 128
  %18 = getelementptr inbounds i8, ptr %0, i64 120
  br label %22

19:                                               ; preds = %12
  invoke void @stacktrace_add(ptr noundef nonnull @.str, i64 noundef 554, i32 noundef 2)
          to label %.thread105 unwind label %20

20:                                               ; preds = %141, %139, %.thread105, %19, %10, %3
  %21 = landingpad { ptr, i32 }
          cleanup
  br label %143

22:                                               ; preds = %.lr.ph, %132
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %132 ]
  %23 = invoke noalias noundef nonnull dereferenceable(120) ptr @_Znwm(i64 noundef 120) #9
          to label %24 unwind label %25

24:                                               ; preds = %22
  invoke void @_ZN8StoreBagC1Ev(ptr noundef nonnull align 8 dereferenceable(120) %23)
          to label %29 unwind label %27

25:                                               ; preds = %22
  %26 = landingpad { ptr, i32 }
          cleanup
  br label %143

27:                                               ; preds = %24
  %28 = landingpad { ptr, i32 }
          cleanup
  call void @_ZdlPvm(ptr noundef nonnull %23, i64 noundef 120) #10
  br label %143

29:                                               ; preds = %24
  %30 = load ptr, ptr %11, align 8, !tbaa !16
  %31 = getelementptr inbounds ptr, ptr %30, i64 %indvars.iv
  %32 = load ptr, ptr %31, align 8, !tbaa !5
  %33 = invoke noundef i32 @_ZN7UapkiNS4Util11oidFromAsn1EPK21ASN__PRIMITIVE_TYPE_sRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef %32, ptr noundef nonnull align 8 dereferenceable(32) %5)
          to label %34 unwind label %.loopexit

34:                                               ; preds = %29
  %.not = icmp eq i32 %33, 0
  br i1 %.not, label %36, label %35

35:                                               ; preds = %34
  invoke void @stacktrace_add(ptr noundef nonnull @.str, i64 noundef 560, i32 noundef %33)
          to label %136 unwind label %.loopexit.split-lp

.loopexit:                                        ; preds = %.invoke, %29, %38, %40, %45, %50, %55, %57, %63, %70, %77, %101, %106, %108, %113, %115, %122, %124, %128, %130, %131
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %143

.loopexit.split-lp:                               ; preds = %.invoke252, %35, %49, %112, %121, %127
  %lpad.loopexit.split-lp = landingpad { ptr, i32 }
          cleanup
  br label %143

36:                                               ; preds = %34
  %37 = call noundef zeroext i1 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32) %5) #8
  br i1 %37, label %.invoke252, label %38

38:                                               ; preds = %36
  invoke void @_ZN8StoreBag8setBagIdERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(120) %23, ptr noundef nonnull align 8 dereferenceable(32) %5)
          to label %40 unwind label %.loopexit

.invoke252:                                       ; preds = %105, %36
  %39 = phi i64 [ 566, %36 ], [ 605, %105 ]
  invoke void @stacktrace_create(ptr noundef nonnull @.str, i64 noundef %39, i32 noundef 1039, ptr noundef null)
          to label %136 unwind label %.loopexit.split-lp

40:                                               ; preds = %38
  %41 = load ptr, ptr @OID_PKCS12_P8_SHROUDED_KEY_BAG, align 8, !tbaa !5
  %42 = call noundef ptr @_ZNK8StoreBag5bagIdEv(ptr noundef nonnull align 8 dereferenceable(120) %23)
  %43 = invoke zeroext i1 @oid_is_equal(ptr noundef %41, ptr noundef %42)
          to label %44 unwind label %.loopexit

44:                                               ; preds = %40
  br i1 %43, label %45, label %77

45:                                               ; preds = %44
  %46 = getelementptr inbounds i8, ptr %32, i64 16
  %47 = invoke i32 @pkcs12_read_shrouded_key_bag(ptr noundef nonnull %46, ptr noundef %2, ptr noundef nonnull %4, ptr noundef nonnull %6, ptr noundef nonnull %7)
          to label %48 unwind label %.loopexit

48:                                               ; preds = %45
  %.not86 = icmp eq i32 %47, 0
  br i1 %.not86, label %50, label %49

49:                                               ; preds = %48
  invoke void @stacktrace_add(ptr noundef nonnull @.str, i64 noundef 570, i32 noundef %47)
          to label %136 unwind label %.loopexit.split-lp

50:                                               ; preds = %48
  %51 = load ptr, ptr %4, align 8, !tbaa !5
  invoke void @_ZN8StoreBag7setDataENS_8BAG_TYPEEP12ByteArray_st(ptr noundef nonnull align 8 dereferenceable(120) %23, i32 noundef 1, ptr noundef %51)
          to label %52 unwind label %.loopexit

52:                                               ; preds = %50
  %53 = load ptr, ptr %6, align 8, !tbaa !5
  %.not87 = icmp eq ptr %53, null
  %54 = load ptr, ptr %17, align 8, !tbaa !17
  br i1 %.not87, label %63, label %55

55:                                               ; preds = %52
  %56 = invoke noundef ptr @_ZN11FileStorage12checkHashOidEPKcS1_(ptr noundef nonnull %53, ptr noundef %54)
          to label %57 unwind label %.loopexit

57:                                               ; preds = %55
  %58 = load ptr, ptr %7, align 8, !tbaa !5
  %59 = load ptr, ptr %18, align 8, !tbaa !27
  %60 = invoke noundef ptr @_ZN11FileStorage14checkCipherOidEPKcS1_(ptr noundef %58, ptr noundef %59)
          to label %.invoke unwind label %.loopexit

.invoke:                                          ; preds = %68, %70, %57
  %61 = phi ptr [ %56, %57 ], [ %54, %70 ], [ %54, %68 ]
  %62 = phi ptr [ %60, %57 ], [ %73, %70 ], [ %69, %68 ]
  invoke void @_ZN8StoreBag13setPbes2ParamEPKcS1_(ptr noundef nonnull align 8 dereferenceable(120) %23, ptr noundef %61, ptr noundef %62)
          to label %74 unwind label %.loopexit

63:                                               ; preds = %52
  %64 = load ptr, ptr @OID_PBE_WITH_SHA1_TDES_CBC, align 8, !tbaa !5
  %65 = load ptr, ptr %7, align 8, !tbaa !5
  %66 = invoke zeroext i1 @oid_is_equal(ptr noundef %64, ptr noundef %65)
          to label %67 unwind label %.loopexit

67:                                               ; preds = %63
  br i1 %66, label %68, label %70

68:                                               ; preds = %67
  %69 = load ptr, ptr @OID_DES_EDE3_CBC, align 8, !tbaa !5
  br label %.invoke

70:                                               ; preds = %67
  %71 = load ptr, ptr %7, align 8, !tbaa !5
  %72 = load ptr, ptr %18, align 8, !tbaa !27
  %73 = invoke noundef ptr @_ZN11FileStorage14checkCipherOidEPKcS1_(ptr noundef %71, ptr noundef %72)
          to label %.invoke unwind label %.loopexit

74:                                               ; preds = %.invoke
  %75 = load ptr, ptr %6, align 8, !tbaa !5
  call void @free(ptr noundef %75) #8
  store ptr null, ptr %6, align 8, !tbaa !5
  %76 = load ptr, ptr %7, align 8, !tbaa !5
  call void @free(ptr noundef %76) #8
  store ptr null, ptr %7, align 8, !tbaa !5
  br label %115

77:                                               ; preds = %44
  %78 = load ptr, ptr @OID_PKCS12_CERT_BAG, align 8, !tbaa !5
  %79 = call noundef ptr @_ZNK8StoreBag5bagIdEv(ptr noundef nonnull align 8 dereferenceable(120) %23)
  %80 = invoke zeroext i1 @oid_is_equal(ptr noundef %78, ptr noundef %79)
          to label %81 unwind label %.loopexit

81:                                               ; preds = %77
  br i1 %80, label %82, label %101

82:                                               ; preds = %81
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %8) #8
  %83 = getelementptr inbounds i8, ptr %32, i64 16
  %84 = invoke i32 @pkcs12_read_cert_bag(ptr noundef nonnull %83, ptr noundef nonnull %4, ptr noundef nonnull %8)
          to label %85 unwind label %.loopexit116

85:                                               ; preds = %82
  %.not84 = icmp eq i32 %84, 0
  br i1 %.not84, label %88, label %86

86:                                               ; preds = %85
  invoke void @stacktrace_add(ptr noundef nonnull @.str, i64 noundef 594, i32 noundef %84)
          to label %.thread unwind label %.loopexit.split-lp117

.loopexit116:                                     ; preds = %82, %91, %93, %97
  %lpad.loopexit118 = landingpad { ptr, i32 }
          cleanup
  br label %87

.loopexit.split-lp117:                            ; preds = %86, %96
  %lpad.loopexit.split-lp119 = landingpad { ptr, i32 }
          cleanup
  br label %87

87:                                               ; preds = %.loopexit.split-lp117, %.loopexit116
  %lpad.phi120 = phi { ptr, i32 } [ %lpad.loopexit118, %.loopexit116 ], [ %lpad.loopexit.split-lp119, %.loopexit.split-lp117 ]
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #8
  br label %143

88:                                               ; preds = %85
  %89 = load i8, ptr %8, align 1, !tbaa !28, !range !29, !noundef !30
  %90 = trunc nuw i8 %89 to i1
  br i1 %90, label %91, label %97

91:                                               ; preds = %88
  %92 = invoke ptr @get_ANY_desc()
          to label %93 unwind label %.loopexit116

93:                                               ; preds = %91
  %94 = invoke i32 @asn_encode_ba(ptr noundef %92, ptr noundef nonnull %83, ptr noundef nonnull %4)
          to label %95 unwind label %.loopexit116

95:                                               ; preds = %93
  %.not85 = icmp eq i32 %94, 0
  br i1 %.not85, label %._crit_edge, label %96

._crit_edge:                                      ; preds = %95
  %.pre = load i8, ptr %8, align 1, !tbaa !28, !range !29
  %.pre185 = trunc nuw i8 %.pre to i1
  br label %97

96:                                               ; preds = %95
  invoke void @stacktrace_add(ptr noundef nonnull @.str, i64 noundef 596, i32 noundef %94)
          to label %.thread unwind label %.loopexit.split-lp117

97:                                               ; preds = %._crit_edge, %88
  %.pre-phi = phi i1 [ %.pre185, %._crit_edge ], [ false, %88 ]
  %98 = select i1 %.pre-phi, i32 3, i32 2
  %99 = load ptr, ptr %4, align 8, !tbaa !5
  invoke void @_ZN8StoreBag7setDataENS_8BAG_TYPEEP12ByteArray_st(ptr noundef nonnull align 8 dereferenceable(120) %23, i32 noundef %98, ptr noundef %99)
          to label %100 unwind label %.loopexit116

.thread:                                          ; preds = %86, %96
  %.269.ph = phi i32 [ %94, %96 ], [ %84, %86 ]
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #8
  br label %136

100:                                              ; preds = %97
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #8
  br label %115

101:                                              ; preds = %81
  %102 = load ptr, ptr @OID_PKCS12_BAGTYPES, align 8, !tbaa !5
  %103 = call noundef ptr @_ZNK8StoreBag5bagIdEv(ptr noundef nonnull align 8 dereferenceable(120) %23)
  %104 = invoke zeroext i1 @oid_is_parent(ptr noundef %102, ptr noundef %103)
          to label %105 unwind label %.loopexit

105:                                              ; preds = %101
  br i1 %104, label %106, label %.invoke252

106:                                              ; preds = %105
  %107 = invoke ptr @get_ANY_desc()
          to label %108 unwind label %.loopexit

108:                                              ; preds = %106
  %109 = getelementptr inbounds i8, ptr %32, i64 16
  %110 = invoke i32 @asn_encode_ba(ptr noundef %107, ptr noundef nonnull %109, ptr noundef nonnull %4)
          to label %111 unwind label %.loopexit

111:                                              ; preds = %108
  %.not83 = icmp eq i32 %110, 0
  br i1 %.not83, label %113, label %112

112:                                              ; preds = %111
  invoke void @stacktrace_add(ptr noundef nonnull @.str, i64 noundef 601, i32 noundef %110)
          to label %136 unwind label %.loopexit.split-lp

113:                                              ; preds = %111
  %114 = load ptr, ptr %4, align 8, !tbaa !5
  invoke void @_ZN8StoreBag7setDataENS_8BAG_TYPEEP12ByteArray_st(ptr noundef nonnull align 8 dereferenceable(120) %23, i32 noundef 3, ptr noundef %114)
          to label %115 unwind label %.loopexit

115:                                              ; preds = %100, %113, %74
  store ptr null, ptr %4, align 8, !tbaa !5
  %116 = getelementptr inbounds i8, ptr %32, i64 56
  %117 = load ptr, ptr %116, align 8, !tbaa !31
  %118 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN8StoreBag13bagAttributesEv(ptr noundef nonnull align 8 dereferenceable(120) %23)
  %119 = invoke noundef i32 @_ZL17readBagAttributesPK10AttributesRSt6vectorIP9StoreAttrSaIS4_EE(ptr noundef %117, ptr noundef nonnull align 8 dereferenceable(24) %118)
          to label %120 unwind label %.loopexit

120:                                              ; preds = %115
  %.not88 = icmp eq i32 %119, 0
  br i1 %.not88, label %122, label %121

121:                                              ; preds = %120
  invoke void @stacktrace_add(ptr noundef nonnull @.str, i64 noundef 609, i32 noundef %119)
          to label %136 unwind label %.loopexit.split-lp

122:                                              ; preds = %120
  %123 = invoke ptr @get_SafeBag_desc()
          to label %124 unwind label %.loopexit

124:                                              ; preds = %122
  %125 = invoke i32 @asn_encode_ba(ptr noundef %123, ptr noundef nonnull %32, ptr noundef nonnull %4)
          to label %126 unwind label %.loopexit

126:                                              ; preds = %124
  %.not89 = icmp eq i32 %125, 0
  br i1 %.not89, label %128, label %127

127:                                              ; preds = %126
  invoke void @stacktrace_add(ptr noundef nonnull @.str, i64 noundef 612, i32 noundef %125)
          to label %136 unwind label %.loopexit.split-lp

128:                                              ; preds = %126
  %129 = load ptr, ptr %4, align 8, !tbaa !5
  invoke void @_ZN8StoreBag13setEncodedBagEPK12ByteArray_st(ptr noundef nonnull align 8 dereferenceable(120) %23, ptr noundef %129)
          to label %130 unwind label %.loopexit

130:                                              ; preds = %128
  store ptr null, ptr %4, align 8, !tbaa !5
  invoke void @_ZN8StoreBag12scanStdAttrsEv(ptr noundef nonnull align 8 dereferenceable(120) %23)
          to label %131 unwind label %.loopexit

131:                                              ; preds = %130
  invoke void @_ZN11FileStorage6addBagEPK8StoreBag(ptr noundef nonnull align 8 dereferenceable(152) %0, ptr noundef nonnull %23)
          to label %132 unwind label %.loopexit

132:                                              ; preds = %131
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %133 = load i32, ptr %14, align 8, !tbaa !9
  %134 = sext i32 %133 to i64
  %135 = icmp slt i64 %indvars.iv.next, %134
  br i1 %135, label %22, label %.thread105, !llvm.loop !35

136:                                              ; preds = %.invoke252, %.thread, %127, %121, %112, %49, %35
  %.370.ph = phi i32 [ %.269.ph, %.thread ], [ %125, %127 ], [ %119, %121 ], [ %110, %112 ], [ %47, %49 ], [ %33, %35 ], [ 1039, %.invoke252 ]
  call void @_ZN8StoreBagD1Ev(ptr noundef nonnull align 8 dereferenceable(120) %23) #8
  call void @_ZdlPvm(ptr noundef nonnull %23, i64 noundef 120) #10
  br label %.thread105

.thread105:                                       ; preds = %132, %.preheader, %19, %136
  %.5109 = phi i32 [ %.370.ph, %136 ], [ 2, %19 ], [ 0, %.preheader ], [ 0, %132 ]
  %137 = load ptr, ptr %6, align 8, !tbaa !5
  call void @free(ptr noundef %137) #8
  %138 = load ptr, ptr %4, align 8, !tbaa !5
  invoke void @ba_free(ptr noundef %138)
          to label %139 unwind label %20

139:                                              ; preds = %.thread105
  %140 = invoke ptr @get_SafeContents_desc()
          to label %141 unwind label %20

141:                                              ; preds = %139
  invoke void @asn_free(ptr noundef %140, ptr noundef %11)
          to label %142 unwind label %20

142:                                              ; preds = %141
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #8
  ret i32 %.5109

143:                                              ; preds = %.loopexit, %.loopexit.split-lp, %25, %27, %87, %20
  %.pn94 = phi { ptr, i32 } [ %21, %20 ], [ %26, %25 ], [ %28, %27 ], [ %lpad.phi120, %87 ], [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #8
  resume { ptr, i32 } %.pn94
}

declare ptr @get_SafeContents_desc() local_unnamed_addr #3

declare noundef i32 @_ZN7UapkiNS4Util11oidFromAsn1EPK21ASN__PRIMITIVE_TYPE_sRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef, ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #3

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

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

declare void @_ZN8StoreBag13setPbes2ParamEPKcS1_(ptr noundef nonnull align 8 dereferenceable(120), ptr noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN11FileStorage12checkHashOidEPKcS1_(ptr noundef, ptr noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN11FileStorage14checkCipherOidEPKcS1_(ptr noundef, ptr noundef) local_unnamed_addr #1 align 2

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

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

declare ptr @get_ANY_desc() local_unnamed_addr #3

declare zeroext i1 @oid_is_parent(ptr noundef, ptr noundef) local_unnamed_addr #3

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZN8StoreBag13bagAttributesEv(ptr noundef nonnull align 8 dereferenceable(120)) local_unnamed_addr #0 align 2

declare ptr @get_SafeBag_desc() local_unnamed_addr #3

declare void @_ZN8StoreBag13setEncodedBagEPK12ByteArray_st(ptr noundef nonnull align 8 dereferenceable(120), ptr noundef) local_unnamed_addr #3

attributes #0 = { 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 #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "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 "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nobuiltin nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nobuiltin allocsize(0) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #8 = { nounwind }
attributes #9 = { builtin allocsize(0) }
attributes #10 = { builtin nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !12, i64 8}
!10 = !{!"_ZTS12SafeContents", !11, i64 0, !13, i64 24}
!11 = !{!"_ZTSN12SafeContentsUt_E", !6, i64 0, !12, i64 8, !12, i64 12, !6, i64 16}
!12 = !{!"int", !7, i64 0}
!13 = !{!"_ZTS16asn_struct_ctx_s", !14, i64 0, !14, i64 2, !12, i64 4, !6, i64 8, !15, i64 16}
!14 = !{!"short", !7, i64 0}
!15 = !{!"long", !7, i64 0}
!16 = !{!10, !6, i64 0}
!17 = !{!18, !6, i64 128}
!18 = !{!"_ZTS11FileStorage", !6, i64 0, !19, i64 8, !21, i64 40, !21, i64 41, !19, i64 48, !21, i64 80, !22, i64 88, !6, i64 112, !26, i64 120}
!19 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !20, i64 0, !15, i64 8, !7, i64 16}
!20 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!21 = !{!"bool", !7, i64 0}
!22 = !{!"_ZTSSt6vectorIP8StoreBagSaIS1_EE", !23, i64 0}
!23 = !{!"_ZTSSt12_Vector_baseIP8StoreBagSaIS1_EE", !24, i64 0}
!24 = !{!"_ZTSNSt12_Vector_baseIP8StoreBagSaIS1_EE12_Vector_implE", !25, i64 0}
!25 = !{!"_ZTSNSt12_Vector_baseIP8StoreBagSaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!26 = !{!"_ZTS16FileStorageParam", !6, i64 0, !6, i64 8, !6, i64 16, !15, i64 24}
!27 = !{!18, !6, i64 120}
!28 = !{!21, !21, i64 0}
!29 = !{i8 0, i8 2}
!30 = !{}
!31 = !{!32, !6, i64 56}
!32 = !{!"_ZTS7SafeBag", !33, i64 0, !34, i64 16, !6, i64 56, !13, i64 64}
!33 = !{!"_ZTS21ASN__PRIMITIVE_TYPE_s", !6, i64 0, !12, i64 8}
!34 = !{!"_ZTS3ANY", !6, i64 0, !12, i64 8, !13, i64 16}
!35 = distinct !{!35, !36}
!36 = !{!"llvm.loop.mustprogress"}


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