; LLVM IR from specinfo-ua/UAPKI :: library/common/pkix (extension-helper-json)

; 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] }
%"class.UapkiNS::SmartBA" = type { ptr }
%struct.SubjectInfoAccess = type { %struct.anon, %struct.asn_struct_ctx_s }
%struct.anon = type { ptr, i32, i32, ptr }
%struct.asn_struct_ctx_s = type { i16, i16, i32, ptr, i64 }
%struct.AccessDescription = type { %struct.ASN__PRIMITIVE_TYPE_s, %struct.GeneralName, %struct.asn_struct_ctx_s }
%struct.ASN__PRIMITIVE_TYPE_s = type { ptr, i32 }
%struct.GeneralName = type { i32, %"union.GeneralName::GeneralName_u", %struct.asn_struct_ctx_s }
%"union.GeneralName::GeneralName_u" = type { %struct.ORAddress }
%struct.ORAddress = type { %struct.BuiltInStandardAttributes, ptr, ptr, %struct.asn_struct_ctx_s }
%struct.BuiltInStandardAttributes = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, %struct.asn_struct_ctx_s }
%struct.OCTET_STRING = type { ptr, i32, %struct.asn_struct_ctx_s }

@.str = external hidden unnamed_addr constant [38 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [19 x i8], align 1
@OID_PKIX_OCSP = external global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [5 x i8], align 1
@OID_PKIX_CaIssuers = external global ptr, align 8
@.str.3 = external hidden unnamed_addr constant [10 x i8], align 1
@OID_PKIX_TimeStamping = external global ptr, align 8
@.str.4 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [15 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN7UapkiNS15ExtensionHelper18DecodeToJsonObject18accessDescriptionsEPK12ByteArray_stP13json_object_t(ptr noundef %0, ptr noundef %1) #0 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 ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca %"class.std::__cxx11::basic_string", align 8
  %15 = alloca ptr, align 8
  %16 = alloca i32, align 4
  %17 = alloca %"class.UapkiNS::SmartBA", align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  store i32 0, ptr %6, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  store ptr null, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  store ptr null, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  store ptr null, ptr %9, align 8, !tbaa !5
  br label %18

18:                                               ; preds = %2
  %19 = call ptr @get_SubjectInfoAccess_desc()
  %20 = load ptr, ptr %4, align 8, !tbaa !5
  %21 = call ptr @asn_decode_ba_with_alloc(ptr noundef %19, ptr noundef %20)
  store ptr %21, ptr %7, align 8, !tbaa !5
  %22 = icmp eq ptr null, %21
  br i1 %22, label %23, label %25

23:                                               ; preds = %18
  store i32 2, ptr %6, align 4, !tbaa !9
  %24 = load i32, ptr %6, align 4, !tbaa !9
  call void @stacktrace_add(ptr noundef @.str, i64 noundef 167, i32 noundef %24)
  br label %286

25:                                               ; preds = %18
  br label %26

26:                                               ; preds = %25
  br label %27

27:                                               ; preds = %26
  %28 = load ptr, ptr %5, align 8, !tbaa !5
  %29 = call ptr @json_value_init_array()
  %30 = call i32 @json_object_set_value(ptr noundef %28, ptr noundef @.str.1, ptr noundef %29)
  %31 = icmp ne i32 %30, 0
  br i1 %31, label %32, label %33

32:                                               ; preds = %27
  store i32 4113, ptr %6, align 4, !tbaa !9
  br label %286

33:                                               ; preds = %27
  %34 = load ptr, ptr %5, align 8, !tbaa !5
  %35 = call ptr @json_object_get_array(ptr noundef %34, ptr noundef @.str.1)
  store ptr %35, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  store i32 0, ptr %10, align 4, !tbaa !9
  br label %36

36:                                               ; preds = %279, %33
  %37 = load i32, ptr %10, align 4, !tbaa !9
  %38 = load ptr, ptr %7, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct.SubjectInfoAccess, ptr %38, i32 0, i32 0
  %40 = getelementptr inbounds %struct.anon, ptr %39, i32 0, i32 1
  %41 = load i32, ptr %40, align 8, !tbaa !11
  %42 = icmp slt i32 %37, %41
  br i1 %42, label %44, label %43

43:                                               ; preds = %36
  store i32 5, ptr %11, align 4
  br label %283

44:                                               ; preds = %36
  %45 = load ptr, ptr %8, align 8, !tbaa !5
  %46 = call ptr @json_value_init_object()
  %47 = call i32 @json_array_append_value(ptr noundef %45, ptr noundef %46)
  %48 = icmp ne i32 %47, 0
  br i1 %48, label %49, label %50

49:                                               ; preds = %44
  store i32 4113, ptr %6, align 4, !tbaa !9
  store i32 4, ptr %11, align 4
  br label %283

50:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  %51 = load ptr, ptr %8, align 8, !tbaa !5
  %52 = load i32, ptr %10, align 4, !tbaa !9
  %53 = sext i32 %52 to i64
  %54 = call ptr @json_array_get_object(ptr noundef %51, i64 noundef %53)
  store ptr %54, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  %55 = load ptr, ptr %7, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.SubjectInfoAccess, ptr %55, i32 0, i32 0
  %57 = getelementptr inbounds %struct.anon, ptr %56, i32 0, i32 0
  %58 = load ptr, ptr %57, align 8, !tbaa !17
  %59 = load i32, ptr %10, align 4, !tbaa !9
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds ptr, ptr %58, i64 %60
  %62 = load ptr, ptr %61, align 8, !tbaa !5
  store ptr %62, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %14) #5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #5
  br label %63

63:                                               ; preds = %50
  %64 = load ptr, ptr %13, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct.AccessDescription, ptr %64, i32 0, i32 0
  %66 = invoke noundef i32 @_ZN7UapkiNS4Util11oidFromAsn1EPK21ASN__PRIMITIVE_TYPE_sRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef %65, ptr noundef nonnull align 8 dereferenceable(32) %14)
          to label %67 unwind label %73

67:                                               ; preds = %63
  store i32 %66, ptr %6, align 4, !tbaa !9
  %68 = load i32, ptr %6, align 4, !tbaa !9
  %69 = icmp ne i32 %68, 0
  br i1 %69, label %70, label %77

70:                                               ; preds = %67
  %71 = load i32, ptr %6, align 4, !tbaa !9
  invoke void @stacktrace_add(ptr noundef @.str, i64 noundef 178, i32 noundef %71)
          to label %72 unwind label %73

72:                                               ; preds = %70
  store i32 4, ptr %11, align 4
  br label %276

73:                                               ; preds = %214, %207, %201, %185, %173, %167, %160, %154, %138, %126, %120, %113, %107, %91, %79, %70, %63
  %74 = landingpad { ptr, i32 }
          cleanup
  %75 = extractvalue { ptr, i32 } %74, 0
  store ptr %75, ptr %15, align 8
  %76 = extractvalue { ptr, i32 } %74, 1
  store i32 %76, ptr %16, align 4
  br label %282

77:                                               ; preds = %67
  br label %78

78:                                               ; preds = %77
  br label %79

79:                                               ; preds = %78
  %80 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %14) #5
  %81 = load ptr, ptr @OID_PKIX_OCSP, align 8, !tbaa !5
  %82 = invoke zeroext i1 @oid_is_equal(ptr noundef %80, ptr noundef %81)
          to label %83 unwind label %73

83:                                               ; preds = %79
  br i1 %82, label %84, label %126

84:                                               ; preds = %83
  %85 = load ptr, ptr %13, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct.AccessDescription, ptr %85, i32 0, i32 1
  %87 = getelementptr inbounds %struct.GeneralName, ptr %86, i32 0, i32 0
  %88 = load i32, ptr %87, align 8, !tbaa !18
  %89 = icmp eq i32 %88, 7
  br i1 %89, label %90, label %126

90:                                               ; preds = %84
  br label %91

91:                                               ; preds = %90
  %92 = load ptr, ptr %13, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct.AccessDescription, ptr %92, i32 0, i32 1
  %94 = getelementptr inbounds %struct.GeneralName, ptr %93, i32 0, i32 1
  %95 = getelementptr inbounds %struct.OCTET_STRING, ptr %94, i32 0, i32 0
  %96 = load ptr, ptr %95, align 8, !tbaa !23
  %97 = load ptr, ptr %13, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct.AccessDescription, ptr %97, i32 0, i32 1
  %99 = getelementptr inbounds %struct.GeneralName, ptr %98, i32 0, i32 1
  %100 = getelementptr inbounds %struct.OCTET_STRING, ptr %99, i32 0, i32 1
  %101 = load i32, ptr %100, align 8, !tbaa !23
  %102 = sext i32 %101 to i64
  %103 = invoke noundef i32 @_ZN7UapkiNS4Util9pbufToStrEPKhmPPc(ptr noundef %96, i64 noundef %102, ptr noundef %9)
          to label %104 unwind label %73

104:                                              ; preds = %91
  store i32 %103, ptr %6, align 4, !tbaa !9
  %105 = load i32, ptr %6, align 4, !tbaa !9
  %106 = icmp ne i32 %105, 0
  br i1 %106, label %107, label %110

107:                                              ; preds = %104
  %108 = load i32, ptr %6, align 4, !tbaa !9
  invoke void @stacktrace_add(ptr noundef @.str, i64 noundef 185, i32 noundef %108)
          to label %109 unwind label %73

109:                                              ; preds = %107
  store i32 4, ptr %11, align 4
  br label %276

110:                                              ; preds = %104
  br label %111

111:                                              ; preds = %110
  br label %112

112:                                              ; preds = %111
  br label %113

113:                                              ; preds = %112
  %114 = load ptr, ptr %12, align 8, !tbaa !5
  %115 = load ptr, ptr %9, align 8, !tbaa !5
  %116 = invoke i32 @json_object_set_string(ptr noundef %114, ptr noundef @.str.2, ptr noundef %115)
          to label %117 unwind label %73

117:                                              ; preds = %113
  store i32 %116, ptr %6, align 4, !tbaa !9
  %118 = load i32, ptr %6, align 4, !tbaa !9
  %119 = icmp ne i32 %118, 0
  br i1 %119, label %120, label %123

120:                                              ; preds = %117
  %121 = load i32, ptr %6, align 4, !tbaa !9
  invoke void @stacktrace_add(ptr noundef @.str, i64 noundef 186, i32 noundef %121)
          to label %122 unwind label %73

122:                                              ; preds = %120
  store i32 4, ptr %11, align 4
  br label %276

123:                                              ; preds = %117
  br label %124

124:                                              ; preds = %123
  br label %125

125:                                              ; preds = %124
  br label %274

126:                                              ; preds = %84, %83
  %127 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %14) #5
  %128 = load ptr, ptr @OID_PKIX_CaIssuers, align 8, !tbaa !5
  %129 = invoke zeroext i1 @oid_is_equal(ptr noundef %127, ptr noundef %128)
          to label %130 unwind label %73

130:                                              ; preds = %126
  br i1 %129, label %131, label %173

131:                                              ; preds = %130
  %132 = load ptr, ptr %13, align 8, !tbaa !5
  %133 = getelementptr inbounds %struct.AccessDescription, ptr %132, i32 0, i32 1
  %134 = getelementptr inbounds %struct.GeneralName, ptr %133, i32 0, i32 0
  %135 = load i32, ptr %134, align 8, !tbaa !18
  %136 = icmp eq i32 %135, 7
  br i1 %136, label %137, label %173

137:                                              ; preds = %131
  br label %138

138:                                              ; preds = %137
  %139 = load ptr, ptr %13, align 8, !tbaa !5
  %140 = getelementptr inbounds %struct.AccessDescription, ptr %139, i32 0, i32 1
  %141 = getelementptr inbounds %struct.GeneralName, ptr %140, i32 0, i32 1
  %142 = getelementptr inbounds %struct.OCTET_STRING, ptr %141, i32 0, i32 0
  %143 = load ptr, ptr %142, align 8, !tbaa !23
  %144 = load ptr, ptr %13, align 8, !tbaa !5
  %145 = getelementptr inbounds %struct.AccessDescription, ptr %144, i32 0, i32 1
  %146 = getelementptr inbounds %struct.GeneralName, ptr %145, i32 0, i32 1
  %147 = getelementptr inbounds %struct.OCTET_STRING, ptr %146, i32 0, i32 1
  %148 = load i32, ptr %147, align 8, !tbaa !23
  %149 = sext i32 %148 to i64
  %150 = invoke noundef i32 @_ZN7UapkiNS4Util9pbufToStrEPKhmPPc(ptr noundef %143, i64 noundef %149, ptr noundef %9)
          to label %151 unwind label %73

151:                                              ; preds = %138
  store i32 %150, ptr %6, align 4, !tbaa !9
  %152 = load i32, ptr %6, align 4, !tbaa !9
  %153 = icmp ne i32 %152, 0
  br i1 %153, label %154, label %157

154:                                              ; preds = %151
  %155 = load i32, ptr %6, align 4, !tbaa !9
  invoke void @stacktrace_add(ptr noundef @.str, i64 noundef 191, i32 noundef %155)
          to label %156 unwind label %73

156:                                              ; preds = %154
  store i32 4, ptr %11, align 4
  br label %276

157:                                              ; preds = %151
  br label %158

158:                                              ; preds = %157
  br label %159

159:                                              ; preds = %158
  br label %160

160:                                              ; preds = %159
  %161 = load ptr, ptr %12, align 8, !tbaa !5
  %162 = load ptr, ptr %9, align 8, !tbaa !5
  %163 = invoke i32 @json_object_set_string(ptr noundef %161, ptr noundef @.str.3, ptr noundef %162)
          to label %164 unwind label %73

164:                                              ; preds = %160
  store i32 %163, ptr %6, align 4, !tbaa !9
  %165 = load i32, ptr %6, align 4, !tbaa !9
  %166 = icmp ne i32 %165, 0
  br i1 %166, label %167, label %170

167:                                              ; preds = %164
  %168 = load i32, ptr %6, align 4, !tbaa !9
  invoke void @stacktrace_add(ptr noundef @.str, i64 noundef 192, i32 noundef %168)
          to label %169 unwind label %73

169:                                              ; preds = %167
  store i32 4, ptr %11, align 4
  br label %276

170:                                              ; preds = %164
  br label %171

171:                                              ; preds = %170
  br label %172

172:                                              ; preds = %171
  br label %273

173:                                              ; preds = %131, %130
  %174 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %14) #5
  %175 = load ptr, ptr @OID_PKIX_TimeStamping, align 8, !tbaa !5
  %176 = invoke zeroext i1 @oid_is_equal(ptr noundef %174, ptr noundef %175)
          to label %177 unwind label %73

177:                                              ; preds = %173
  br i1 %176, label %178, label %220

178:                                              ; preds = %177
  %179 = load ptr, ptr %13, align 8, !tbaa !5
  %180 = getelementptr inbounds %struct.AccessDescription, ptr %179, i32 0, i32 1
  %181 = getelementptr inbounds %struct.GeneralName, ptr %180, i32 0, i32 0
  %182 = load i32, ptr %181, align 8, !tbaa !18
  %183 = icmp eq i32 %182, 7
  br i1 %183, label %184, label %220

184:                                              ; preds = %178
  br label %185

185:                                              ; preds = %184
  %186 = load ptr, ptr %13, align 8, !tbaa !5
  %187 = getelementptr inbounds %struct.AccessDescription, ptr %186, i32 0, i32 1
  %188 = getelementptr inbounds %struct.GeneralName, ptr %187, i32 0, i32 1
  %189 = getelementptr inbounds %struct.OCTET_STRING, ptr %188, i32 0, i32 0
  %190 = load ptr, ptr %189, align 8, !tbaa !23
  %191 = load ptr, ptr %13, align 8, !tbaa !5
  %192 = getelementptr inbounds %struct.AccessDescription, ptr %191, i32 0, i32 1
  %193 = getelementptr inbounds %struct.GeneralName, ptr %192, i32 0, i32 1
  %194 = getelementptr inbounds %struct.OCTET_STRING, ptr %193, i32 0, i32 1
  %195 = load i32, ptr %194, align 8, !tbaa !23
  %196 = sext i32 %195 to i64
  %197 = invoke noundef i32 @_ZN7UapkiNS4Util9pbufToStrEPKhmPPc(ptr noundef %190, i64 noundef %196, ptr noundef %9)
          to label %198 unwind label %73

198:                                              ; preds = %185
  store i32 %197, ptr %6, align 4, !tbaa !9
  %199 = load i32, ptr %6, align 4, !tbaa !9
  %200 = icmp ne i32 %199, 0
  br i1 %200, label %201, label %204

201:                                              ; preds = %198
  %202 = load i32, ptr %6, align 4, !tbaa !9
  invoke void @stacktrace_add(ptr noundef @.str, i64 noundef 197, i32 noundef %202)
          to label %203 unwind label %73

203:                                              ; preds = %201
  store i32 4, ptr %11, align 4
  br label %276

204:                                              ; preds = %198
  br label %205

205:                                              ; preds = %204
  br label %206

206:                                              ; preds = %205
  br label %207

207:                                              ; preds = %206
  %208 = load ptr, ptr %12, align 8, !tbaa !5
  %209 = load ptr, ptr %9, align 8, !tbaa !5
  %210 = invoke i32 @json_object_set_string(ptr noundef %208, ptr noundef @.str.4, ptr noundef %209)
          to label %211 unwind label %73

211:                                              ; preds = %207
  store i32 %210, ptr %6, align 4, !tbaa !9
  %212 = load i32, ptr %6, align 4, !tbaa !9
  %213 = icmp ne i32 %212, 0
  br i1 %213, label %214, label %217

214:                                              ; preds = %211
  %215 = load i32, ptr %6, align 4, !tbaa !9
  invoke void @stacktrace_add(ptr noundef @.str, i64 noundef 198, i32 noundef %215)
          to label %216 unwind label %73

216:                                              ; preds = %214
  store i32 4, ptr %11, align 4
  br label %276

217:                                              ; preds = %211
  br label %218

218:                                              ; preds = %217
  br label %219

219:                                              ; preds = %218
  br label %272

220:                                              ; preds = %178, %177
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  invoke void @_ZN7UapkiNS7SmartBAC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %17)
          to label %221 unwind label %236

221:                                              ; preds = %220
  br label %222

222:                                              ; preds = %221
  %223 = invoke ptr @get_GeneralName_desc()
          to label %224 unwind label %240

224:                                              ; preds = %222
  %225 = load ptr, ptr %13, align 8, !tbaa !5
  %226 = getelementptr inbounds %struct.AccessDescription, ptr %225, i32 0, i32 1
  %227 = invoke noundef ptr @_ZN7UapkiNS7SmartBAadEv(ptr noundef nonnull align 8 dereferenceable(8) %17)
          to label %228 unwind label %240

228:                                              ; preds = %224
  %229 = invoke i32 @asn_encode_ba(ptr noundef %223, ptr noundef %226, ptr noundef %227)
          to label %230 unwind label %240

230:                                              ; preds = %228
  store i32 %229, ptr %6, align 4, !tbaa !9
  %231 = load i32, ptr %6, align 4, !tbaa !9
  %232 = icmp ne i32 %231, 0
  br i1 %232, label %233, label %244

233:                                              ; preds = %230
  %234 = load i32, ptr %6, align 4, !tbaa !9
  invoke void @stacktrace_add(ptr noundef @.str, i64 noundef 202, i32 noundef %234)
          to label %235 unwind label %240

235:                                              ; preds = %233
  store i32 4, ptr %11, align 4
  br label %268

236:                                              ; preds = %220
  %237 = landingpad { ptr, i32 }
          cleanup
  %238 = extractvalue { ptr, i32 } %237, 0
  store ptr %238, ptr %15, align 8
  %239 = extractvalue { ptr, i32 } %237, 1
  store i32 %239, ptr %16, align 4
  br label %271

240:                                              ; preds = %262, %257, %254, %246, %233, %228, %224, %222
  %241 = landingpad { ptr, i32 }
          cleanup
  %242 = extractvalue { ptr, i32 } %241, 0
  store ptr %242, ptr %15, align 8
  %243 = extractvalue { ptr, i32 } %241, 1
  store i32 %243, ptr %16, align 4
  call void @_ZN7UapkiNS7SmartBAD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %17) #5
  br label %271

244:                                              ; preds = %230
  br label %245

245:                                              ; preds = %244
  br label %246

246:                                              ; preds = %245
  %247 = load ptr, ptr %12, align 8, !tbaa !5
  %248 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %14) #5
  %249 = invoke i32 @json_object_set_string(ptr noundef %247, ptr noundef @.str.5, ptr noundef %248)
          to label %250 unwind label %240

250:                                              ; preds = %246
  %251 = icmp ne i32 %249, 0
  br i1 %251, label %252, label %253

252:                                              ; preds = %250
  store i32 4113, ptr %6, align 4, !tbaa !9
  store i32 4, ptr %11, align 4
  br label %268

253:                                              ; preds = %250
  br label %254

254:                                              ; preds = %253
  %255 = load ptr, ptr %12, align 8, !tbaa !5
  %256 = invoke noundef ptr @_ZNK7UapkiNS7SmartBA3getEv(ptr noundef nonnull align 8 dereferenceable(8) %17)
          to label %257 unwind label %240

257:                                              ; preds = %254
  %258 = invoke i32 @json_object_set_base64(ptr noundef %255, ptr noundef @.str.6, ptr noundef %256)
          to label %259 unwind label %240

259:                                              ; preds = %257
  store i32 %258, ptr %6, align 4, !tbaa !9
  %260 = load i32, ptr %6, align 4, !tbaa !9
  %261 = icmp ne i32 %260, 0
  br i1 %261, label %262, label %265

262:                                              ; preds = %259
  %263 = load i32, ptr %6, align 4, !tbaa !9
  invoke void @stacktrace_add(ptr noundef @.str, i64 noundef 204, i32 noundef %263)
          to label %264 unwind label %240

264:                                              ; preds = %262
  store i32 4, ptr %11, align 4
  br label %268

265:                                              ; preds = %259
  br label %266

266:                                              ; preds = %265
  br label %267

267:                                              ; preds = %266
  store i32 0, ptr %11, align 4
  br label %268

268:                                              ; preds = %267, %264, %252, %235
  call void @_ZN7UapkiNS7SmartBAD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %17) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  %269 = load i32, ptr %11, align 4
  switch i32 %269, label %276 [
    i32 0, label %270
  ]

270:                                              ; preds = %268
  br label %272

271:                                              ; preds = %240, %236
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  br label %282

272:                                              ; preds = %270, %219
  br label %273

273:                                              ; preds = %272, %172
  br label %274

274:                                              ; preds = %273, %125
  %275 = load ptr, ptr %9, align 8, !tbaa !5
  call void @free(ptr noundef %275) #5
  store ptr null, ptr %9, align 8, !tbaa !5
  store i32 0, ptr %11, align 4
  br label %276

276:                                              ; preds = %274, %268, %216, %203, %169, %156, %122, %109, %72
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  %277 = load i32, ptr %11, align 4
  switch i32 %277, label %283 [
    i32 0, label %278
  ]

278:                                              ; preds = %276
  br label %279

279:                                              ; preds = %278
  %280 = load i32, ptr %10, align 4, !tbaa !9
  %281 = add nsw i32 %280, 1
  store i32 %281, ptr %10, align 4, !tbaa !9
  br label %36, !llvm.loop !24

282:                                              ; preds = %271, %73
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  br label %293

283:                                              ; preds = %276, %49, %43
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  %284 = load i32, ptr %11, align 4
  switch i32 %284, label %291 [
    i32 5, label %285
    i32 4, label %286
  ]

285:                                              ; preds = %283
  br label %286

286:                                              ; preds = %285, %283, %32, %23
  %287 = call ptr @get_SubjectInfoAccess_desc()
  %288 = load ptr, ptr %7, align 8, !tbaa !5
  call void @asn_free(ptr noundef %287, ptr noundef %288)
  %289 = load ptr, ptr %9, align 8, !tbaa !5
  call void @free(ptr noundef %289) #5
  %290 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %290, ptr %3, align 4
  store i32 1, ptr %11, align 4
  br label %291

291:                                              ; preds = %286, %283
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  %292 = load i32, ptr %3, align 4
  ret i32 %292

293:                                              ; preds = %282
  %294 = load ptr, ptr %15, align 8
  %295 = load i32, ptr %16, align 4
  %296 = insertvalue { ptr, i32 } poison, ptr %294, 0
  %297 = insertvalue { ptr, i32 } %296, i32 %295, 1
  resume { ptr, i32 } %297
}

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

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

declare ptr @get_SubjectInfoAccess_desc() #2

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

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

declare ptr @json_value_init_array() #2

declare ptr @json_object_get_array(ptr noundef, ptr noundef) #2

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

declare ptr @json_value_init_object() #2

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

declare noundef i32 @_ZN7UapkiNS4Util9pbufToStrEPKhmPPc(ptr noundef, i64 noundef, ptr noundef) #2

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

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

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

declare ptr @get_GeneralName_desc() #2

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

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

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

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

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

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

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

declare void @asn_free(ptr noundef, ptr noundef) #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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 = { 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 = !{!"_ZTS17SubjectInfoAccess", !13, i64 0, !14, i64 24}
!13 = !{!"_ZTSN17SubjectInfoAccessUt_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, !22, i64 16}
!19 = !{!"_ZTS17AccessDescription", !20, i64 0, !21, i64 16, !14, i64 184}
!20 = !{!"_ZTS21ASN__PRIMITIVE_TYPE_s", !6, i64 0, !10, i64 8}
!21 = !{!"_ZTS11GeneralName", !22, i64 0, !7, i64 8, !14, i64 144}
!22 = !{!"_ZTS14GeneralName_PR", !7, i64 0}
!23 = !{!7, !7, i64 0}
!24 = distinct !{!24, !25}
!25 = !{!"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] }
%"class.UapkiNS::SmartBA" = type { ptr }

@.str = external hidden unnamed_addr constant [38 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [19 x i8], align 1
@OID_PKIX_OCSP = external local_unnamed_addr global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [5 x i8], align 1
@OID_PKIX_CaIssuers = external local_unnamed_addr global ptr, align 8
@.str.3 = external hidden unnamed_addr constant [10 x i8], align 1
@OID_PKIX_TimeStamping = external local_unnamed_addr global ptr, align 8
@.str.4 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [15 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN7UapkiNS15ExtensionHelper18DecodeToJsonObject18accessDescriptionsEPK12ByteArray_stP13json_object_t(ptr noundef %0, ptr noundef %1) local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca %"class.std::__cxx11::basic_string", align 8
  %5 = alloca %"class.UapkiNS::SmartBA", align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #5
  store ptr null, ptr %3, align 8, !tbaa !5
  %6 = tail call ptr @get_SubjectInfoAccess_desc()
  %7 = tail call ptr @asn_decode_ba_with_alloc(ptr noundef %6, ptr noundef %0)
  %8 = icmp eq ptr %7, null
  br i1 %8, label %9, label %10

9:                                                ; preds = %2
  tail call void @stacktrace_add(ptr noundef nonnull @.str, i64 noundef 167, i32 noundef 2)
  br label %.loopexit

10:                                               ; preds = %2
  %11 = tail call ptr @json_value_init_array()
  %12 = tail call i32 @json_object_set_value(ptr noundef %1, ptr noundef nonnull @.str.1, ptr noundef %11)
  %.not = icmp eq i32 %12, 0
  br i1 %.not, label %13, label %.loopexit

13:                                               ; preds = %10
  %14 = tail call ptr @json_object_get_array(ptr noundef %1, ptr noundef nonnull @.str.1)
  %15 = getelementptr inbounds i8, ptr %7, i64 8
  %16 = load i32, ptr %15, align 8, !tbaa !9
  %17 = icmp sgt i32 %16, 0
  br i1 %17, label %.lr.ph, label %.loopexit

.lr.ph:                                           ; preds = %13, %116
  %indvars.iv = phi i64 [ %indvars.iv.next, %116 ], [ 0, %13 ]
  %18 = call ptr @json_value_init_object()
  %19 = call i32 @json_array_append_value(ptr noundef %14, ptr noundef %18)
  %.not75 = icmp eq i32 %19, 0
  br i1 %.not75, label %20, label %.loopexit

20:                                               ; preds = %.lr.ph
  %21 = call ptr @json_array_get_object(ptr noundef %14, i64 noundef %indvars.iv)
  %22 = load ptr, ptr %7, align 8, !tbaa !16
  %23 = getelementptr inbounds ptr, ptr %22, i64 %indvars.iv
  %24 = load ptr, ptr %23, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #5
  %25 = invoke noundef i32 @_ZN7UapkiNS4Util11oidFromAsn1EPK21ASN__PRIMITIVE_TYPE_sRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef %24, ptr noundef nonnull align 8 dereferenceable(32) %4)
          to label %26 unwind label %.loopexit95

26:                                               ; preds = %20
  %.not76 = icmp eq i32 %25, 0
  br i1 %.not76, label %28, label %27

27:                                               ; preds = %26
  invoke void @stacktrace_add(ptr noundef nonnull @.str, i64 noundef 178, i32 noundef %25)
          to label %.thread91 unwind label %.loopexit.split-lp

.loopexit95:                                      ; preds = %20, %28, %37, %46, %51, %60, %69, %74, %83, %92
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %121

.loopexit.split-lp:                               ; preds = %27, %45, %50, %68, %73, %91, %96
  %lpad.loopexit.split-lp = landingpad { ptr, i32 }
          cleanup
  br label %121

28:                                               ; preds = %26
  %29 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %4) #5
  %30 = load ptr, ptr @OID_PKIX_OCSP, align 8, !tbaa !5
  %31 = invoke zeroext i1 @oid_is_equal(ptr noundef %29, ptr noundef %30)
          to label %32 unwind label %.loopexit95

32:                                               ; preds = %28
  br i1 %31, label %33, label %51

33:                                               ; preds = %32
  %34 = getelementptr inbounds i8, ptr %24, i64 16
  %35 = load i32, ptr %34, align 8, !tbaa !17
  %36 = icmp eq i32 %35, 7
  br i1 %36, label %37, label %51

37:                                               ; preds = %33
  %38 = getelementptr inbounds i8, ptr %24, i64 24
  %39 = load ptr, ptr %38, align 8, !tbaa !22
  %40 = getelementptr inbounds i8, ptr %24, i64 32
  %41 = load i32, ptr %40, align 8, !tbaa !22
  %42 = sext i32 %41 to i64
  %43 = invoke noundef i32 @_ZN7UapkiNS4Util9pbufToStrEPKhmPPc(ptr noundef %39, i64 noundef %42, ptr noundef nonnull %3)
          to label %44 unwind label %.loopexit95

44:                                               ; preds = %37
  %.not84 = icmp eq i32 %43, 0
  br i1 %.not84, label %46, label %45

45:                                               ; preds = %44
  invoke void @stacktrace_add(ptr noundef nonnull @.str, i64 noundef 185, i32 noundef %43)
          to label %.thread91 unwind label %.loopexit.split-lp

46:                                               ; preds = %44
  %47 = load ptr, ptr %3, align 8, !tbaa !5
  %48 = invoke i32 @json_object_set_string(ptr noundef %21, ptr noundef nonnull @.str.2, ptr noundef %47)
          to label %49 unwind label %.loopexit95

49:                                               ; preds = %46
  %.not85 = icmp eq i32 %48, 0
  br i1 %.not85, label %116, label %50

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

51:                                               ; preds = %33, %32
  %52 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %4) #5
  %53 = load ptr, ptr @OID_PKIX_CaIssuers, align 8, !tbaa !5
  %54 = invoke zeroext i1 @oid_is_equal(ptr noundef %52, ptr noundef %53)
          to label %55 unwind label %.loopexit95

55:                                               ; preds = %51
  br i1 %54, label %56, label %74

56:                                               ; preds = %55
  %57 = getelementptr inbounds i8, ptr %24, i64 16
  %58 = load i32, ptr %57, align 8, !tbaa !17
  %59 = icmp eq i32 %58, 7
  br i1 %59, label %60, label %74

60:                                               ; preds = %56
  %61 = getelementptr inbounds i8, ptr %24, i64 24
  %62 = load ptr, ptr %61, align 8, !tbaa !22
  %63 = getelementptr inbounds i8, ptr %24, i64 32
  %64 = load i32, ptr %63, align 8, !tbaa !22
  %65 = sext i32 %64 to i64
  %66 = invoke noundef i32 @_ZN7UapkiNS4Util9pbufToStrEPKhmPPc(ptr noundef %62, i64 noundef %65, ptr noundef nonnull %3)
          to label %67 unwind label %.loopexit95

67:                                               ; preds = %60
  %.not82 = icmp eq i32 %66, 0
  br i1 %.not82, label %69, label %68

68:                                               ; preds = %67
  invoke void @stacktrace_add(ptr noundef nonnull @.str, i64 noundef 191, i32 noundef %66)
          to label %.thread91 unwind label %.loopexit.split-lp

69:                                               ; preds = %67
  %70 = load ptr, ptr %3, align 8, !tbaa !5
  %71 = invoke i32 @json_object_set_string(ptr noundef %21, ptr noundef nonnull @.str.3, ptr noundef %70)
          to label %72 unwind label %.loopexit95

72:                                               ; preds = %69
  %.not83 = icmp eq i32 %71, 0
  br i1 %.not83, label %116, label %73

73:                                               ; preds = %72
  invoke void @stacktrace_add(ptr noundef nonnull @.str, i64 noundef 192, i32 noundef %71)
          to label %.thread91 unwind label %.loopexit.split-lp

74:                                               ; preds = %56, %55
  %75 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %4) #5
  %76 = load ptr, ptr @OID_PKIX_TimeStamping, align 8, !tbaa !5
  %77 = invoke zeroext i1 @oid_is_equal(ptr noundef %75, ptr noundef %76)
          to label %78 unwind label %.loopexit95

78:                                               ; preds = %74
  br i1 %77, label %79, label %97

79:                                               ; preds = %78
  %80 = getelementptr inbounds i8, ptr %24, i64 16
  %81 = load i32, ptr %80, align 8, !tbaa !17
  %82 = icmp eq i32 %81, 7
  br i1 %82, label %83, label %97

83:                                               ; preds = %79
  %84 = getelementptr inbounds i8, ptr %24, i64 24
  %85 = load ptr, ptr %84, align 8, !tbaa !22
  %86 = getelementptr inbounds i8, ptr %24, i64 32
  %87 = load i32, ptr %86, align 8, !tbaa !22
  %88 = sext i32 %87 to i64
  %89 = invoke noundef i32 @_ZN7UapkiNS4Util9pbufToStrEPKhmPPc(ptr noundef %85, i64 noundef %88, ptr noundef nonnull %3)
          to label %90 unwind label %.loopexit95

90:                                               ; preds = %83
  %.not80 = icmp eq i32 %89, 0
  br i1 %.not80, label %92, label %91

91:                                               ; preds = %90
  invoke void @stacktrace_add(ptr noundef nonnull @.str, i64 noundef 197, i32 noundef %89)
          to label %.thread91 unwind label %.loopexit.split-lp

92:                                               ; preds = %90
  %93 = load ptr, ptr %3, align 8, !tbaa !5
  %94 = invoke i32 @json_object_set_string(ptr noundef %21, ptr noundef nonnull @.str.4, ptr noundef %93)
          to label %95 unwind label %.loopexit95

95:                                               ; preds = %92
  %.not81 = icmp eq i32 %94, 0
  br i1 %.not81, label %116, label %96

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

97:                                               ; preds = %79, %78
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #5
  call void @_ZN7UapkiNS7SmartBAC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %5)
  %98 = invoke ptr @get_GeneralName_desc()
          to label %99 unwind label %.loopexit96

99:                                               ; preds = %97
  %100 = getelementptr inbounds i8, ptr %24, i64 16
  %101 = call noundef ptr @_ZN7UapkiNS7SmartBAadEv(ptr noundef nonnull align 8 dereferenceable(8) %5)
  %102 = invoke i32 @asn_encode_ba(ptr noundef %98, ptr noundef nonnull %100, ptr noundef %101)
          to label %103 unwind label %.loopexit96

103:                                              ; preds = %99
  %.not77 = icmp eq i32 %102, 0
  br i1 %.not77, label %106, label %104

104:                                              ; preds = %103
  invoke void @stacktrace_add(ptr noundef nonnull @.str, i64 noundef 202, i32 noundef %102)
          to label %.thread unwind label %.loopexit.split-lp97

.loopexit96:                                      ; preds = %97, %99, %106, %110
  %lpad.loopexit98 = landingpad { ptr, i32 }
          cleanup
  br label %105

.loopexit.split-lp97:                             ; preds = %104, %114
  %lpad.loopexit.split-lp99 = landingpad { ptr, i32 }
          cleanup
  br label %105

105:                                              ; preds = %.loopexit.split-lp97, %.loopexit96
  %lpad.phi100 = phi { ptr, i32 } [ %lpad.loopexit98, %.loopexit96 ], [ %lpad.loopexit.split-lp99, %.loopexit.split-lp97 ]
  call void @_ZN7UapkiNS7SmartBAD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  br label %121

106:                                              ; preds = %103
  %107 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %4) #5
  %108 = invoke i32 @json_object_set_string(ptr noundef %21, ptr noundef nonnull @.str.5, ptr noundef %107)
          to label %109 unwind label %.loopexit96

109:                                              ; preds = %106
  %.not78 = icmp eq i32 %108, 0
  br i1 %.not78, label %110, label %.thread

110:                                              ; preds = %109
  %111 = call noundef ptr @_ZNK7UapkiNS7SmartBA3getEv(ptr noundef nonnull align 8 dereferenceable(8) %5)
  %112 = invoke i32 @json_object_set_base64(ptr noundef %21, ptr noundef nonnull @.str.6, ptr noundef %111)
          to label %113 unwind label %.loopexit96

113:                                              ; preds = %110
  %.not79 = icmp eq i32 %112, 0
  br i1 %.not79, label %115, label %114

114:                                              ; preds = %113
  invoke void @stacktrace_add(ptr noundef nonnull @.str, i64 noundef 204, i32 noundef %112)
          to label %.thread unwind label %.loopexit.split-lp97

.thread:                                          ; preds = %109, %104, %114
  %.1.ph = phi i32 [ %112, %114 ], [ %102, %104 ], [ 4113, %109 ]
  call void @_ZN7UapkiNS7SmartBAD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  br label %.thread91

115:                                              ; preds = %113
  call void @_ZN7UapkiNS7SmartBAD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  br label %116

.thread91:                                        ; preds = %27, %45, %50, %68, %73, %91, %96, %.thread
  %.3.ph = phi i32 [ %.1.ph, %.thread ], [ %94, %96 ], [ %89, %91 ], [ %71, %73 ], [ %66, %68 ], [ %48, %50 ], [ %43, %45 ], [ %25, %27 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #5
  br label %.loopexit

116:                                              ; preds = %115, %72, %95, %49
  %117 = load ptr, ptr %3, align 8, !tbaa !5
  call void @free(ptr noundef %117) #5
  store ptr null, ptr %3, align 8, !tbaa !5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %118 = load i32, ptr %15, align 8, !tbaa !9
  %119 = sext i32 %118 to i64
  %120 = icmp slt i64 %indvars.iv.next, %119
  br i1 %120, label %.lr.ph, label %.loopexit, !llvm.loop !23

121:                                              ; preds = %.loopexit95, %.loopexit.split-lp, %105
  %.pn = phi { ptr, i32 } [ %lpad.phi100, %105 ], [ %lpad.loopexit, %.loopexit95 ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #5
  resume { ptr, i32 } %.pn

.loopexit:                                        ; preds = %.lr.ph, %116, %13, %.thread91, %10, %9
  %.5 = phi i32 [ 2, %9 ], [ 4113, %10 ], [ %.3.ph, %.thread91 ], [ 0, %13 ], [ 4113, %.lr.ph ], [ 0, %116 ]
  %122 = call ptr @get_SubjectInfoAccess_desc()
  call void @asn_free(ptr noundef %122, ptr noundef %7)
  %123 = load ptr, ptr %3, align 8, !tbaa !5
  call void @free(ptr noundef %123) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #5
  ret i32 %.5
}

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

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

declare ptr @get_SubjectInfoAccess_desc() local_unnamed_addr #2

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

declare i32 @json_object_set_value(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

declare ptr @json_value_init_array() local_unnamed_addr #2

declare ptr @json_object_get_array(ptr noundef, ptr noundef) local_unnamed_addr #2

declare i32 @json_array_append_value(ptr noundef, ptr noundef) local_unnamed_addr #2

declare ptr @json_value_init_object() local_unnamed_addr #2

declare ptr @json_array_get_object(ptr noundef, i64 noundef) local_unnamed_addr #2

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

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

declare i32 @__gxx_personality_v0(...)

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

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

declare noundef i32 @_ZN7UapkiNS4Util9pbufToStrEPKhmPPc(ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #2

declare i32 @json_object_set_string(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

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

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

declare ptr @get_GeneralName_desc() local_unnamed_addr #2

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

declare i32 @json_object_set_base64(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

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

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

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

; 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: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #3 align 2

declare void @asn_free(ptr noundef, ptr noundef) local_unnamed_addr #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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 }

!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 = !{!"_ZTS17SubjectInfoAccess", !11, i64 0, !13, i64 24}
!11 = !{!"_ZTSN17SubjectInfoAccessUt_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, !21, i64 16}
!18 = !{!"_ZTS17AccessDescription", !19, i64 0, !20, i64 16, !13, i64 184}
!19 = !{!"_ZTS21ASN__PRIMITIVE_TYPE_s", !6, i64 0, !12, i64 8}
!20 = !{!"_ZTS11GeneralName", !21, i64 0, !7, i64 8, !13, i64 144}
!21 = !{!"_ZTS14GeneralName_PR", !7, i64 0}
!22 = !{!7, !7, i64 0}
!23 = distinct !{!23, !24}
!24 = !{!"llvm.loop.mustprogress"}


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