; LLVM IR from specinfo-ua/UAPKI :: library/common/pkix (certreq-builder)

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

%"struct.UapkiNS::RdName" = type { %"class.std::__cxx11::basic_string", i32, %"class.std::__cxx11::basic_string" }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%struct.AttributeTypeAndValue = type { %struct.ASN__PRIMITIVE_TYPE_s, %struct.ANY, %struct.asn_struct_ctx_s }
%struct.ASN__PRIMITIVE_TYPE_s = type { ptr, i32 }
%struct.ANY = type { ptr, i32, %struct.asn_struct_ctx_s }
%struct.asn_struct_ctx_s = type { i16, i16, i32, ptr, i64 }
%struct.RelativeDistinguishedName = type { %struct.anon.16, %struct.asn_struct_ctx_s }
%struct.anon.16 = type { ptr, i32, i32, ptr }
%struct.Name = type { i32, %"union.Name::Name_u", %struct.asn_struct_ctx_s }
%"union.Name::Name_u" = type { %struct.RDNSequence }
%struct.RDNSequence = type { %struct.anon, %struct.asn_struct_ctx_s }
%struct.anon = type { ptr, i32, i32, ptr }

@.str = external hidden unnamed_addr constant [32 x i8], align 1

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

declare void @ba_free(ptr noundef) #0

; Function Attrs: nounwind allocsize(0,1)
declare noalias ptr @calloc(i64 noundef, i64 noundef) #1

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

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

declare i32 @asn_decode_ba(ptr noundef, ptr noundef, ptr noundef) #0

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN7UapkiNS14CertReqBuilder13nameAddRdNameEP4NameRKNS_6RdNameE(ptr noundef %0, ptr noundef nonnull align 8 dereferenceable(72) %1) #3 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  store i32 0, ptr %5, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  store ptr null, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  store ptr null, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  store ptr null, ptr %8, align 8, !tbaa !5
  %9 = call noalias ptr @calloc(i64 noundef 1, i64 noundef 48) #6
  store ptr %9, ptr %6, align 8, !tbaa !5
  br label %10

10:                                               ; preds = %2
  %11 = load ptr, ptr %6, align 8, !tbaa !5
  %12 = icmp eq ptr %11, null
  br i1 %12, label %13, label %15

13:                                               ; preds = %10
  store i32 1, ptr %5, align 4, !tbaa !9
  %14 = load i32, ptr %5, align 4, !tbaa !9
  call void @stacktrace_create(ptr noundef @.str, i64 noundef 354, i32 noundef %14, ptr noundef null)
  br label %114

15:                                               ; preds = %10
  br label %16

16:                                               ; preds = %15
  br label %17

17:                                               ; preds = %16
  %18 = call noalias ptr @calloc(i64 noundef 1, i64 noundef 80) #6
  store ptr %18, ptr %7, align 8, !tbaa !5
  br label %19

19:                                               ; preds = %17
  %20 = load ptr, ptr %7, align 8, !tbaa !5
  %21 = icmp eq ptr %20, null
  br i1 %21, label %22, label %24

22:                                               ; preds = %19
  store i32 1, ptr %5, align 4, !tbaa !9
  %23 = load i32, ptr %5, align 4, !tbaa !9
  call void @stacktrace_create(ptr noundef @.str, i64 noundef 356, i32 noundef %23, ptr noundef null)
  br label %114

24:                                               ; preds = %19
  br label %25

25:                                               ; preds = %24
  br label %26

26:                                               ; preds = %25
  br label %27

27:                                               ; preds = %26
  %28 = load ptr, ptr %4, align 8, !tbaa !5
  %29 = getelementptr inbounds %"struct.UapkiNS::RdName", ptr %28, i32 0, i32 0
  %30 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %29) #5
  %31 = load ptr, ptr %7, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct.AttributeTypeAndValue, ptr %31, i32 0, i32 0
  %33 = call i32 @asn_set_oid_from_text(ptr noundef %30, ptr noundef %32)
  store i32 %33, ptr %5, align 4, !tbaa !9
  %34 = load i32, ptr %5, align 4, !tbaa !9
  %35 = icmp ne i32 %34, 0
  br i1 %35, label %36, label %38

36:                                               ; preds = %27
  %37 = load i32, ptr %5, align 4, !tbaa !9
  call void @stacktrace_add(ptr noundef @.str, i64 noundef 357, i32 noundef %37)
  br label %114

38:                                               ; preds = %27
  br label %39

39:                                               ; preds = %38
  br label %40

40:                                               ; preds = %39
  %41 = load ptr, ptr %4, align 8, !tbaa !5
  %42 = getelementptr inbounds %"struct.UapkiNS::RdName", ptr %41, i32 0, i32 1
  %43 = load i32, ptr %42, align 8, !tbaa !11
  switch i32 %43, label %70 [
    i32 1, label %44
    i32 2, label %57
  ]

44:                                               ; preds = %40
  br label %45

45:                                               ; preds = %44
  %46 = load ptr, ptr %4, align 8, !tbaa !5
  %47 = getelementptr inbounds %"struct.UapkiNS::RdName", ptr %46, i32 0, i32 2
  %48 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %47) #5
  %49 = call noundef i32 @_ZN7UapkiNS4Util21encodePrintableStringEPKcPP12ByteArray_st(ptr noundef %48, ptr noundef %8)
  store i32 %49, ptr %5, align 4, !tbaa !9
  %50 = load i32, ptr %5, align 4, !tbaa !9
  %51 = icmp ne i32 %50, 0
  br i1 %51, label %52, label %54

52:                                               ; preds = %45
  %53 = load i32, ptr %5, align 4, !tbaa !9
  call void @stacktrace_add(ptr noundef @.str, i64 noundef 360, i32 noundef %53)
  br label %114

54:                                               ; preds = %45
  br label %55

55:                                               ; preds = %54
  br label %56

56:                                               ; preds = %55
  br label %75

57:                                               ; preds = %40
  br label %58

58:                                               ; preds = %57
  %59 = load ptr, ptr %4, align 8, !tbaa !5
  %60 = getelementptr inbounds %"struct.UapkiNS::RdName", ptr %59, i32 0, i32 2
  %61 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %60) #5
  %62 = call noundef i32 @_ZN7UapkiNS4Util16encodeUtf8stringEPKcPP12ByteArray_st(ptr noundef %61, ptr noundef %8)
  store i32 %62, ptr %5, align 4, !tbaa !9
  %63 = load i32, ptr %5, align 4, !tbaa !9
  %64 = icmp ne i32 %63, 0
  br i1 %64, label %65, label %67

65:                                               ; preds = %58
  %66 = load i32, ptr %5, align 4, !tbaa !9
  call void @stacktrace_add(ptr noundef @.str, i64 noundef 363, i32 noundef %66)
  br label %114

67:                                               ; preds = %58
  br label %68

68:                                               ; preds = %67
  br label %69

69:                                               ; preds = %68
  br label %75

70:                                               ; preds = %40
  br label %71

71:                                               ; preds = %70
  store i32 4118, ptr %5, align 4, !tbaa !9
  %72 = load i32, ptr %5, align 4, !tbaa !9
  call void @stacktrace_create(ptr noundef @.str, i64 noundef 366, i32 noundef %72, ptr noundef null)
  br label %114

73:                                               ; No predecessors!
  br label %74

74:                                               ; preds = %73
  br label %75

75:                                               ; preds = %74, %69, %56
  br label %76

76:                                               ; preds = %75
  %77 = call ptr @get_ANY_desc()
  %78 = load ptr, ptr %7, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct.AttributeTypeAndValue, ptr %78, i32 0, i32 1
  %80 = load ptr, ptr %8, align 8, !tbaa !5
  %81 = call i32 @asn_decode_ba(ptr noundef %77, ptr noundef %79, ptr noundef %80)
  store i32 %81, ptr %5, align 4, !tbaa !9
  %82 = load i32, ptr %5, align 4, !tbaa !9
  %83 = icmp ne i32 %82, 0
  br i1 %83, label %84, label %86

84:                                               ; preds = %76
  %85 = load i32, ptr %5, align 4, !tbaa !9
  call void @stacktrace_add(ptr noundef @.str, i64 noundef 368, i32 noundef %85)
  br label %114

86:                                               ; preds = %76
  br label %87

87:                                               ; preds = %86
  br label %88

88:                                               ; preds = %87
  br label %89

89:                                               ; preds = %88
  %90 = load ptr, ptr %6, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct.RelativeDistinguishedName, ptr %90, i32 0, i32 0
  %92 = load ptr, ptr %7, align 8, !tbaa !5
  %93 = call i32 @asn_set_add(ptr noundef %91, ptr noundef %92)
  store i32 %93, ptr %5, align 4, !tbaa !9
  %94 = load i32, ptr %5, align 4, !tbaa !9
  %95 = icmp ne i32 %94, 0
  br i1 %95, label %96, label %98

96:                                               ; preds = %89
  %97 = load i32, ptr %5, align 4, !tbaa !9
  call void @stacktrace_add(ptr noundef @.str, i64 noundef 370, i32 noundef %97)
  br label %114

98:                                               ; preds = %89
  br label %99

99:                                               ; preds = %98
  br label %100

100:                                              ; preds = %99
  store ptr null, ptr %7, align 8, !tbaa !5
  br label %101

101:                                              ; preds = %100
  %102 = load ptr, ptr %3, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct.Name, ptr %102, i32 0, i32 1
  %104 = getelementptr inbounds %struct.RDNSequence, ptr %103, i32 0, i32 0
  %105 = load ptr, ptr %6, align 8, !tbaa !5
  %106 = call i32 @asn_set_add(ptr noundef %104, ptr noundef %105)
  store i32 %106, ptr %5, align 4, !tbaa !9
  %107 = load i32, ptr %5, align 4, !tbaa !9
  %108 = icmp ne i32 %107, 0
  br i1 %108, label %109, label %111

109:                                              ; preds = %101
  %110 = load i32, ptr %5, align 4, !tbaa !9
  call void @stacktrace_add(ptr noundef @.str, i64 noundef 373, i32 noundef %110)
  br label %114

111:                                              ; preds = %101
  br label %112

112:                                              ; preds = %111
  br label %113

113:                                              ; preds = %112
  store ptr null, ptr %6, align 8, !tbaa !5
  br label %114

114:                                              ; preds = %113, %109, %96, %84, %71, %65, %52, %36, %22, %13
  %115 = call ptr @get_RelativeDistinguishedName_desc()
  %116 = load ptr, ptr %6, align 8, !tbaa !5
  call void @asn_free(ptr noundef %115, ptr noundef %116)
  %117 = call ptr @get_AttributeTypeAndValue_desc()
  %118 = load ptr, ptr %7, align 8, !tbaa !5
  call void @asn_free(ptr noundef %117, ptr noundef %118)
  %119 = load ptr, ptr %8, align 8, !tbaa !5
  call void @ba_free(ptr noundef %119)
  %120 = load i32, ptr %5, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  ret i32 %120
}

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

declare i32 @asn_set_oid_from_text(ptr noundef, ptr noundef) #0

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

declare ptr @get_ANY_desc() #0

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

declare noundef i32 @_ZN7UapkiNS4Util21encodePrintableStringEPKcPP12ByteArray_st(ptr noundef, ptr noundef) #0

declare noundef i32 @_ZN7UapkiNS4Util16encodeUtf8stringEPKcPP12ByteArray_st(ptr noundef, ptr noundef) #0

declare i32 @asn_set_add(ptr noundef, ptr noundef) #0

declare ptr @get_RelativeDistinguishedName_desc() #0

declare ptr @get_AttributeTypeAndValue_desc() #0

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

!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, !16, i64 32}
!12 = !{!"_ZTSN7UapkiNS6RdNameE", !13, i64 0, !16, i64 32, !13, i64 40}
!13 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !14, i64 0, !15, i64 8, !7, i64 16}
!14 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!15 = !{!"long", !7, i64 0}
!16 = !{!"_ZTSN7UapkiNS6RdName10StringTypeE", !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"

@.str = external hidden unnamed_addr constant [32 x i8], align 1

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

declare void @ba_free(ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @calloc(i64 noundef, i64 noundef) local_unnamed_addr #1

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

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

declare i32 @asn_decode_ba(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN7UapkiNS14CertReqBuilder13nameAddRdNameEP4NameRKNS_6RdNameE(ptr noundef %0, ptr noundef nonnull align 8 dereferenceable(72) %1) local_unnamed_addr #3 align 2 {
  %3 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #5
  store ptr null, ptr %3, align 8, !tbaa !5
  %4 = tail call noalias dereferenceable_or_null(48) ptr @calloc(i64 noundef 1, i64 noundef 48) #6
  %5 = icmp eq ptr %4, null
  br i1 %5, label %6, label %7

6:                                                ; preds = %2
  tail call void @stacktrace_create(ptr noundef nonnull @.str, i64 noundef 354, i32 noundef 1, ptr noundef null)
  br label %42

7:                                                ; preds = %2
  %8 = tail call noalias dereferenceable_or_null(80) ptr @calloc(i64 noundef 1, i64 noundef 80) #6
  %9 = icmp eq ptr %8, null
  br i1 %9, label %10, label %11

10:                                               ; preds = %7
  tail call void @stacktrace_create(ptr noundef nonnull @.str, i64 noundef 356, i32 noundef 1, ptr noundef null)
  br label %42

11:                                               ; preds = %7
  %12 = tail call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %1) #5
  %13 = tail call i32 @asn_set_oid_from_text(ptr noundef %12, ptr noundef nonnull %8)
  %.not = icmp eq i32 %13, 0
  br i1 %.not, label %15, label %14

14:                                               ; preds = %11
  tail call void @stacktrace_add(ptr noundef nonnull @.str, i64 noundef 357, i32 noundef %13)
  br label %42

15:                                               ; preds = %11
  %16 = getelementptr inbounds i8, ptr %1, i64 32
  %17 = load i32, ptr %16, align 8, !tbaa !9
  switch i32 %17, label %28 [
    i32 1, label %18
    i32 2, label %23
  ]

18:                                               ; preds = %15
  %19 = getelementptr inbounds i8, ptr %1, i64 40
  %20 = tail call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %19) #5
  %21 = call noundef i32 @_ZN7UapkiNS4Util21encodePrintableStringEPKcPP12ByteArray_st(ptr noundef %20, ptr noundef nonnull %3)
  %.not42 = icmp eq i32 %21, 0
  br i1 %.not42, label %29, label %22

22:                                               ; preds = %18
  call void @stacktrace_add(ptr noundef nonnull @.str, i64 noundef 360, i32 noundef %21)
  br label %42

23:                                               ; preds = %15
  %24 = getelementptr inbounds i8, ptr %1, i64 40
  %25 = tail call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %24) #5
  %26 = call noundef i32 @_ZN7UapkiNS4Util16encodeUtf8stringEPKcPP12ByteArray_st(ptr noundef %25, ptr noundef nonnull %3)
  %.not41 = icmp eq i32 %26, 0
  br i1 %.not41, label %29, label %27

27:                                               ; preds = %23
  call void @stacktrace_add(ptr noundef nonnull @.str, i64 noundef 363, i32 noundef %26)
  br label %42

28:                                               ; preds = %15
  tail call void @stacktrace_create(ptr noundef nonnull @.str, i64 noundef 366, i32 noundef 4118, ptr noundef null)
  br label %42

29:                                               ; preds = %18, %23
  %30 = call ptr @get_ANY_desc()
  %31 = getelementptr inbounds i8, ptr %8, i64 16
  %32 = load ptr, ptr %3, align 8, !tbaa !5
  %33 = call i32 @asn_decode_ba(ptr noundef %30, ptr noundef nonnull %31, ptr noundef %32)
  %.not43 = icmp eq i32 %33, 0
  br i1 %.not43, label %35, label %34

34:                                               ; preds = %29
  call void @stacktrace_add(ptr noundef nonnull @.str, i64 noundef 368, i32 noundef %33)
  br label %42

35:                                               ; preds = %29
  %36 = call i32 @asn_set_add(ptr noundef nonnull %4, ptr noundef nonnull %8)
  %.not44 = icmp eq i32 %36, 0
  br i1 %.not44, label %38, label %37

37:                                               ; preds = %35
  call void @stacktrace_add(ptr noundef nonnull @.str, i64 noundef 370, i32 noundef %36)
  br label %42

38:                                               ; preds = %35
  %39 = getelementptr inbounds i8, ptr %0, i64 8
  %40 = call i32 @asn_set_add(ptr noundef nonnull %39, ptr noundef nonnull %4)
  %.not45 = icmp eq i32 %40, 0
  br i1 %.not45, label %42, label %41

41:                                               ; preds = %38
  call void @stacktrace_add(ptr noundef nonnull @.str, i64 noundef 373, i32 noundef %40)
  br label %42

42:                                               ; preds = %38, %41, %37, %34, %28, %27, %22, %14, %10, %6
  %.030 = phi i32 [ 1, %6 ], [ 1, %10 ], [ %13, %14 ], [ 4118, %28 ], [ %26, %27 ], [ %33, %34 ], [ %36, %37 ], [ %40, %41 ], [ %21, %22 ], [ 0, %38 ]
  %.029 = phi ptr [ null, %6 ], [ %4, %10 ], [ %4, %14 ], [ %4, %28 ], [ %4, %27 ], [ %4, %34 ], [ %4, %37 ], [ %4, %41 ], [ %4, %22 ], [ null, %38 ]
  %.0 = phi ptr [ null, %6 ], [ null, %10 ], [ %8, %14 ], [ %8, %28 ], [ %8, %27 ], [ %8, %34 ], [ %8, %37 ], [ null, %41 ], [ %8, %22 ], [ null, %38 ]
  %43 = call ptr @get_RelativeDistinguishedName_desc()
  call void @asn_free(ptr noundef %43, ptr noundef %.029)
  %44 = call ptr @get_AttributeTypeAndValue_desc()
  call void @asn_free(ptr noundef %44, ptr noundef %.0)
  %45 = load ptr, ptr %3, align 8, !tbaa !5
  call void @ba_free(ptr noundef %45)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #5
  ret i32 %.030
}

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

declare i32 @asn_set_oid_from_text(ptr noundef, ptr noundef) local_unnamed_addr #0

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

declare ptr @get_ANY_desc() local_unnamed_addr #0

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

declare noundef i32 @_ZN7UapkiNS4Util21encodePrintableStringEPKcPP12ByteArray_st(ptr noundef, ptr noundef) local_unnamed_addr #0

declare noundef i32 @_ZN7UapkiNS4Util16encodeUtf8stringEPKcPP12ByteArray_st(ptr noundef, ptr noundef) local_unnamed_addr #0

declare i32 @asn_set_add(ptr noundef, ptr noundef) local_unnamed_addr #0

declare ptr @get_RelativeDistinguishedName_desc() local_unnamed_addr #0

declare ptr @get_AttributeTypeAndValue_desc() local_unnamed_addr #0

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

!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, !14, i64 32}
!10 = !{!"_ZTSN7UapkiNS6RdNameE", !11, i64 0, !14, i64 32, !11, i64 40}
!11 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !12, i64 0, !13, i64 8, !7, i64 16}
!12 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!13 = !{!"long", !7, i64 0}
!14 = !{!"_ZTSN7UapkiNS6RdName10StringTypeE", !7, i64 0}


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