; 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.__gnu_cxx::__normal_iterator" = 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 }

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 uwtable
declare dso_local noundef i32 @_ZN7UapkiNS13CertValidator16ExpectedCertItem19setSignerIdentifierEPK12ByteArray_stS4_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, ptr noundef) #2 align 2

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

20:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  %21 = load ptr, ptr %7, align 8, !tbaa !5
  %22 = invoke noundef ptr @_ZN7UapkiNS7SmartBAadEv(ptr noundef nonnull align 8 dereferenceable(8) %8)
          to label %23 unwind label %36

23:                                               ; preds = %20
  %24 = invoke noundef ptr @_ZN7UapkiNS7SmartBAadEv(ptr noundef nonnull align 8 dereferenceable(8) %9)
          to label %25 unwind label %36

25:                                               ; preds = %23
  %26 = invoke noundef i32 @_ZN7UapkiNS4Cert16parseIssuerAndSNEPK12ByteArray_stPPS1_S5_(ptr noundef %21, ptr noundef %22, ptr noundef %24)
          to label %27 unwind label %36

27:                                               ; preds = %25
  store i32 %26, ptr %12, align 4, !tbaa !11
  %28 = load i32, ptr %12, align 4, !tbaa !11
  %29 = icmp ne i32 %28, 0
  br i1 %29, label %30, label %40

30:                                               ; preds = %27
  %31 = load i32, ptr %12, align 4, !tbaa !11
  store i32 %31, ptr %4, align 4
  store i32 1, ptr %13, align 4
  br label %113

32:                                               ; preds = %3
  %33 = landingpad { ptr, i32 }
          cleanup
  %34 = extractvalue { ptr, i32 } %33, 0
  store ptr %34, ptr %10, align 8
  %35 = extractvalue { ptr, i32 } %33, 1
  store i32 %35, ptr %11, align 4
  br label %116

36:                                               ; preds = %25, %23, %20
  %37 = landingpad { ptr, i32 }
          cleanup
  %38 = extractvalue { ptr, i32 } %37, 0
  store ptr %38, ptr %10, align 8
  %39 = extractvalue { ptr, i32 } %37, 1
  store i32 %39, ptr %11, align 4
  br label %115

40:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  %41 = getelementptr inbounds %"class.UapkiNS::CertValidator::CertValidator", ptr %19, i32 0, i32 3
  store ptr %41, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  %42 = load ptr, ptr %14, align 8, !tbaa !5
  %43 = call ptr @_ZNSt6vectorIPN7UapkiNS13CertValidator16ExpectedCertItemESaIS3_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %42) #7
  %44 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %15, i32 0, i32 0
  store ptr %43, ptr %44, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  %45 = load ptr, ptr %14, align 8, !tbaa !5
  %46 = call ptr @_ZNSt6vectorIPN7UapkiNS13CertValidator16ExpectedCertItemESaIS3_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %45) #7
  %47 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %16, i32 0, i32 0
  store ptr %46, ptr %47, align 8
  br label %48

48:                                               ; preds = %81, %40
  %49 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPPN7UapkiNS13CertValidator16ExpectedCertItemESt6vectorIS4_SaIS4_EEEEbRKNS_17__normal_iteratorIT_T0_EESE_(ptr noundef nonnull align 8 dereferenceable(8) %15, ptr noundef nonnull align 8 dereferenceable(8) %16) #7
  br i1 %49, label %51, label %50

50:                                               ; preds = %48
  store i32 2, ptr %13, align 4
  br label %83

51:                                               ; preds = %48
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #7
  %52 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPPN7UapkiNS13CertValidator16ExpectedCertItemESt6vectorIS4_SaIS4_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %15) #7
  store ptr %52, ptr %17, align 8, !tbaa !5
  %53 = invoke noundef ptr @_ZNK7UapkiNS7SmartBA3getEv(ptr noundef nonnull align 8 dereferenceable(8) %8)
          to label %54 unwind label %73

54:                                               ; preds = %51
  %55 = load ptr, ptr %17, align 8, !tbaa !5
  %56 = load ptr, ptr %55, align 8, !tbaa !5
  %57 = invoke noundef ptr @_ZNK7UapkiNS13CertValidator16ExpectedCertItem7getNameEv(ptr noundef nonnull align 8 dereferenceable(32) %56)
          to label %58 unwind label %73

58:                                               ; preds = %54
  %59 = invoke i32 @ba_cmp(ptr noundef %53, ptr noundef %57)
          to label %60 unwind label %73

60:                                               ; preds = %58
  %61 = icmp eq i32 %59, 0
  br i1 %61, label %62, label %77

62:                                               ; preds = %60
  %63 = invoke noundef ptr @_ZNK7UapkiNS7SmartBA3getEv(ptr noundef nonnull align 8 dereferenceable(8) %9)
          to label %64 unwind label %73

64:                                               ; preds = %62
  %65 = load ptr, ptr %17, align 8, !tbaa !5
  %66 = load ptr, ptr %65, align 8, !tbaa !5
  %67 = invoke noundef ptr @_ZNK7UapkiNS13CertValidator16ExpectedCertItem15getSerialNumberEv(ptr noundef nonnull align 8 dereferenceable(32) %66)
          to label %68 unwind label %73

68:                                               ; preds = %64
  %69 = invoke i32 @ba_cmp(ptr noundef %63, ptr noundef %67)
          to label %70 unwind label %73

70:                                               ; preds = %68
  %71 = icmp eq i32 %69, 0
  br i1 %71, label %72, label %77

72:                                               ; preds = %70
  store i32 0, ptr %4, align 4
  store i32 1, ptr %13, align 4
  br label %78

73:                                               ; preds = %68, %64, %62, %58, %54, %51
  %74 = landingpad { ptr, i32 }
          cleanup
  %75 = extractvalue { ptr, i32 } %74, 0
  store ptr %75, ptr %10, align 8
  %76 = extractvalue { ptr, i32 } %74, 1
  store i32 %76, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  br label %115

77:                                               ; preds = %70, %60
  store i32 0, ptr %13, align 4
  br label %78

78:                                               ; preds = %77, %72
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  %79 = load i32, ptr %13, align 4
  switch i32 %79, label %83 [
    i32 0, label %80
  ]

80:                                               ; preds = %78
  br label %81

81:                                               ; preds = %80
  %82 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPPN7UapkiNS13CertValidator16ExpectedCertItemESt6vectorIS4_SaIS4_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %15) #7
  br label %48

83:                                               ; preds = %78, %50
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  %84 = load i32, ptr %13, align 4
  switch i32 %84, label %113 [
    i32 2, label %85
  ]

85:                                               ; preds = %83
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #7
  %86 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 32) #8
          to label %87 unwind label %93

87:                                               ; preds = %85
  %88 = load i32, ptr %6, align 4, !tbaa !9
  invoke void @_ZN7UapkiNS13CertValidator16ExpectedCertItemC1ENS0_10CertEntityE(ptr noundef nonnull align 8 dereferenceable(32) %86, i32 noundef %88)
          to label %89 unwind label %97

89:                                               ; preds = %87
  store ptr %86, ptr %18, align 8, !tbaa !5
  %90 = load ptr, ptr %18, align 8, !tbaa !5
  %91 = icmp ne ptr %90, null
  br i1 %91, label %101, label %92

92:                                               ; preds = %89
  store i32 4097, ptr %4, align 4
  store i32 1, ptr %13, align 4
  br label %111

93:                                               ; preds = %108, %106, %103, %101, %85
  %94 = landingpad { ptr, i32 }
          cleanup
  %95 = extractvalue { ptr, i32 } %94, 0
  store ptr %95, ptr %10, align 8
  %96 = extractvalue { ptr, i32 } %94, 1
  store i32 %96, ptr %11, align 4
  br label %112

97:                                               ; preds = %87
  %98 = landingpad { ptr, i32 }
          cleanup
  %99 = extractvalue { ptr, i32 } %98, 0
  store ptr %99, ptr %10, align 8
  %100 = extractvalue { ptr, i32 } %98, 1
  store i32 %100, ptr %11, align 4
  call void @_ZdlPvm(ptr noundef %86, i64 noundef 32) #9
  br label %112

101:                                              ; preds = %89
  %102 = getelementptr inbounds %"class.UapkiNS::CertValidator::CertValidator", ptr %19, i32 0, i32 3
  invoke void @_ZNSt6vectorIPN7UapkiNS13CertValidator16ExpectedCertItemESaIS3_EE9push_backERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %102, ptr noundef nonnull align 8 dereferenceable(8) %18)
          to label %103 unwind label %93

103:                                              ; preds = %101
  %104 = load ptr, ptr %18, align 8, !tbaa !5
  %105 = invoke noundef ptr @_ZNK7UapkiNS7SmartBA3getEv(ptr noundef nonnull align 8 dereferenceable(8) %9)
          to label %106 unwind label %93

106:                                              ; preds = %103
  %107 = invoke noundef ptr @_ZNK7UapkiNS7SmartBA3getEv(ptr noundef nonnull align 8 dereferenceable(8) %8)
          to label %108 unwind label %93

108:                                              ; preds = %106
  %109 = invoke noundef i32 @_ZN7UapkiNS13CertValidator16ExpectedCertItem19setSignerIdentifierEPK12ByteArray_stS4_(ptr noundef nonnull align 8 dereferenceable(32) %104, ptr noundef %105, ptr noundef %107)
          to label %110 unwind label %93

110:                                              ; preds = %108
  store i32 %109, ptr %4, align 4
  store i32 1, ptr %13, align 4
  br label %111

111:                                              ; preds = %110, %92
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  br label %113

112:                                              ; preds = %97, %93
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  br label %115

113:                                              ; preds = %111, %83, %30
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  call void @_ZN7UapkiNS7SmartBAD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  call void @_ZN7UapkiNS7SmartBAD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  %114 = load i32, ptr %4, align 4
  ret i32 %114

115:                                              ; preds = %112, %73, %36
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  call void @_ZN7UapkiNS7SmartBAD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %9) #7
  br label %116

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

117:                                              ; preds = %116
  %118 = load ptr, ptr %10, align 8
  %119 = load i32, ptr %11, align 4
  %120 = insertvalue { ptr, i32 } poison, ptr %118, 0
  %121 = insertvalue { ptr, i32 } %120, i32 %119, 1
  resume { ptr, i32 } %121
}

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

; 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 ptr @_ZNSt6vectorIPN7UapkiNS13CertValidator16ExpectedCertItemESaIS3_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24)) #1 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPPN7UapkiNS13CertValidator16ExpectedCertItemESt6vectorIS4_SaIS4_EEEEbRKNS_17__normal_iteratorIT_T0_EESE_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #4

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

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

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

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

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

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

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

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

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

declare void @_ZN7UapkiNS13CertValidator16ExpectedCertItemC1ENS0_10CertEntityE(ptr, i32)

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 = { inlinehint 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 #5 = { nobuiltin allocsize(0) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nobuiltin nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nounwind }
attributes #8 = { builtin allocsize(0) }
attributes #9 = { builtin nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"_ZTSN7UapkiNS13CertValidator10CertEntityE", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, 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 }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

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 uwtable
declare dso_local noundef i32 @_ZN7UapkiNS13CertValidator16ExpectedCertItem19setSignerIdentifierEPK12ByteArray_stS4_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, ptr noundef) local_unnamed_addr #2 align 2

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

12:                                               ; preds = %3
  %.not = icmp eq i32 %11, 0
  br i1 %.not, label %15, label %53

13:                                               ; preds = %3
  %14 = landingpad { ptr, i32 }
          cleanup
  br label %54

15:                                               ; preds = %12
  %16 = getelementptr inbounds i8, ptr %0, i64 24
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #7
  %17 = call ptr @_ZNSt6vectorIPN7UapkiNS13CertValidator16ExpectedCertItemESaIS3_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %16) #7
  store ptr %17, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #7
  %18 = call ptr @_ZNSt6vectorIPN7UapkiNS13CertValidator16ExpectedCertItemESaIS3_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %16) #7
  store ptr %18, ptr %7, align 8
  %19 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPPN7UapkiNS13CertValidator16ExpectedCertItemESt6vectorIS4_SaIS4_EEEEbRKNS_17__normal_iteratorIT_T0_EESE_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #7
  br i1 %19, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %15, %.critedge
  %20 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPPN7UapkiNS13CertValidator16ExpectedCertItemESt6vectorIS4_SaIS4_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #7
  %21 = call noundef ptr @_ZNK7UapkiNS7SmartBA3getEv(ptr noundef nonnull align 8 dereferenceable(8) %4)
  %22 = load ptr, ptr %20, align 8, !tbaa !5
  %23 = call noundef ptr @_ZNK7UapkiNS13CertValidator16ExpectedCertItem7getNameEv(ptr noundef nonnull align 8 dereferenceable(32) %22)
  %24 = invoke i32 @ba_cmp(ptr noundef %21, ptr noundef %23)
          to label %25 unwind label %34

25:                                               ; preds = %.lr.ph
  %26 = icmp eq i32 %24, 0
  br i1 %26, label %27, label %.critedge

27:                                               ; preds = %25
  %28 = call noundef ptr @_ZNK7UapkiNS7SmartBA3getEv(ptr noundef nonnull align 8 dereferenceable(8) %5)
  %29 = load ptr, ptr %20, align 8, !tbaa !5
  %30 = call noundef ptr @_ZNK7UapkiNS13CertValidator16ExpectedCertItem15getSerialNumberEv(ptr noundef nonnull align 8 dereferenceable(32) %29)
  %31 = invoke i32 @ba_cmp(ptr noundef %28, ptr noundef %30)
          to label %32 unwind label %34

32:                                               ; preds = %27
  %33 = icmp eq i32 %31, 0
  br i1 %33, label %38, label %.critedge

34:                                               ; preds = %27, %.lr.ph
  %35 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  br label %54

.critedge:                                        ; preds = %32, %25
  %36 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPPN7UapkiNS13CertValidator16ExpectedCertItemESt6vectorIS4_SaIS4_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #7
  %37 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPPN7UapkiNS13CertValidator16ExpectedCertItemESt6vectorIS4_SaIS4_EEEEbRKNS_17__normal_iteratorIT_T0_EESE_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #7
  br i1 %37, label %.lr.ph, label %._crit_edge

38:                                               ; preds = %32
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  br label %53

._crit_edge:                                      ; preds = %.critedge, %15
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #7
  %39 = invoke noalias noundef nonnull dereferenceable(32) ptr @_Znwm(i64 noundef 32) #8
          to label %40 unwind label %42

40:                                               ; preds = %._crit_edge
  invoke void @_ZN7UapkiNS13CertValidator16ExpectedCertItemC1ENS0_10CertEntityE(ptr noundef nonnull align 8 dereferenceable(32) %39, i32 noundef %1)
          to label %41 unwind label %44

41:                                               ; preds = %40
  store ptr %39, ptr %8, align 8, !tbaa !5
  invoke void @_ZNSt6vectorIPN7UapkiNS13CertValidator16ExpectedCertItemESaIS3_EE9push_backERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %16, ptr noundef nonnull align 8 dereferenceable(8) %8)
          to label %46 unwind label %42

42:                                               ; preds = %46, %41, %._crit_edge
  %43 = landingpad { ptr, i32 }
          cleanup
  br label %52

44:                                               ; preds = %40
  %45 = landingpad { ptr, i32 }
          cleanup
  call void @_ZdlPvm(ptr noundef nonnull %39, i64 noundef 32) #9
  br label %52

46:                                               ; preds = %41
  %47 = load ptr, ptr %8, align 8, !tbaa !5
  %48 = call noundef ptr @_ZNK7UapkiNS7SmartBA3getEv(ptr noundef nonnull align 8 dereferenceable(8) %5)
  %49 = call noundef ptr @_ZNK7UapkiNS7SmartBA3getEv(ptr noundef nonnull align 8 dereferenceable(8) %4)
  %50 = invoke noundef i32 @_ZN7UapkiNS13CertValidator16ExpectedCertItem19setSignerIdentifierEPK12ByteArray_stS4_(ptr noundef nonnull align 8 dereferenceable(32) %47, ptr noundef %48, ptr noundef %49)
          to label %51 unwind label %42

51:                                               ; preds = %46
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #7
  br label %53

52:                                               ; preds = %44, %42
  %.pn = phi { ptr, i32 } [ %43, %42 ], [ %45, %44 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #7
  br label %54

53:                                               ; preds = %38, %12, %51
  %.4 = phi i32 [ %50, %51 ], [ 0, %38 ], [ %11, %12 ]
  call void @_ZN7UapkiNS7SmartBAD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %5) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  call void @_ZN7UapkiNS7SmartBAD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #7
  ret i32 %.4

54:                                               ; preds = %52, %34, %13
  %.pn.pn = phi { ptr, i32 } [ %.pn, %52 ], [ %35, %34 ], [ %14, %13 ]
  call void @_ZN7UapkiNS7SmartBAD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %5) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  call void @_ZN7UapkiNS7SmartBAD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #7
  resume { ptr, i32 } %.pn.pn
}

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

; 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 ptr @_ZNSt6vectorIPN7UapkiNS13CertValidator16ExpectedCertItemESaIS3_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPPN7UapkiNS13CertValidator16ExpectedCertItemESt6vectorIS4_SaIS4_EEEEbRKNS_17__normal_iteratorIT_T0_EESE_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #4

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

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

; 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 nounwind uwtable
declare dso_local noundef ptr @_ZNK7UapkiNS13CertValidator16ExpectedCertItem7getNameEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #1 align 2

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

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

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

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

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

declare void @_ZN7UapkiNS13CertValidator16ExpectedCertItemC1ENS0_10CertEntityE(ptr, i32) local_unnamed_addr

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 = { inlinehint 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 #5 = { nobuiltin allocsize(0) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nobuiltin nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nounwind }
attributes #8 = { builtin allocsize(0) }
attributes #9 = { builtin nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass