; LLVM IR from specinfo-ua/UAPKI :: library/uapki/src (cert-validator)

; 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.UapkiNS::CertValidator::CertValidator" = type { ptr, ptr, ptr, %"class.std::vector.18", %"class.std::vector.23", %"class.UapkiNS::SmartBA", %"class.UapkiNS::SmartBA" }
%"class.std::vector.18" = type { %"struct.std::_Vector_base.19" }
%"struct.std::_Vector_base.19" = type { %"struct.std::_Vector_base<UapkiNS::CertValidator::ExpectedCertItem *, std::allocator<UapkiNS::CertValidator::ExpectedCertItem *>>::_Vector_impl" }
%"struct.std::_Vector_base<UapkiNS::CertValidator::ExpectedCertItem *, std::allocator<UapkiNS::CertValidator::ExpectedCertItem *>>::_Vector_impl" = type { %"struct.std::_Vector_base<UapkiNS::CertValidator::ExpectedCertItem *, std::allocator<UapkiNS::CertValidator::ExpectedCertItem *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<UapkiNS::CertValidator::ExpectedCertItem *, std::allocator<UapkiNS::CertValidator::ExpectedCertItem *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.23" = type { %"struct.std::_Vector_base.24" }
%"struct.std::_Vector_base.24" = type { %"struct.std::_Vector_base<UapkiNS::CertValidator::ExpectedCrlItem *, std::allocator<UapkiNS::CertValidator::ExpectedCrlItem *>>::_Vector_impl" }
%"struct.std::_Vector_base<UapkiNS::CertValidator::ExpectedCrlItem *, std::allocator<UapkiNS::CertValidator::ExpectedCrlItem *>>::_Vector_impl" = type { %"struct.std::_Vector_base<UapkiNS::CertValidator::ExpectedCrlItem *, std::allocator<UapkiNS::CertValidator::ExpectedCrlItem *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<UapkiNS::CertValidator::ExpectedCrlItem *, std::allocator<UapkiNS::CertValidator::ExpectedCrlItem *>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@.str = external hidden unnamed_addr constant [25 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [16 x i8], align 1

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN7UapkiNS13CertValidator13CertValidator19addExpectedOcspCertEbPK12ByteArray_st(ptr noundef nonnull align 8 dereferenceable(88), i1 noundef zeroext, ptr noundef) #2 align 2

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

declare noundef i32 @_ZN7UapkiNS4Cert8CerStore14getCertByKeyIdEPK12ByteArray_stPPNS0_7CerItemE(ptr noundef nonnull align 8 dereferenceable(96), ptr noundef, ptr noundef) #3

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN7UapkiNS13CertValidator13CertValidator18verifyResponseDataERNS_4Ocsp10OcspHelperEP13json_object_t(ptr noundef nonnull align 8 dereferenceable(88) %0, ptr noundef nonnull align 8 dereferenceable(92) %1, ptr noundef %2) #2 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca %"class.UapkiNS::SmartBA", align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  %18 = load ptr, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  store i32 0, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  call void @_ZN7UapkiNS7SmartBAC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %9)
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  store i32 -1, ptr %10, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  store i32 0, ptr %11, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  store ptr null, ptr %12, align 8, !tbaa !5
  br label %19

19:                                               ; preds = %3
  %20 = load ptr, ptr %6, align 8, !tbaa !5
  %21 = invoke noundef ptr @_ZN7UapkiNS7SmartBAadEv(ptr noundef nonnull align 8 dereferenceable(8) %9)
          to label %22 unwind label %30

22:                                               ; preds = %19
  %23 = invoke noundef i32 @_ZN7UapkiNS4Ocsp10OcspHelper14getResponderIdERNS0_15ResponderIdTypeEPP12ByteArray_st(ptr noundef nonnull align 8 dereferenceable(92) %20, ptr noundef nonnull align 4 dereferenceable(4) %10, ptr noundef %21)
          to label %24 unwind label %30

24:                                               ; preds = %22
  store i32 %23, ptr %8, align 4, !tbaa !9
  %25 = load i32, ptr %8, align 4, !tbaa !9
  %26 = icmp ne i32 %25, 0
  br i1 %26, label %27, label %34

27:                                               ; preds = %24
  %28 = load i32, ptr %8, align 4, !tbaa !9
  invoke void @stacktrace_add(ptr noundef @.str, i64 noundef 721, i32 noundef %28)
          to label %29 unwind label %30

29:                                               ; preds = %27
  br label %165

30:                                               ; preds = %158, %149, %139, %135, %128, %97, %93, %62, %58, %49, %44, %40, %27, %22, %19
  %31 = landingpad { ptr, i32 }
          cleanup
  %32 = extractvalue { ptr, i32 } %31, 0
  store ptr %32, ptr %13, align 8
  %33 = extractvalue { ptr, i32 } %31, 1
  store i32 %33, ptr %14, align 4
  br label %169

34:                                               ; preds = %24
  br label %35

35:                                               ; preds = %34
  br label %36

36:                                               ; preds = %35
  %37 = load ptr, ptr %7, align 8, !tbaa !5
  %38 = icmp ne ptr %37, null
  br i1 %38, label %39, label %55

39:                                               ; preds = %36
  br label %40

40:                                               ; preds = %39
  %41 = load ptr, ptr %7, align 8, !tbaa !5
  %42 = load i32, ptr %10, align 4, !tbaa !11
  %43 = invoke noundef ptr @_ZNK7UapkiNS7SmartBA3getEv(ptr noundef nonnull align 8 dereferenceable(8) %9)
          to label %44 unwind label %30

44:                                               ; preds = %40
  %45 = invoke noundef i32 @_ZN7UapkiNS13CertValidator17responderIdToJsonEP13json_object_tNS_4Ocsp15ResponderIdTypeEPK12ByteArray_st(ptr noundef %41, i32 noundef %42, ptr noundef %43)
          to label %46 unwind label %30

46:                                               ; preds = %44
  store i32 %45, ptr %8, align 4, !tbaa !9
  %47 = load i32, ptr %8, align 4, !tbaa !9
  %48 = icmp ne i32 %47, 0
  br i1 %48, label %49, label %52

49:                                               ; preds = %46
  %50 = load i32, ptr %8, align 4, !tbaa !9
  invoke void @stacktrace_add(ptr noundef @.str, i64 noundef 723, i32 noundef %50)
          to label %51 unwind label %30

51:                                               ; preds = %49
  br label %165

52:                                               ; preds = %46
  br label %53

53:                                               ; preds = %52
  br label %54

54:                                               ; preds = %53
  br label %55

55:                                               ; preds = %54, %36
  %56 = load i32, ptr %10, align 4, !tbaa !11
  %57 = icmp eq i32 %56, 0
  br i1 %57, label %58, label %93

58:                                               ; preds = %55
  %59 = getelementptr inbounds %"class.UapkiNS::CertValidator::CertValidator", ptr %18, i32 0, i32 1
  %60 = load ptr, ptr %59, align 8, !tbaa !15
  %61 = invoke noundef ptr @_ZNK7UapkiNS7SmartBA3getEv(ptr noundef nonnull align 8 dereferenceable(8) %9)
          to label %62 unwind label %30

62:                                               ; preds = %58
  %63 = invoke noundef i32 @_ZN7UapkiNS4Cert8CerStore16getCertBySubjectEPK12ByteArray_stPPNS0_7CerItemE(ptr noundef nonnull align 8 dereferenceable(96) %60, ptr noundef %61, ptr noundef %12)
          to label %64 unwind label %30

64:                                               ; preds = %62
  store i32 %63, ptr %8, align 4, !tbaa !9
  %65 = load i32, ptr %8, align 4, !tbaa !9
  %66 = icmp eq i32 %65, 4161
  br i1 %66, label %67, label %92

67:                                               ; preds = %64
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #4
  %68 = invoke noundef ptr @_ZNK7UapkiNS7SmartBA3getEv(ptr noundef nonnull align 8 dereferenceable(8) %9)
          to label %69 unwind label %83

69:                                               ; preds = %67
  %70 = invoke noundef i32 @_ZN7UapkiNS13CertValidator13CertValidator19addExpectedOcspCertEbPK12ByteArray_st(ptr noundef nonnull align 8 dereferenceable(88) %18, i1 noundef zeroext false, ptr noundef %68)
          to label %71 unwind label %83

71:                                               ; preds = %69
  store i32 %70, ptr %15, align 4, !tbaa !9
  br label %72

72:                                               ; preds = %71
  %73 = load i32, ptr %15, align 4, !tbaa !9
  %74 = icmp eq i32 %73, 0
  br i1 %74, label %75, label %77

75:                                               ; preds = %72
  %76 = load i32, ptr %8, align 4, !tbaa !9
  br label %79

77:                                               ; preds = %72
  %78 = load i32, ptr %15, align 4, !tbaa !9
  br label %79

79:                                               ; preds = %77, %75
  %80 = phi i32 [ %76, %75 ], [ %78, %77 ]
  store i32 %80, ptr %8, align 4, !tbaa !9
  %81 = load i32, ptr %8, align 4, !tbaa !9
  invoke void @stacktrace_create(ptr noundef @.str, i64 noundef 729, i32 noundef %81, ptr noundef null)
          to label %82 unwind label %83

82:                                               ; preds = %79
  store i32 4, ptr %16, align 4
  br label %89

83:                                               ; preds = %79, %69, %67
  %84 = landingpad { ptr, i32 }
          cleanup
  %85 = extractvalue { ptr, i32 } %84, 0
  store ptr %85, ptr %13, align 8
  %86 = extractvalue { ptr, i32 } %84, 1
  store i32 %86, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  br label %169

87:                                               ; No predecessors!
  br label %88

88:                                               ; preds = %87
  store i32 0, ptr %16, align 4
  br label %89

89:                                               ; preds = %88, %82
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  %90 = load i32, ptr %16, align 4
  switch i32 %90, label %167 [
    i32 0, label %91
    i32 4, label %165
  ]

91:                                               ; preds = %89
  br label %92

92:                                               ; preds = %91, %64
  br label %128

93:                                               ; preds = %55
  %94 = getelementptr inbounds %"class.UapkiNS::CertValidator::CertValidator", ptr %18, i32 0, i32 1
  %95 = load ptr, ptr %94, align 8, !tbaa !15
  %96 = invoke noundef ptr @_ZNK7UapkiNS7SmartBA3getEv(ptr noundef nonnull align 8 dereferenceable(8) %9)
          to label %97 unwind label %30

97:                                               ; preds = %93
  %98 = invoke noundef i32 @_ZN7UapkiNS4Cert8CerStore14getCertByKeyIdEPK12ByteArray_stPPNS0_7CerItemE(ptr noundef nonnull align 8 dereferenceable(96) %95, ptr noundef %96, ptr noundef %12)
          to label %99 unwind label %30

99:                                               ; preds = %97
  store i32 %98, ptr %8, align 4, !tbaa !9
  %100 = load i32, ptr %8, align 4, !tbaa !9
  %101 = icmp eq i32 %100, 4161
  br i1 %101, label %102, label %127

102:                                              ; preds = %99
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #4
  %103 = invoke noundef ptr @_ZNK7UapkiNS7SmartBA3getEv(ptr noundef nonnull align 8 dereferenceable(8) %9)
          to label %104 unwind label %118

104:                                              ; preds = %102
  %105 = invoke noundef i32 @_ZN7UapkiNS13CertValidator13CertValidator19addExpectedOcspCertEbPK12ByteArray_st(ptr noundef nonnull align 8 dereferenceable(88) %18, i1 noundef zeroext true, ptr noundef %103)
          to label %106 unwind label %118

106:                                              ; preds = %104
  store i32 %105, ptr %17, align 4, !tbaa !9
  br label %107

107:                                              ; preds = %106
  %108 = load i32, ptr %17, align 4, !tbaa !9
  %109 = icmp eq i32 %108, 0
  br i1 %109, label %110, label %112

110:                                              ; preds = %107
  %111 = load i32, ptr %8, align 4, !tbaa !9
  br label %114

112:                                              ; preds = %107
  %113 = load i32, ptr %17, align 4, !tbaa !9
  br label %114

114:                                              ; preds = %112, %110
  %115 = phi i32 [ %111, %110 ], [ %113, %112 ]
  store i32 %115, ptr %8, align 4, !tbaa !9
  %116 = load i32, ptr %8, align 4, !tbaa !9
  invoke void @stacktrace_create(ptr noundef @.str, i64 noundef 737, i32 noundef %116, ptr noundef null)
          to label %117 unwind label %118

117:                                              ; preds = %114
  store i32 4, ptr %16, align 4
  br label %124

118:                                              ; preds = %114, %104, %102
  %119 = landingpad { ptr, i32 }
          cleanup
  %120 = extractvalue { ptr, i32 } %119, 0
  store ptr %120, ptr %13, align 8
  %121 = extractvalue { ptr, i32 } %119, 1
  store i32 %121, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #4
  br label %169

122:                                              ; No predecessors!
  br label %123

123:                                              ; preds = %122
  store i32 0, ptr %16, align 4
  br label %124

124:                                              ; preds = %123, %117
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #4
  %125 = load i32, ptr %16, align 4
  switch i32 %125, label %167 [
    i32 0, label %126
    i32 4, label %165
  ]

126:                                              ; preds = %124
  br label %127

127:                                              ; preds = %126, %99
  br label %128

128:                                              ; preds = %127, %92
  %129 = load ptr, ptr %6, align 8, !tbaa !5
  %130 = load ptr, ptr %12, align 8, !tbaa !5
  %131 = invoke noundef i32 @_ZN7UapkiNS4Ocsp10OcspHelper21verifyTbsResponseDataEPKNS_4Cert7CerItemERNS_12VerifyStatusE(ptr noundef nonnull align 8 dereferenceable(92) %129, ptr noundef %130, ptr noundef nonnull align 4 dereferenceable(4) %11)
          to label %132 unwind label %30

132:                                              ; preds = %128
  store i32 %131, ptr %8, align 4, !tbaa !9
  %133 = load ptr, ptr %7, align 8, !tbaa !5
  %134 = icmp ne ptr %133, null
  br i1 %134, label %135, label %145

135:                                              ; preds = %132
  %136 = load ptr, ptr %7, align 8, !tbaa !5
  %137 = load i32, ptr %11, align 4, !tbaa !13
  %138 = invoke noundef ptr @_ZN7UapkiNS17verifyStatusToStrENS_12VerifyStatusE(i32 noundef %137)
          to label %139 unwind label %30

139:                                              ; preds = %135
  %140 = invoke i32 @json_object_set_string(ptr noundef %136, ptr noundef @.str.12, ptr noundef %138)
          to label %141 unwind label %30

141:                                              ; preds = %139
  %142 = icmp ne i32 %140, 0
  br i1 %142, label %143, label %144

143:                                              ; preds = %141
  store i32 4113, ptr %8, align 4, !tbaa !9
  br label %165

144:                                              ; preds = %141
  br label %145

145:                                              ; preds = %144, %132
  %146 = load i32, ptr %8, align 4, !tbaa !9
  %147 = icmp eq i32 %146, 3
  br i1 %147, label %148, label %154

148:                                              ; preds = %145
  br label %149

149:                                              ; preds = %148
  store i32 4195, ptr %8, align 4, !tbaa !9
  %150 = load i32, ptr %8, align 4, !tbaa !9
  invoke void @stacktrace_create(ptr noundef @.str, i64 noundef 746, i32 noundef %150, ptr noundef null)
          to label %151 unwind label %30

151:                                              ; preds = %149
  br label %165

152:                                              ; No predecessors!
  br label %153

153:                                              ; preds = %152
  br label %164

154:                                              ; preds = %145
  %155 = load i32, ptr %8, align 4, !tbaa !9
  %156 = icmp ne i32 %155, 0
  br i1 %156, label %157, label %163

157:                                              ; preds = %154
  br label %158

158:                                              ; preds = %157
  store i32 4196, ptr %8, align 4, !tbaa !9
  %159 = load i32, ptr %8, align 4, !tbaa !9
  invoke void @stacktrace_create(ptr noundef @.str, i64 noundef 749, i32 noundef %159, ptr noundef null)
          to label %160 unwind label %30

160:                                              ; preds = %158
  br label %165

161:                                              ; No predecessors!
  br label %162

162:                                              ; preds = %161
  br label %163

163:                                              ; preds = %162, %154
  br label %164

164:                                              ; preds = %163, %153
  br label %165

165:                                              ; preds = %164, %160, %151, %143, %124, %89, %51, %29
  %166 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %166, ptr %4, align 4
  store i32 1, ptr %16, align 4
  br label %167

167:                                              ; preds = %165, %124, %89
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  call void @_ZN7UapkiNS7SmartBAD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  %168 = load i32, ptr %4, align 4
  ret i32 %168

169:                                              ; preds = %118, %83, %30
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  call void @_ZN7UapkiNS7SmartBAD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  br label %170

170:                                              ; preds = %169
  %171 = load ptr, ptr %13, align 8
  %172 = load i32, ptr %14, align 4
  %173 = insertvalue { ptr, i32 } poison, ptr %171, 0
  %174 = insertvalue { ptr, i32 } %173, i32 %172, 1
  resume { ptr, i32 } %174
}

declare noundef i32 @_ZN7UapkiNS4Ocsp10OcspHelper14getResponderIdERNS0_15ResponderIdTypeEPP12ByteArray_st(ptr noundef nonnull align 8 dereferenceable(92), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef) #3

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN7UapkiNS13CertValidator17responderIdToJsonEP13json_object_tNS_4Ocsp15ResponderIdTypeEPK12ByteArray_st(ptr noundef, i32 noundef, ptr noundef) #2

declare noundef i32 @_ZN7UapkiNS4Cert8CerStore16getCertBySubjectEPK12ByteArray_stPPNS0_7CerItemE(ptr noundef nonnull align 8 dereferenceable(96), ptr noundef, ptr noundef) #3

declare noundef i32 @_ZN7UapkiNS4Ocsp10OcspHelper21verifyTbsResponseDataEPKNS_4Cert7CerItemERNS_12VerifyStatusE(ptr noundef nonnull align 8 dereferenceable(92), ptr noundef, ptr noundef nonnull align 4 dereferenceable(4)) #3

declare noundef ptr @_ZN7UapkiNS17verifyStatusToStrENS_12VerifyStatusE(i32 noundef) #3

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

!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 = !{!"_ZTSN7UapkiNS4Ocsp15ResponderIdTypeE", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"_ZTSN7UapkiNS12VerifyStatusE", !7, i64 0}
!15 = !{!16, !6, i64 8}
!16 = !{!"_ZTSN7UapkiNS13CertValidator13CertValidatorE", !6, i64 0, !6, i64 8, !6, i64 16, !17, i64 24, !21, i64 48, !25, i64 72, !25, i64 80}
!17 = !{!"_ZTSSt6vectorIPN7UapkiNS13CertValidator16ExpectedCertItemESaIS3_EE", !18, i64 0}
!18 = !{!"_ZTSSt12_Vector_baseIPN7UapkiNS13CertValidator16ExpectedCertItemESaIS3_EE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseIPN7UapkiNS13CertValidator16ExpectedCertItemESaIS3_EE12_Vector_implE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseIPN7UapkiNS13CertValidator16ExpectedCertItemESaIS3_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!21 = !{!"_ZTSSt6vectorIPN7UapkiNS13CertValidator15ExpectedCrlItemESaIS3_EE", !22, i64 0}
!22 = !{!"_ZTSSt12_Vector_baseIPN7UapkiNS13CertValidator15ExpectedCrlItemESaIS3_EE", !23, i64 0}
!23 = !{!"_ZTSNSt12_Vector_baseIPN7UapkiNS13CertValidator15ExpectedCrlItemESaIS3_EE12_Vector_implE", !24, i64 0}
!24 = !{!"_ZTSNSt12_Vector_baseIPN7UapkiNS13CertValidator15ExpectedCrlItemESaIS3_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!25 = !{!"_ZTSN7UapkiNS7SmartBAE", !6, i64 0}


; 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 }

@.str = external hidden unnamed_addr constant [25 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [16 x i8], align 1

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN7UapkiNS13CertValidator13CertValidator19addExpectedOcspCertEbPK12ByteArray_st(ptr noundef nonnull align 8 dereferenceable(88), i1 noundef zeroext, ptr noundef) local_unnamed_addr #2 align 2

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

declare noundef i32 @_ZN7UapkiNS4Cert8CerStore14getCertByKeyIdEPK12ByteArray_stPPNS0_7CerItemE(ptr noundef nonnull align 8 dereferenceable(96), ptr noundef, ptr noundef) local_unnamed_addr #3

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN7UapkiNS13CertValidator13CertValidator18verifyResponseDataERNS_4Ocsp10OcspHelperEP13json_object_t(ptr noundef nonnull align 8 dereferenceable(88) %0, ptr noundef nonnull align 8 dereferenceable(92) %1, ptr noundef %2) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.UapkiNS::SmartBA", align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #4
  call void @_ZN7UapkiNS7SmartBAC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %4)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #4
  store i32 -1, ptr %5, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #4
  store i32 0, ptr %6, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #4
  store ptr null, ptr %7, align 8, !tbaa !11
  %8 = call noundef ptr @_ZN7UapkiNS7SmartBAadEv(ptr noundef nonnull align 8 dereferenceable(8) %4)
  %9 = invoke noundef i32 @_ZN7UapkiNS4Ocsp10OcspHelper14getResponderIdERNS0_15ResponderIdTypeEPP12ByteArray_st(ptr noundef nonnull align 8 dereferenceable(92) %1, ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef %8)
          to label %10 unwind label %12

10:                                               ; preds = %3
  %.not = icmp eq i32 %9, 0
  br i1 %.not, label %14, label %11

11:                                               ; preds = %10
  invoke void @stacktrace_add(ptr noundef nonnull @.str, i64 noundef 721, i32 noundef %9)
          to label %64 unwind label %12

12:                                               ; preds = %63, %62, %58, %55, %51, %39, %27, %20, %15, %11, %3
  %13 = landingpad { ptr, i32 }
          cleanup
  br label %65

14:                                               ; preds = %10
  %.not39 = icmp eq ptr %2, null
  br i1 %.not39, label %21, label %15

15:                                               ; preds = %14
  %16 = load i32, ptr %5, align 4, !tbaa !5
  %17 = call noundef ptr @_ZNK7UapkiNS7SmartBA3getEv(ptr noundef nonnull align 8 dereferenceable(8) %4)
  %18 = invoke noundef i32 @_ZN7UapkiNS13CertValidator17responderIdToJsonEP13json_object_tNS_4Ocsp15ResponderIdTypeEPK12ByteArray_st(ptr noundef nonnull %2, i32 noundef %16, ptr noundef %17)
          to label %19 unwind label %12

19:                                               ; preds = %15
  %.not40 = icmp eq i32 %18, 0
  br i1 %.not40, label %21, label %20

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

21:                                               ; preds = %19, %14
  %22 = load i32, ptr %5, align 4, !tbaa !5
  %23 = icmp eq i32 %22, 0
  %24 = getelementptr inbounds i8, ptr %0, i64 8
  %25 = load ptr, ptr %24, align 8, !tbaa !13
  %26 = call noundef ptr @_ZNK7UapkiNS7SmartBA3getEv(ptr noundef nonnull align 8 dereferenceable(8) %4)
  br i1 %23, label %27, label %39

27:                                               ; preds = %21
  %28 = invoke noundef i32 @_ZN7UapkiNS4Cert8CerStore16getCertBySubjectEPK12ByteArray_stPPNS0_7CerItemE(ptr noundef nonnull align 8 dereferenceable(96) %25, ptr noundef %26, ptr noundef nonnull %7)
          to label %29 unwind label %12

29:                                               ; preds = %27
  %30 = icmp eq i32 %28, 4161
  br i1 %30, label %31, label %51

31:                                               ; preds = %29
  %32 = call noundef ptr @_ZNK7UapkiNS7SmartBA3getEv(ptr noundef nonnull align 8 dereferenceable(8) %4)
  %33 = invoke noundef i32 @_ZN7UapkiNS13CertValidator13CertValidator19addExpectedOcspCertEbPK12ByteArray_st(ptr noundef nonnull align 8 dereferenceable(88) %0, i1 noundef zeroext false, ptr noundef %32)
          to label %34 unwind label %37

34:                                               ; preds = %31
  %35 = icmp eq i32 %33, 0
  %36 = select i1 %35, i32 4161, i32 %33
  invoke void @stacktrace_create(ptr noundef nonnull @.str, i64 noundef 729, i32 noundef %36, ptr noundef null)
          to label %64 unwind label %37

37:                                               ; preds = %34, %31
  %38 = landingpad { ptr, i32 }
          cleanup
  br label %65

39:                                               ; preds = %21
  %40 = invoke noundef i32 @_ZN7UapkiNS4Cert8CerStore14getCertByKeyIdEPK12ByteArray_stPPNS0_7CerItemE(ptr noundef nonnull align 8 dereferenceable(96) %25, ptr noundef %26, ptr noundef nonnull %7)
          to label %41 unwind label %12

41:                                               ; preds = %39
  %42 = icmp eq i32 %40, 4161
  br i1 %42, label %43, label %51

43:                                               ; preds = %41
  %44 = call noundef ptr @_ZNK7UapkiNS7SmartBA3getEv(ptr noundef nonnull align 8 dereferenceable(8) %4)
  %45 = invoke noundef i32 @_ZN7UapkiNS13CertValidator13CertValidator19addExpectedOcspCertEbPK12ByteArray_st(ptr noundef nonnull align 8 dereferenceable(88) %0, i1 noundef zeroext true, ptr noundef %44)
          to label %46 unwind label %49

46:                                               ; preds = %43
  %47 = icmp eq i32 %45, 0
  %48 = select i1 %47, i32 4161, i32 %45
  invoke void @stacktrace_create(ptr noundef nonnull @.str, i64 noundef 737, i32 noundef %48, ptr noundef null)
          to label %64 unwind label %49

49:                                               ; preds = %46, %43
  %50 = landingpad { ptr, i32 }
          cleanup
  br label %65

51:                                               ; preds = %41, %29
  %52 = load ptr, ptr %7, align 8, !tbaa !11
  %53 = invoke noundef i32 @_ZN7UapkiNS4Ocsp10OcspHelper21verifyTbsResponseDataEPKNS_4Cert7CerItemERNS_12VerifyStatusE(ptr noundef nonnull align 8 dereferenceable(92) %1, ptr noundef %52, ptr noundef nonnull align 4 dereferenceable(4) %6)
          to label %54 unwind label %12

54:                                               ; preds = %51
  br i1 %.not39, label %61, label %55

55:                                               ; preds = %54
  %56 = load i32, ptr %6, align 4, !tbaa !9
  %57 = invoke noundef ptr @_ZN7UapkiNS17verifyStatusToStrENS_12VerifyStatusE(i32 noundef %56)
          to label %58 unwind label %12

58:                                               ; preds = %55
  %59 = invoke i32 @json_object_set_string(ptr noundef nonnull %2, ptr noundef nonnull @.str.12, ptr noundef %57)
          to label %60 unwind label %12

60:                                               ; preds = %58
  %.not41 = icmp eq i32 %59, 0
  br i1 %.not41, label %61, label %64

61:                                               ; preds = %60, %54
  switch i32 %53, label %63 [
    i32 3, label %62
    i32 0, label %64
  ]

62:                                               ; preds = %61
  invoke void @stacktrace_create(ptr noundef nonnull @.str, i64 noundef 746, i32 noundef 4195, ptr noundef null)
          to label %64 unwind label %12

63:                                               ; preds = %61
  invoke void @stacktrace_create(ptr noundef nonnull @.str, i64 noundef 749, i32 noundef 4196, ptr noundef null)
          to label %64 unwind label %12

64:                                               ; preds = %11, %20, %62, %63, %34, %46, %60, %61
  %.030 = phi i32 [ %9, %11 ], [ %18, %20 ], [ 4195, %62 ], [ 4196, %63 ], [ %36, %34 ], [ %48, %46 ], [ 4113, %60 ], [ %53, %61 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #4
  call void @_ZN7UapkiNS7SmartBAD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #4
  ret i32 %.030

65:                                               ; preds = %49, %37, %12
  %.pn = phi { ptr, i32 } [ %13, %12 ], [ %38, %37 ], [ %50, %49 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #4
  call void @_ZN7UapkiNS7SmartBAD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #4
  resume { ptr, i32 } %.pn
}

declare noundef i32 @_ZN7UapkiNS4Ocsp10OcspHelper14getResponderIdERNS0_15ResponderIdTypeEPP12ByteArray_st(ptr noundef nonnull align 8 dereferenceable(92), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN7UapkiNS13CertValidator17responderIdToJsonEP13json_object_tNS_4Ocsp15ResponderIdTypeEPK12ByteArray_st(ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #2

declare noundef i32 @_ZN7UapkiNS4Cert8CerStore16getCertBySubjectEPK12ByteArray_stPPNS0_7CerItemE(ptr noundef nonnull align 8 dereferenceable(96), ptr noundef, ptr noundef) local_unnamed_addr #3

declare noundef i32 @_ZN7UapkiNS4Ocsp10OcspHelper21verifyTbsResponseDataEPKNS_4Cert7CerItemERNS_12VerifyStatusE(ptr noundef nonnull align 8 dereferenceable(92), ptr noundef, ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #3

declare noundef ptr @_ZN7UapkiNS17verifyStatusToStrENS_12VerifyStatusE(i32 noundef) local_unnamed_addr #3

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

!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 = !{!"_ZTSN7UapkiNS4Ocsp15ResponderIdTypeE", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"_ZTSN7UapkiNS12VerifyStatusE", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"any pointer", !7, i64 0}
!13 = !{!14, !12, i64 8}
!14 = !{!"_ZTSN7UapkiNS13CertValidator13CertValidatorE", !12, i64 0, !12, i64 8, !12, i64 16, !15, i64 24, !19, i64 48, !23, i64 72, !23, i64 80}
!15 = !{!"_ZTSSt6vectorIPN7UapkiNS13CertValidator16ExpectedCertItemESaIS3_EE", !16, i64 0}
!16 = !{!"_ZTSSt12_Vector_baseIPN7UapkiNS13CertValidator16ExpectedCertItemESaIS3_EE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseIPN7UapkiNS13CertValidator16ExpectedCertItemESaIS3_EE12_Vector_implE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseIPN7UapkiNS13CertValidator16ExpectedCertItemESaIS3_EE17_Vector_impl_dataE", !12, i64 0, !12, i64 8, !12, i64 16}
!19 = !{!"_ZTSSt6vectorIPN7UapkiNS13CertValidator15ExpectedCrlItemESaIS3_EE", !20, i64 0}
!20 = !{!"_ZTSSt12_Vector_baseIPN7UapkiNS13CertValidator15ExpectedCrlItemESaIS3_EE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseIPN7UapkiNS13CertValidator15ExpectedCrlItemESaIS3_EE12_Vector_implE", !22, i64 0}
!22 = !{!"_ZTSNSt12_Vector_baseIPN7UapkiNS13CertValidator15ExpectedCrlItemESaIS3_EE17_Vector_impl_dataE", !12, i64 0, !12, i64 8, !12, i64 16}
!23 = !{!"_ZTSN7UapkiNS7SmartBAE", !12, i64 0}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,SROAPass,SimplifyCFGPass