; LLVM IR from specinfo-ua/UAPKI :: library/uapki/src/api (asn1-decode)

; 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.UapkiNS::SmartBA" = type { ptr }
%"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] }

@.str = external hidden unnamed_addr constant [6 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [6 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local i32 @uapki_asn1_decode(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 i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca i32, align 4
  %13 = alloca ptr, align 8
  %14 = alloca %"class.UapkiNS::SmartBA", align 8
  %15 = alloca %"class.std::__cxx11::basic_string", align 8
  %16 = alloca ptr, align 8
  %17 = alloca i32, align 4
  %18 = alloca %"class.std::__cxx11::basic_string", align 8
  %19 = alloca %"class.std::__cxx11::basic_string", align 8
  %20 = alloca i8, align 1
  %21 = alloca ptr, 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) #4
  store i32 0, ptr %6, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  %22 = load ptr, ptr %4, align 8, !tbaa !5
  %23 = call ptr @json_object_get_array(ptr noundef %22, ptr noundef @.str)
  store ptr %23, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  store ptr null, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  store ptr null, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  %24 = load ptr, ptr %7, align 8, !tbaa !5
  %25 = call i64 @json_array_get_count(ptr noundef %24)
  store i64 %25, ptr %10, align 8, !tbaa !11
  %26 = load i64, ptr %10, align 8, !tbaa !11
  %27 = icmp eq i64 %26, 0
  br i1 %27, label %28, label %33

28:                                               ; preds = %2
  br label %29

29:                                               ; preds = %28
  store i32 4101, ptr %6, align 4, !tbaa !9
  %30 = load i32, ptr %6, align 4, !tbaa !9
  call void @stacktrace_create(ptr noundef @.str.1, i64 noundef 324, i32 noundef %30, ptr noundef null)
  br label %242

31:                                               ; No predecessors!
  br label %32

32:                                               ; preds = %31
  br label %33

33:                                               ; preds = %32, %2
  %34 = load ptr, ptr %5, align 8, !tbaa !5
  %35 = call ptr @json_value_init_array()
  %36 = call i32 @json_object_set_value(ptr noundef %34, ptr noundef @.str.2, ptr noundef %35)
  %37 = icmp ne i32 %36, 0
  br i1 %37, label %38, label %39

38:                                               ; preds = %33
  store i32 4113, ptr %6, align 4, !tbaa !9
  br label %242

39:                                               ; preds = %33
  %40 = load ptr, ptr %5, align 8, !tbaa !5
  %41 = call ptr @json_object_get_array(ptr noundef %40, ptr noundef @.str.2)
  store ptr %41, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  store i64 0, ptr %11, align 8, !tbaa !11
  br label %42

42:                                               ; preds = %235, %39
  %43 = load i64, ptr %11, align 8, !tbaa !11
  %44 = load i64, ptr %10, align 8, !tbaa !11
  %45 = icmp ult i64 %43, %44
  br i1 %45, label %47, label %46

46:                                               ; preds = %42
  store i32 5, ptr %12, align 4
  br label %239

47:                                               ; preds = %42
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  store ptr null, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  call void @_ZN7UapkiNS7SmartBAC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %14)
  call void @llvm.lifetime.start.p0(i64 32, ptr %15) #4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #4
  %48 = load ptr, ptr %8, align 8, !tbaa !5
  %49 = invoke ptr @json_value_init_object()
          to label %50 unwind label %55

50:                                               ; preds = %47
  %51 = invoke i32 @json_array_append_value(ptr noundef %48, ptr noundef %49)
          to label %52 unwind label %55

52:                                               ; preds = %50
  %53 = icmp ne i32 %51, 0
  br i1 %53, label %54, label %59

54:                                               ; preds = %52
  store i32 4113, ptr %6, align 4, !tbaa !9
  store i32 4, ptr %12, align 4
  br label %232

55:                                               ; preds = %227, %82, %72, %70, %67, %63, %59, %50, %47
  %56 = landingpad { ptr, i32 }
          cleanup
  %57 = extractvalue { ptr, i32 } %56, 0
  store ptr %57, ptr %16, align 8
  %58 = extractvalue { ptr, i32 } %56, 1
  store i32 %58, ptr %17, align 4
  br label %238

59:                                               ; preds = %52
  %60 = load ptr, ptr %8, align 8, !tbaa !5
  %61 = load i64, ptr %11, align 8, !tbaa !11
  %62 = invoke ptr @json_array_get_object(ptr noundef %60, i64 noundef %61)
          to label %63 unwind label %55

63:                                               ; preds = %59
  store ptr %62, ptr %9, align 8, !tbaa !5
  %64 = load ptr, ptr %7, align 8, !tbaa !5
  %65 = load i64, ptr %11, align 8, !tbaa !11
  %66 = invoke ptr @json_array_get_object(ptr noundef %64, i64 noundef %65)
          to label %67 unwind label %55

67:                                               ; preds = %63
  store ptr %66, ptr %13, align 8, !tbaa !5
  %68 = load ptr, ptr %13, align 8, !tbaa !5
  %69 = invoke ptr @json_object_get_base64(ptr noundef %68, ptr noundef @.str.3)
          to label %70 unwind label %55

70:                                               ; preds = %67
  %71 = invoke noundef zeroext i1 @_ZN7UapkiNS7SmartBA3setEP12ByteArray_st(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef %69)
          to label %72 unwind label %55

72:                                               ; preds = %70
  %73 = invoke noundef i64 @_ZNK7UapkiNS7SmartBA4sizeEv(ptr noundef nonnull align 8 dereferenceable(8) %14)
          to label %74 unwind label %55

74:                                               ; preds = %72
  %75 = icmp uge i64 %73, 2
  %76 = zext i1 %75 to i64
  %77 = select i1 %75, i32 0, i32 4101
  store i32 %77, ptr %6, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 32, ptr %18) #4
  %78 = load ptr, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %19) #4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #4
  invoke void @_ZN12ParsonHelper19jsonObjectGetStringEP13json_object_tPKcRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %18, ptr noundef %78, ptr noundef @.str.4, ptr noundef nonnull align 8 dereferenceable(32) %19)
          to label %79 unwind label %89

79:                                               ; preds = %74
  %80 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(32) %15, ptr noundef nonnull align 8 dereferenceable(32) %18) #4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %18) #4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %18) #4
  %81 = call noundef zeroext i1 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32) %15) #4
  br i1 %81, label %94, label %82

82:                                               ; preds = %79
  %83 = load ptr, ptr %9, align 8, !tbaa !5
  %84 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %15) #4
  %85 = invoke i32 @json_object_set_string(ptr noundef %83, ptr noundef @.str.4, ptr noundef %84)
          to label %86 unwind label %55

86:                                               ; preds = %82
  %87 = icmp ne i32 %85, 0
  br i1 %87, label %88, label %93

88:                                               ; preds = %86
  store i32 4113, ptr %6, align 4, !tbaa !9
  store i32 4, ptr %12, align 4
  br label %232

89:                                               ; preds = %74
  %90 = landingpad { ptr, i32 }
          cleanup
  %91 = extractvalue { ptr, i32 } %90, 0
  store ptr %91, ptr %16, align 8
  %92 = extractvalue { ptr, i32 } %90, 1
  store i32 %92, ptr %17, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %18) #4
  br label %238

93:                                               ; preds = %86
  br label %94

94:                                               ; preds = %93, %79
  %95 = load i32, ptr %6, align 4, !tbaa !9
  %96 = icmp eq i32 %95, 0
  br i1 %96, label %97, label %224

97:                                               ; preds = %94
  call void @llvm.lifetime.start.p0(i64 1, ptr %20) #4
  store i8 0, ptr %20, align 1, !tbaa !13
  %98 = invoke noundef ptr @_ZNK7UapkiNS7SmartBA3getEv(ptr noundef nonnull align 8 dereferenceable(8) %14)
          to label %99 unwind label %114

99:                                               ; preds = %97
  %100 = invoke i32 @ba_get_byte(ptr noundef %98, i64 noundef 0, ptr noundef %20)
          to label %101 unwind label %114

101:                                              ; preds = %99
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #4
  %102 = load i8, ptr %20, align 1, !tbaa !13
  %103 = invoke noundef ptr @_ZL16asn1_tag_to_nameh(i8 noundef zeroext %102)
          to label %104 unwind label %118

104:                                              ; preds = %101
  store ptr %103, ptr %21, align 8, !tbaa !5
  %105 = load ptr, ptr %21, align 8, !tbaa !5
  %106 = icmp ne ptr %105, null
  br i1 %106, label %107, label %123

107:                                              ; preds = %104
  %108 = load ptr, ptr %9, align 8, !tbaa !5
  %109 = load ptr, ptr %21, align 8, !tbaa !5
  %110 = invoke i32 @json_object_set_string(ptr noundef %108, ptr noundef @.str.5, ptr noundef %109)
          to label %111 unwind label %118

111:                                              ; preds = %107
  %112 = icmp ne i32 %110, 0
  br i1 %112, label %113, label %122

113:                                              ; preds = %111
  store i32 4113, ptr %6, align 4, !tbaa !9
  store i32 4, ptr %12, align 4
  br label %220

114:                                              ; preds = %99, %97
  %115 = landingpad { ptr, i32 }
          cleanup
  %116 = extractvalue { ptr, i32 } %115, 0
  store ptr %116, ptr %16, align 8
  %117 = extractvalue { ptr, i32 } %115, 1
  store i32 %117, ptr %17, align 4
  br label %223

118:                                              ; preds = %215, %213, %209, %207, %203, %201, %197, %195, %193, %189, %187, %185, %181, %179, %177, %173, %171, %167, %165, %161, %159, %155, %153, %149, %147, %143, %141, %137, %135, %123, %107, %101
  %119 = landingpad { ptr, i32 }
          cleanup
  %120 = extractvalue { ptr, i32 } %119, 0
  store ptr %120, ptr %16, align 8
  %121 = extractvalue { ptr, i32 } %119, 1
  store i32 %121, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #4
  br label %223

122:                                              ; preds = %111
  br label %132

123:                                              ; preds = %104
  %124 = load ptr, ptr %9, align 8, !tbaa !5
  %125 = load i8, ptr %20, align 1, !tbaa !13
  %126 = zext i8 %125 to i32
  %127 = invoke noundef i32 @_ZN12ParsonHelper19jsonObjectSetUint32EP13json_object_tPKcj(ptr noundef %124, ptr noundef @.str.5, i32 noundef %126)
          to label %128 unwind label %118

128:                                              ; preds = %123
  %129 = icmp ne i32 %127, 0
  br i1 %129, label %130, label %131

130:                                              ; preds = %128
  store i32 4113, ptr %6, align 4, !tbaa !9
  store i32 4, ptr %12, align 4
  br label %220

131:                                              ; preds = %128
  br label %132

132:                                              ; preds = %131, %122
  %133 = load i8, ptr %20, align 1, !tbaa !13
  %134 = zext i8 %133 to i32
  switch i32 %134, label %219 [
    i32 1, label %135
    i32 2, label %141
    i32 3, label %147
    i32 4, label %153
    i32 5, label %159
    i32 6, label %165
    i32 10, label %171
    i32 12, label %177
    i32 19, label %185
    i32 22, label %193
    i32 23, label %201
    i32 24, label %207
    i32 30, label %213
  ]

135:                                              ; preds = %132
  %136 = invoke noundef ptr @_ZNK7UapkiNS7SmartBA3getEv(ptr noundef nonnull align 8 dereferenceable(8) %14)
          to label %137 unwind label %118

137:                                              ; preds = %135
  %138 = load ptr, ptr %9, align 8, !tbaa !5
  %139 = invoke noundef i32 @_ZL19asn1_decode_booleanPK12ByteArray_stP13json_object_t(ptr noundef %136, ptr noundef %138)
          to label %140 unwind label %118

140:                                              ; preds = %137
  store i32 %139, ptr %6, align 4, !tbaa !9
  br label %219

141:                                              ; preds = %132
  %142 = invoke noundef ptr @_ZNK7UapkiNS7SmartBA3getEv(ptr noundef nonnull align 8 dereferenceable(8) %14)
          to label %143 unwind label %118

143:                                              ; preds = %141
  %144 = load ptr, ptr %9, align 8, !tbaa !5
  %145 = invoke noundef i32 @_ZL19asn1_decode_integerPK12ByteArray_stP13json_object_t(ptr noundef %142, ptr noundef %144)
          to label %146 unwind label %118

146:                                              ; preds = %143
  store i32 %145, ptr %6, align 4, !tbaa !9
  br label %219

147:                                              ; preds = %132
  %148 = invoke noundef ptr @_ZNK7UapkiNS7SmartBA3getEv(ptr noundef nonnull align 8 dereferenceable(8) %14)
          to label %149 unwind label %118

149:                                              ; preds = %147
  %150 = load ptr, ptr %9, align 8, !tbaa !5
  %151 = invoke noundef i32 @_ZL22asn1_decode_bit_stringPK12ByteArray_stP13json_object_t(ptr noundef %148, ptr noundef %150)
          to label %152 unwind label %118

152:                                              ; preds = %149
  store i32 %151, ptr %6, align 4, !tbaa !9
  br label %219

153:                                              ; preds = %132
  %154 = invoke noundef ptr @_ZNK7UapkiNS7SmartBA3getEv(ptr noundef nonnull align 8 dereferenceable(8) %14)
          to label %155 unwind label %118

155:                                              ; preds = %153
  %156 = load ptr, ptr %9, align 8, !tbaa !5
  %157 = invoke noundef i32 @_ZL24asn1_decode_octet_stringPK12ByteArray_stP13json_object_t(ptr noundef %154, ptr noundef %156)
          to label %158 unwind label %118

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

159:                                              ; preds = %132
  %160 = invoke noundef ptr @_ZNK7UapkiNS7SmartBA3getEv(ptr noundef nonnull align 8 dereferenceable(8) %14)
          to label %161 unwind label %118

161:                                              ; preds = %159
  %162 = load ptr, ptr %9, align 8, !tbaa !5
  %163 = invoke noundef i32 @_ZL16asn1_decode_nullPK12ByteArray_stP13json_object_t(ptr noundef %160, ptr noundef %162)
          to label %164 unwind label %118

164:                                              ; preds = %161
  store i32 %163, ptr %6, align 4, !tbaa !9
  br label %219

165:                                              ; preds = %132
  %166 = invoke noundef ptr @_ZNK7UapkiNS7SmartBA3getEv(ptr noundef nonnull align 8 dereferenceable(8) %14)
          to label %167 unwind label %118

167:                                              ; preds = %165
  %168 = load ptr, ptr %9, align 8, !tbaa !5
  %169 = invoke noundef i32 @_ZL15asn1_decode_oidPK12ByteArray_stP13json_object_t(ptr noundef %166, ptr noundef %168)
          to label %170 unwind label %118

170:                                              ; preds = %167
  store i32 %169, ptr %6, align 4, !tbaa !9
  br label %219

171:                                              ; preds = %132
  %172 = invoke noundef ptr @_ZNK7UapkiNS7SmartBA3getEv(ptr noundef nonnull align 8 dereferenceable(8) %14)
          to label %173 unwind label %118

173:                                              ; preds = %171
  %174 = load ptr, ptr %9, align 8, !tbaa !5
  %175 = invoke noundef i32 @_ZL22asn1_decode_enumeratedPK12ByteArray_stP13json_object_t(ptr noundef %172, ptr noundef %174)
          to label %176 unwind label %118

176:                                              ; preds = %173
  store i32 %175, ptr %6, align 4, !tbaa !9
  br label %219

177:                                              ; preds = %132
  %178 = invoke ptr @get_UTF8String_desc()
          to label %179 unwind label %118

179:                                              ; preds = %177
  %180 = invoke noundef ptr @_ZNK7UapkiNS7SmartBA3getEv(ptr noundef nonnull align 8 dereferenceable(8) %14)
          to label %181 unwind label %118

181:                                              ; preds = %179
  %182 = load ptr, ptr %9, align 8, !tbaa !5
  %183 = invoke noundef i32 @_ZL18asn1_decode_stringP21asn_TYPE_descriptor_sPK12ByteArray_stP13json_object_t(ptr noundef %178, ptr noundef %180, ptr noundef %182)
          to label %184 unwind label %118

184:                                              ; preds = %181
  store i32 %183, ptr %6, align 4, !tbaa !9
  br label %219

185:                                              ; preds = %132
  %186 = invoke ptr @get_PrintableString_desc()
          to label %187 unwind label %118

187:                                              ; preds = %185
  %188 = invoke noundef ptr @_ZNK7UapkiNS7SmartBA3getEv(ptr noundef nonnull align 8 dereferenceable(8) %14)
          to label %189 unwind label %118

189:                                              ; preds = %187
  %190 = load ptr, ptr %9, align 8, !tbaa !5
  %191 = invoke noundef i32 @_ZL18asn1_decode_stringP21asn_TYPE_descriptor_sPK12ByteArray_stP13json_object_t(ptr noundef %186, ptr noundef %188, ptr noundef %190)
          to label %192 unwind label %118

192:                                              ; preds = %189
  store i32 %191, ptr %6, align 4, !tbaa !9
  br label %219

193:                                              ; preds = %132
  %194 = invoke ptr @get_IA5String_desc()
          to label %195 unwind label %118

195:                                              ; preds = %193
  %196 = invoke noundef ptr @_ZNK7UapkiNS7SmartBA3getEv(ptr noundef nonnull align 8 dereferenceable(8) %14)
          to label %197 unwind label %118

197:                                              ; preds = %195
  %198 = load ptr, ptr %9, align 8, !tbaa !5
  %199 = invoke noundef i32 @_ZL18asn1_decode_stringP21asn_TYPE_descriptor_sPK12ByteArray_stP13json_object_t(ptr noundef %194, ptr noundef %196, ptr noundef %198)
          to label %200 unwind label %118

200:                                              ; preds = %197
  store i32 %199, ptr %6, align 4, !tbaa !9
  br label %219

201:                                              ; preds = %132
  %202 = invoke noundef ptr @_ZNK7UapkiNS7SmartBA3getEv(ptr noundef nonnull align 8 dereferenceable(8) %14)
          to label %203 unwind label %118

203:                                              ; preds = %201
  %204 = load ptr, ptr %9, align 8, !tbaa !5
  %205 = invoke noundef i32 @_ZL19asn1_decode_utctimePK12ByteArray_stP13json_object_t(ptr noundef %202, ptr noundef %204)
          to label %206 unwind label %118

206:                                              ; preds = %203
  store i32 %205, ptr %6, align 4, !tbaa !9
  br label %219

207:                                              ; preds = %132
  %208 = invoke noundef ptr @_ZNK7UapkiNS7SmartBA3getEv(ptr noundef nonnull align 8 dereferenceable(8) %14)
          to label %209 unwind label %118

209:                                              ; preds = %207
  %210 = load ptr, ptr %9, align 8, !tbaa !5
  %211 = invoke noundef i32 @_ZL19asn1_decode_gentimePK12ByteArray_stP13json_object_t(ptr noundef %208, ptr noundef %210)
          to label %212 unwind label %118

212:                                              ; preds = %209
  store i32 %211, ptr %6, align 4, !tbaa !9
  br label %219

213:                                              ; preds = %132
  %214 = invoke noundef ptr @_ZNK7UapkiNS7SmartBA3getEv(ptr noundef nonnull align 8 dereferenceable(8) %14)
          to label %215 unwind label %118

215:                                              ; preds = %213
  %216 = load ptr, ptr %9, align 8, !tbaa !5
  %217 = invoke noundef i32 @_ZL22asn1_decode_bmp_stringPK12ByteArray_stP13json_object_t(ptr noundef %214, ptr noundef %216)
          to label %218 unwind label %118

218:                                              ; preds = %215
  store i32 %217, ptr %6, align 4, !tbaa !9
  br label %219

219:                                              ; preds = %218, %212, %206, %200, %192, %184, %176, %170, %164, %158, %152, %146, %140, %132
  store i32 0, ptr %12, align 4
  br label %220

220:                                              ; preds = %219, %130, %113
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %20) #4
  %221 = load i32, ptr %12, align 4
  switch i32 %221, label %232 [
    i32 0, label %222
  ]

222:                                              ; preds = %220
  br label %224

223:                                              ; preds = %118, %114
  call void @llvm.lifetime.end.p0(i64 1, ptr %20) #4
  br label %238

224:                                              ; preds = %222, %94
  %225 = load i32, ptr %6, align 4, !tbaa !9
  %226 = icmp ne i32 %225, 0
  br i1 %226, label %227, label %231

227:                                              ; preds = %224
  %228 = load ptr, ptr %9, align 8, !tbaa !5
  %229 = invoke noundef i32 @_ZN12ParsonHelper20jsonObjectSetBooleanEP13json_object_tPKcb(ptr noundef %228, ptr noundef @.str.6, i1 noundef zeroext true)
          to label %230 unwind label %55

230:                                              ; preds = %227
  store i32 0, ptr %6, align 4, !tbaa !9
  br label %231

231:                                              ; preds = %230, %224
  store i32 0, ptr %12, align 4
  br label %232

232:                                              ; preds = %231, %220, %88, %54
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %15) #4
  call void @_ZN7UapkiNS7SmartBAD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  %233 = load i32, ptr %12, align 4
  switch i32 %233, label %239 [
    i32 0, label %234
  ]

234:                                              ; preds = %232
  br label %235

235:                                              ; preds = %234
  %236 = load i64, ptr %11, align 8, !tbaa !11
  %237 = add i64 %236, 1
  store i64 %237, ptr %11, align 8, !tbaa !11
  br label %42, !llvm.loop !14

238:                                              ; preds = %223, %89, %55
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %15) #4
  call void @_ZN7UapkiNS7SmartBAD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  br label %246

239:                                              ; preds = %232, %46
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  %240 = load i32, ptr %12, align 4
  switch i32 %240, label %244 [
    i32 5, label %241
    i32 4, label %242
  ]

241:                                              ; preds = %239
  br label %242

242:                                              ; preds = %241, %239, %38, %29
  %243 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %243, ptr %3, align 4
  store i32 1, ptr %12, align 4
  br label %244

244:                                              ; preds = %242, %239
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  %245 = load i32, ptr %3, align 4
  ret i32 %245

246:                                              ; preds = %238
  %247 = load ptr, ptr %16, align 8
  %248 = load i32, ptr %17, align 4
  %249 = insertvalue { ptr, i32 } poison, ptr %247, 0
  %250 = insertvalue { ptr, i32 } %249, i32 %248, 1
  resume { ptr, i32 } %250
}

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

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

declare i64 @json_array_get_count(ptr noundef) #2

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

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

declare ptr @json_value_init_array() #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7UapkiNS7SmartBAC2Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #3 align 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 i32 @json_array_append_value(ptr noundef, ptr noundef) #2

declare ptr @json_value_init_object() #2

declare i32 @__gxx_personality_v0(...)

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

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

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

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

declare void @_ZN12ParsonHelper19jsonObjectGetStringEP13json_object_tPKcRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef, ptr noundef, ptr noundef nonnull align 8 dereferenceable(32)) #2

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

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

declare i32 @json_object_set_string(ptr noundef, 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 i32 @ba_get_byte(ptr noundef, i64 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 hidden noundef ptr @_ZL16asn1_tag_to_nameh(i8 noundef zeroext) #3

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

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL19asn1_decode_booleanPK12ByteArray_stP13json_object_t(ptr noundef, ptr noundef) #0

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL19asn1_decode_integerPK12ByteArray_stP13json_object_t(ptr noundef, ptr noundef) #0

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL22asn1_decode_bit_stringPK12ByteArray_stP13json_object_t(ptr noundef, ptr noundef) #0

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL24asn1_decode_octet_stringPK12ByteArray_stP13json_object_t(ptr noundef, ptr noundef) #0

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL16asn1_decode_nullPK12ByteArray_stP13json_object_t(ptr noundef, ptr noundef) #0

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL15asn1_decode_oidPK12ByteArray_stP13json_object_t(ptr noundef, ptr noundef) #0

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL22asn1_decode_enumeratedPK12ByteArray_stP13json_object_t(ptr noundef, ptr noundef) #0

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL18asn1_decode_stringP21asn_TYPE_descriptor_sPK12ByteArray_stP13json_object_t(ptr noundef, ptr noundef, ptr noundef) #0

declare ptr @get_UTF8String_desc() #2

declare ptr @get_PrintableString_desc() #2

declare ptr @get_IA5String_desc() #2

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL19asn1_decode_utctimePK12ByteArray_stP13json_object_t(ptr noundef, ptr noundef) #0

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL19asn1_decode_gentimePK12ByteArray_stP13json_object_t(ptr noundef, ptr noundef) #0

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL22asn1_decode_bmp_stringPK12ByteArray_stP13json_object_t(ptr noundef, ptr noundef) #0

declare noundef i32 @_ZN12ParsonHelper20jsonObjectSetBooleanEP13json_object_tPKcb(ptr noundef, ptr noundef, i1 noundef zeroext) #2

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

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { 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 }

!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, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!7, !7, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"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.UapkiNS::SmartBA" = type { ptr }
%"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] }

@.str = external hidden unnamed_addr constant [6 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [6 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @uapki_asn1_decode(ptr noundef %0, ptr noundef %1) local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.UapkiNS::SmartBA", align 8
  %4 = alloca %"class.std::__cxx11::basic_string", align 8
  %5 = alloca %"class.std::__cxx11::basic_string", align 8
  %6 = alloca %"class.std::__cxx11::basic_string", align 8
  %7 = alloca i8, align 1
  %8 = tail call ptr @json_object_get_array(ptr noundef %0, ptr noundef nonnull @.str)
  %9 = tail call i64 @json_array_get_count(ptr noundef %8)
  %10 = icmp eq i64 %9, 0
  br i1 %10, label %11, label %12

11:                                               ; preds = %2
  tail call void @stacktrace_create(ptr noundef nonnull @.str.1, i64 noundef 324, i32 noundef 4101, ptr noundef null)
  br label %.loopexit

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

15:                                               ; preds = %12
  %16 = tail call ptr @json_object_get_array(ptr noundef %1, ptr noundef nonnull @.str.2)
  br label %17

17:                                               ; preds = %108, %15
  %.04967 = phi i64 [ 0, %15 ], [ %109, %108 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #4
  call void @_ZN7UapkiNS7SmartBAC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %3)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #4
  %18 = invoke ptr @json_value_init_object()
          to label %19 unwind label %22

19:                                               ; preds = %17
  %20 = invoke i32 @json_array_append_value(ptr noundef %16, ptr noundef %18)
          to label %21 unwind label %22

21:                                               ; preds = %19
  %.not55 = icmp eq i32 %20, 0
  br i1 %.not55, label %24, label %108

22:                                               ; preds = %.thread68, %38, %30, %28, %26, %24, %19, %17
  %23 = landingpad { ptr, i32 }
          cleanup
  br label %110

24:                                               ; preds = %21
  %25 = invoke ptr @json_array_get_object(ptr noundef %16, i64 noundef %.04967)
          to label %26 unwind label %22

26:                                               ; preds = %24
  %27 = invoke ptr @json_array_get_object(ptr noundef %8, i64 noundef %.04967)
          to label %28 unwind label %22

28:                                               ; preds = %26
  %29 = invoke ptr @json_object_get_base64(ptr noundef %27, ptr noundef nonnull @.str.3)
          to label %30 unwind label %22

30:                                               ; preds = %28
  %31 = call noundef zeroext i1 @_ZN7UapkiNS7SmartBA3setEP12ByteArray_st(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef %29)
  %32 = invoke noundef i64 @_ZNK7UapkiNS7SmartBA4sizeEv(ptr noundef nonnull align 8 dereferenceable(8) %3)
          to label %33 unwind label %22

33:                                               ; preds = %30
  %34 = icmp ugt i64 %32, 1
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #4
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #4
  invoke void @_ZN12ParsonHelper19jsonObjectGetStringEP13json_object_tPKcRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %5, ptr noundef %27, ptr noundef nonnull @.str.4, ptr noundef nonnull align 8 dereferenceable(32) %6)
          to label %35 unwind label %42

35:                                               ; preds = %33
  %36 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef nonnull align 8 dereferenceable(32) %5) #4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #4
  %37 = call noundef zeroext i1 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32) %4) #4
  br i1 %37, label %44, label %38

38:                                               ; preds = %35
  %39 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %4) #4
  %40 = invoke i32 @json_object_set_string(ptr noundef %25, ptr noundef nonnull @.str.4, ptr noundef %39)
          to label %41 unwind label %22

41:                                               ; preds = %38
  %.not56 = icmp eq i32 %40, 0
  br i1 %.not56, label %44, label %108

42:                                               ; preds = %33
  %43 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #4
  br label %110

44:                                               ; preds = %41, %35
  br i1 %34, label %45, label %.thread68

45:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %7) #4
  store i8 0, ptr %7, align 1, !tbaa !5
  %46 = call noundef ptr @_ZNK7UapkiNS7SmartBA3getEv(ptr noundef nonnull align 8 dereferenceable(8) %3)
  %47 = invoke i32 @ba_get_byte(ptr noundef %46, i64 noundef 0, ptr noundef nonnull %7)
          to label %48 unwind label %54

48:                                               ; preds = %45
  %49 = load i8, ptr %7, align 1, !tbaa !5
  %50 = call noundef ptr @_ZL16asn1_tag_to_nameh(i8 noundef zeroext %49)
  %.not57 = icmp eq ptr %50, null
  br i1 %.not57, label %58, label %51

51:                                               ; preds = %48
  %52 = invoke i32 @json_object_set_string(ptr noundef %25, ptr noundef nonnull @.str.5, ptr noundef nonnull %50)
          to label %53 unwind label %56

53:                                               ; preds = %51
  %.not59 = icmp eq i32 %52, 0
  br i1 %.not59, label %63, label %104

54:                                               ; preds = %45
  %55 = landingpad { ptr, i32 }
          cleanup
  br label %105

56:                                               ; preds = %.invoke, %101, %98, %95, %90, %88, %86, %83, %80, %77, %74, %71, %68, %65, %58, %51
  %57 = landingpad { ptr, i32 }
          cleanup
  br label %105

58:                                               ; preds = %48
  %59 = load i8, ptr %7, align 1, !tbaa !5
  %60 = zext i8 %59 to i32
  %61 = invoke noundef i32 @_ZN12ParsonHelper19jsonObjectSetUint32EP13json_object_tPKcj(ptr noundef %25, ptr noundef nonnull @.str.5, i32 noundef %60)
          to label %62 unwind label %56

62:                                               ; preds = %58
  %.not58 = icmp eq i32 %61, 0
  br i1 %.not58, label %63, label %104

63:                                               ; preds = %62, %53
  %64 = load i8, ptr %7, align 1, !tbaa !5
  switch i8 %64, label %.thread71 [
    i8 1, label %65
    i8 2, label %68
    i8 3, label %71
    i8 4, label %74
    i8 5, label %77
    i8 6, label %80
    i8 10, label %83
    i8 12, label %86
    i8 19, label %88
    i8 22, label %90
    i8 23, label %95
    i8 24, label %98
    i8 30, label %101
  ]

.thread71:                                        ; preds = %63
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #4
  br label %108

65:                                               ; preds = %63
  %66 = call noundef ptr @_ZNK7UapkiNS7SmartBA3getEv(ptr noundef nonnull align 8 dereferenceable(8) %3)
  %67 = invoke noundef i32 @_ZL19asn1_decode_booleanPK12ByteArray_stP13json_object_t(ptr noundef %66, ptr noundef %25)
          to label %106 unwind label %56

68:                                               ; preds = %63
  %69 = call noundef ptr @_ZNK7UapkiNS7SmartBA3getEv(ptr noundef nonnull align 8 dereferenceable(8) %3)
  %70 = invoke noundef i32 @_ZL19asn1_decode_integerPK12ByteArray_stP13json_object_t(ptr noundef %69, ptr noundef %25)
          to label %106 unwind label %56

71:                                               ; preds = %63
  %72 = call noundef ptr @_ZNK7UapkiNS7SmartBA3getEv(ptr noundef nonnull align 8 dereferenceable(8) %3)
  %73 = invoke noundef i32 @_ZL22asn1_decode_bit_stringPK12ByteArray_stP13json_object_t(ptr noundef %72, ptr noundef %25)
          to label %106 unwind label %56

74:                                               ; preds = %63
  %75 = call noundef ptr @_ZNK7UapkiNS7SmartBA3getEv(ptr noundef nonnull align 8 dereferenceable(8) %3)
  %76 = invoke noundef i32 @_ZL24asn1_decode_octet_stringPK12ByteArray_stP13json_object_t(ptr noundef %75, ptr noundef %25)
          to label %106 unwind label %56

77:                                               ; preds = %63
  %78 = call noundef ptr @_ZNK7UapkiNS7SmartBA3getEv(ptr noundef nonnull align 8 dereferenceable(8) %3)
  %79 = invoke noundef i32 @_ZL16asn1_decode_nullPK12ByteArray_stP13json_object_t(ptr noundef %78, ptr noundef %25)
          to label %106 unwind label %56

80:                                               ; preds = %63
  %81 = call noundef ptr @_ZNK7UapkiNS7SmartBA3getEv(ptr noundef nonnull align 8 dereferenceable(8) %3)
  %82 = invoke noundef i32 @_ZL15asn1_decode_oidPK12ByteArray_stP13json_object_t(ptr noundef %81, ptr noundef %25)
          to label %106 unwind label %56

83:                                               ; preds = %63
  %84 = call noundef ptr @_ZNK7UapkiNS7SmartBA3getEv(ptr noundef nonnull align 8 dereferenceable(8) %3)
  %85 = invoke noundef i32 @_ZL22asn1_decode_enumeratedPK12ByteArray_stP13json_object_t(ptr noundef %84, ptr noundef %25)
          to label %106 unwind label %56

86:                                               ; preds = %63
  %87 = invoke ptr @get_UTF8String_desc()
          to label %.invoke unwind label %56

88:                                               ; preds = %63
  %89 = invoke ptr @get_PrintableString_desc()
          to label %.invoke unwind label %56

90:                                               ; preds = %63
  %91 = invoke ptr @get_IA5String_desc()
          to label %.invoke unwind label %56

.invoke:                                          ; preds = %90, %88, %86
  %92 = phi ptr [ %87, %86 ], [ %89, %88 ], [ %91, %90 ]
  %93 = call noundef ptr @_ZNK7UapkiNS7SmartBA3getEv(ptr noundef nonnull align 8 dereferenceable(8) %3)
  %94 = invoke noundef i32 @_ZL18asn1_decode_stringP21asn_TYPE_descriptor_sPK12ByteArray_stP13json_object_t(ptr noundef %92, ptr noundef %93, ptr noundef %25)
          to label %106 unwind label %56

95:                                               ; preds = %63
  %96 = call noundef ptr @_ZNK7UapkiNS7SmartBA3getEv(ptr noundef nonnull align 8 dereferenceable(8) %3)
  %97 = invoke noundef i32 @_ZL19asn1_decode_utctimePK12ByteArray_stP13json_object_t(ptr noundef %96, ptr noundef %25)
          to label %106 unwind label %56

98:                                               ; preds = %63
  %99 = call noundef ptr @_ZNK7UapkiNS7SmartBA3getEv(ptr noundef nonnull align 8 dereferenceable(8) %3)
  %100 = invoke noundef i32 @_ZL19asn1_decode_gentimePK12ByteArray_stP13json_object_t(ptr noundef %99, ptr noundef %25)
          to label %106 unwind label %56

101:                                              ; preds = %63
  %102 = call noundef ptr @_ZNK7UapkiNS7SmartBA3getEv(ptr noundef nonnull align 8 dereferenceable(8) %3)
  %103 = invoke noundef i32 @_ZL22asn1_decode_bmp_stringPK12ByteArray_stP13json_object_t(ptr noundef %102, ptr noundef %25)
          to label %106 unwind label %56

104:                                              ; preds = %62, %53
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #4
  br label %108

105:                                              ; preds = %56, %54
  %.pn = phi { ptr, i32 } [ %57, %56 ], [ %55, %54 ]
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #4
  br label %110

106:                                              ; preds = %.invoke, %65, %68, %71, %74, %77, %80, %83, %95, %98, %101
  %.252.ph = phi i32 [ %103, %101 ], [ %100, %98 ], [ %97, %95 ], [ %85, %83 ], [ %82, %80 ], [ %79, %77 ], [ %76, %74 ], [ %73, %71 ], [ %70, %68 ], [ %67, %65 ], [ %94, %.invoke ]
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #4
  %.not61 = icmp eq i32 %.252.ph, 0
  br i1 %.not61, label %108, label %.thread68

.thread68:                                        ; preds = %44, %106
  %107 = invoke noundef i32 @_ZN12ParsonHelper20jsonObjectSetBooleanEP13json_object_tPKcb(ptr noundef %25, ptr noundef nonnull @.str.6, i1 noundef zeroext true)
          to label %108 unwind label %22

108:                                              ; preds = %.thread71, %104, %106, %.thread68, %41, %21
  %.5 = phi i32 [ 4113, %104 ], [ 4113, %21 ], [ 4113, %41 ], [ 0, %.thread68 ], [ 0, %106 ], [ 0, %.thread71 ]
  %cond.not = phi i1 [ true, %104 ], [ true, %21 ], [ true, %41 ], [ false, %.thread68 ], [ false, %106 ], [ false, %.thread71 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #4
  call void @_ZN7UapkiNS7SmartBAD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %3) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #4
  %109 = add nuw i64 %.04967, 1
  %exitcond.not = icmp eq i64 %109, %9
  %or.cond = select i1 %cond.not, i1 true, i1 %exitcond.not
  br i1 %or.cond, label %.loopexit, label %17, !llvm.loop !8

110:                                              ; preds = %105, %42, %22
  %.pn62 = phi { ptr, i32 } [ %23, %22 ], [ %.pn, %105 ], [ %43, %42 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #4
  call void @_ZN7UapkiNS7SmartBAD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %3) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #4
  resume { ptr, i32 } %.pn62

.loopexit:                                        ; preds = %108, %11, %12
  %.0 = phi i32 [ 4101, %11 ], [ 4113, %12 ], [ %.5, %108 ]
  ret i32 %.0
}

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

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

declare i64 @json_array_get_count(ptr noundef) local_unnamed_addr #2

declare void @stacktrace_create(ptr noundef, i64 noundef, i32 noundef, ptr 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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7UapkiNS7SmartBAC2Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #3 align 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 i32 @json_array_append_value(ptr noundef, ptr noundef) local_unnamed_addr #2

declare ptr @json_value_init_object() local_unnamed_addr #2

declare i32 @__gxx_personality_v0(...)

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

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

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

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

declare void @_ZN12ParsonHelper19jsonObjectGetStringEP13json_object_tPKcRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef, ptr noundef, ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #2

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

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

declare i32 @json_object_set_string(ptr noundef, 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 i32 @ba_get_byte(ptr noundef, i64 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 hidden noundef ptr @_ZL16asn1_tag_to_nameh(i8 noundef zeroext) local_unnamed_addr #3

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

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL19asn1_decode_booleanPK12ByteArray_stP13json_object_t(ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL19asn1_decode_integerPK12ByteArray_stP13json_object_t(ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL22asn1_decode_bit_stringPK12ByteArray_stP13json_object_t(ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL24asn1_decode_octet_stringPK12ByteArray_stP13json_object_t(ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL16asn1_decode_nullPK12ByteArray_stP13json_object_t(ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL15asn1_decode_oidPK12ByteArray_stP13json_object_t(ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL22asn1_decode_enumeratedPK12ByteArray_stP13json_object_t(ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL18asn1_decode_stringP21asn_TYPE_descriptor_sPK12ByteArray_stP13json_object_t(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

declare ptr @get_UTF8String_desc() local_unnamed_addr #2

declare ptr @get_PrintableString_desc() local_unnamed_addr #2

declare ptr @get_IA5String_desc() local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL19asn1_decode_utctimePK12ByteArray_stP13json_object_t(ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL19asn1_decode_gentimePK12ByteArray_stP13json_object_t(ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL22asn1_decode_bmp_stringPK12ByteArray_stP13json_object_t(ptr noundef, ptr noundef) local_unnamed_addr #0

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

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

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { 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 = { 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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = distinct !{!8, !9}
!9 = !{!"llvm.loop.mustprogress"}


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