; LLVM IR from specinfo-ua/UAPKI :: library/uapki/src/cer-item.ll (ZN7UapkiNS4Cert8parseSIDEPK12ByteArray_stPPS1_S5_S5_)

; 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 }
%struct.SignerIdentifier = type { i32, %"union.SignerIdentifier::SignerIdentifier_u", %struct.asn_struct_ctx_s }
%"union.SignerIdentifier::SignerIdentifier_u" = type { %struct.IssuerAndSerialNumber }
%struct.IssuerAndSerialNumber = type { %struct.Name, %struct.ASN__PRIMITIVE_TYPE_s, %struct.asn_struct_ctx_s }
%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 }
%struct.ASN__PRIMITIVE_TYPE_s = type { ptr, i32 }
%struct.asn_struct_ctx_s = type { i16, i16, i32, ptr, i64 }

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

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

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

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

declare ptr @get_Name_desc() #0

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

declare i64 @ba_get_len(ptr noundef) #0

declare ptr @get_SignerIdentifier_desc() #0

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

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

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

17:                                               ; preds = %4
  %18 = load ptr, ptr %6, align 8, !tbaa !5
  %19 = invoke i64 @ba_get_len(ptr noundef %18)
          to label %20 unwind label %36

20:                                               ; preds = %17
  %21 = icmp ult i64 %19, 3
  br i1 %21, label %31, label %22

22:                                               ; preds = %20
  %23 = load ptr, ptr %7, align 8, !tbaa !5
  %24 = icmp ne ptr %23, null
  br i1 %24, label %25, label %31

25:                                               ; preds = %22
  %26 = load ptr, ptr %8, align 8, !tbaa !5
  %27 = icmp ne ptr %26, null
  br i1 %27, label %28, label %31

28:                                               ; preds = %25
  %29 = load ptr, ptr %9, align 8, !tbaa !5
  %30 = icmp ne ptr %29, null
  br i1 %30, label %40, label %31

31:                                               ; preds = %28, %25, %22, %20
  store i32 4101, ptr %5, align 4
  store i32 1, ptr %16, align 4
  br label %121

32:                                               ; preds = %4
  %33 = landingpad { ptr, i32 }
          cleanup
  %34 = extractvalue { ptr, i32 } %33, 0
  store ptr %34, ptr %14, align 8
  %35 = extractvalue { ptr, i32 } %33, 1
  store i32 %35, ptr %15, align 4
  br label %123

36:                                               ; preds = %117, %115, %107, %99, %93, %91, %86, %81, %76, %70, %65, %60, %58, %48, %43, %41, %17
  %37 = landingpad { ptr, i32 }
          cleanup
  %38 = extractvalue { ptr, i32 } %37, 0
  store ptr %38, ptr %14, align 8
  %39 = extractvalue { ptr, i32 } %37, 1
  store i32 %39, ptr %15, align 4
  call void @_ZN7UapkiNS7SmartBAD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %13) #4
  br label %123

40:                                               ; preds = %28
  br label %41

41:                                               ; preds = %40
  %42 = invoke ptr @get_SignerIdentifier_desc()
          to label %43 unwind label %36

43:                                               ; preds = %41
  %44 = load ptr, ptr %6, align 8, !tbaa !5
  %45 = invoke ptr @asn_decode_ba_with_alloc(ptr noundef %42, ptr noundef %44)
          to label %46 unwind label %36

46:                                               ; preds = %43
  store ptr %45, ptr %11, align 8, !tbaa !5
  %47 = icmp eq ptr null, %45
  br i1 %47, label %48, label %51

48:                                               ; preds = %46
  store i32 2, ptr %10, align 4, !tbaa !9
  %49 = load i32, ptr %10, align 4, !tbaa !9
  invoke void @stacktrace_add(ptr noundef @.str, i64 noundef 731, i32 noundef %49)
          to label %50 unwind label %36

50:                                               ; preds = %48
  br label %115

51:                                               ; preds = %46
  br label %52

52:                                               ; preds = %51
  br label %53

53:                                               ; preds = %52
  %54 = load ptr, ptr %11, align 8, !tbaa !5
  %55 = getelementptr inbounds %struct.SignerIdentifier, ptr %54, i32 0, i32 0
  %56 = load i32, ptr %55, align 8, !tbaa !11
  switch i32 %56, label %113 [
    i32 1, label %57
    i32 2, label %98
  ]

57:                                               ; preds = %53
  br label %58

58:                                               ; preds = %57
  %59 = invoke ptr @get_Name_desc()
          to label %60 unwind label %36

60:                                               ; preds = %58
  %61 = load ptr, ptr %11, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.SignerIdentifier, ptr %61, i32 0, i32 1
  %63 = getelementptr inbounds %struct.IssuerAndSerialNumber, ptr %62, i32 0, i32 0
  %64 = invoke noundef ptr @_ZN7UapkiNS7SmartBAadEv(ptr noundef nonnull align 8 dereferenceable(8) %12)
          to label %65 unwind label %36

65:                                               ; preds = %60
  %66 = invoke i32 @asn_encode_ba(ptr noundef %59, ptr noundef %63, ptr noundef %64)
          to label %67 unwind label %36

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

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

72:                                               ; preds = %70
  br label %115

73:                                               ; preds = %67
  br label %74

74:                                               ; preds = %73
  br label %75

75:                                               ; preds = %74
  br label %76

76:                                               ; preds = %75
  %77 = load ptr, ptr %11, align 8, !tbaa !5
  %78 = getelementptr inbounds %struct.SignerIdentifier, ptr %77, i32 0, i32 1
  %79 = getelementptr inbounds %struct.IssuerAndSerialNumber, ptr %78, i32 0, i32 1
  %80 = invoke noundef ptr @_ZN7UapkiNS7SmartBAadEv(ptr noundef nonnull align 8 dereferenceable(8) %13)
          to label %81 unwind label %36

81:                                               ; preds = %76
  %82 = invoke i32 @asn_INTEGER2ba(ptr noundef %79, ptr noundef %80)
          to label %83 unwind label %36

83:                                               ; preds = %81
  store i32 %82, ptr %10, align 4, !tbaa !9
  %84 = load i32, ptr %10, align 4, !tbaa !9
  %85 = icmp ne i32 %84, 0
  br i1 %85, label %86, label %89

86:                                               ; preds = %83
  %87 = load i32, ptr %10, align 4, !tbaa !9
  invoke void @stacktrace_add(ptr noundef @.str, i64 noundef 735, i32 noundef %87)
          to label %88 unwind label %36

88:                                               ; preds = %86
  br label %115

89:                                               ; preds = %83
  br label %90

90:                                               ; preds = %89
  br label %91

91:                                               ; preds = %90
  %92 = invoke noundef ptr @_ZN7UapkiNS7SmartBA3popEv(ptr noundef nonnull align 8 dereferenceable(8) %12)
          to label %93 unwind label %36

93:                                               ; preds = %91
  %94 = load ptr, ptr %7, align 8, !tbaa !5
  store ptr %92, ptr %94, align 8, !tbaa !5
  %95 = invoke noundef ptr @_ZN7UapkiNS7SmartBA3popEv(ptr noundef nonnull align 8 dereferenceable(8) %13)
          to label %96 unwind label %36

96:                                               ; preds = %93
  %97 = load ptr, ptr %8, align 8, !tbaa !5
  store ptr %95, ptr %97, align 8, !tbaa !5
  br label %114

98:                                               ; preds = %53
  br label %99

99:                                               ; preds = %98
  %100 = load ptr, ptr %11, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct.SignerIdentifier, ptr %100, i32 0, i32 1
  %102 = load ptr, ptr %9, align 8, !tbaa !5
  %103 = invoke i32 @asn_OCTSTRING2ba(ptr noundef %101, ptr noundef %102)
          to label %104 unwind label %36

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

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

109:                                              ; preds = %107
  br label %115

110:                                              ; preds = %104
  br label %111

111:                                              ; preds = %110
  br label %112

112:                                              ; preds = %111
  br label %114

113:                                              ; preds = %53
  br label %114

114:                                              ; preds = %113, %112, %96
  br label %115

115:                                              ; preds = %114, %109, %88, %72, %50
  %116 = invoke ptr @get_SignerIdentifier_desc()
          to label %117 unwind label %36

117:                                              ; preds = %115
  %118 = load ptr, ptr %11, align 8, !tbaa !5
  invoke void @asn_free(ptr noundef %116, ptr noundef %118)
          to label %119 unwind label %36

119:                                              ; preds = %117
  %120 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %120, ptr %5, align 4
  store i32 1, ptr %16, align 4
  br label %121

121:                                              ; preds = %119, %31
  call void @_ZN7UapkiNS7SmartBAD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  call void @_ZN7UapkiNS7SmartBAD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  %122 = load i32, ptr %5, align 4
  ret i32 %122

123:                                              ; preds = %36, %32
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  call void @_ZN7UapkiNS7SmartBAD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  br label %124

124:                                              ; preds = %123
  %125 = load ptr, ptr %14, align 8
  %126 = load i32, ptr %15, align 4
  %127 = insertvalue { ptr, i32 } poison, ptr %125, 0
  %128 = insertvalue { ptr, i32 } %127, i32 %126, 1
  resume { ptr, i32 } %128
}

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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #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 = { 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, !13, i64 0}
!12 = !{!"_ZTS16SignerIdentifier", !13, i64 0, !7, i64 8, !14, i64 128}
!13 = !{!"_ZTS19SignerIdentifier_PR", !7, i64 0}
!14 = !{!"_ZTS16asn_struct_ctx_s", !15, i64 0, !15, i64 2, !10, i64 4, !6, i64 8, !16, i64 16}
!15 = !{!"short", !7, i64 0}
!16 = !{!"long", !7, i64 0}


; 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 [19 x i8], align 1

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

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

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

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

declare ptr @get_Name_desc() local_unnamed_addr #0

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

declare i64 @ba_get_len(ptr noundef) local_unnamed_addr #0

declare ptr @get_SignerIdentifier_desc() local_unnamed_addr #0

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN7UapkiNS4Cert8parseSIDEPK12ByteArray_stPPS1_S5_S5_(ptr noundef %0, ptr noundef writeonly %1, ptr noundef writeonly %2, ptr noundef %3) local_unnamed_addr #3 personality ptr @__gxx_personality_v0 {
  %5 = alloca %"class.UapkiNS::SmartBA", align 8
  %6 = alloca %"class.UapkiNS::SmartBA", align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #4
  call void @_ZN7UapkiNS7SmartBAC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %5)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #4
  call void @_ZN7UapkiNS7SmartBAC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %6)
  %7 = invoke i64 @ba_get_len(ptr noundef %0)
          to label %8 unwind label %13

8:                                                ; preds = %4
  %9 = icmp ugt i64 %7, 2
  %10 = icmp ne ptr %1, null
  %or.cond = and i1 %10, %9
  %11 = icmp ne ptr %2, null
  %or.cond3 = and i1 %11, %or.cond
  %12 = icmp ne ptr %3, null
  %or.cond5 = and i1 %12, %or.cond3
  br i1 %or.cond5, label %15, label %49

13:                                               ; preds = %48, %46, %45, %41, %37, %32, %31, %26, %24, %21, %17, %15, %4
  %14 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7UapkiNS7SmartBAD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #4
  call void @_ZN7UapkiNS7SmartBAD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %5) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #4
  resume { ptr, i32 } %14

15:                                               ; preds = %8
  %16 = invoke ptr @get_SignerIdentifier_desc()
          to label %17 unwind label %13

17:                                               ; preds = %15
  %18 = invoke ptr @asn_decode_ba_with_alloc(ptr noundef %16, ptr noundef %0)
          to label %19 unwind label %13

19:                                               ; preds = %17
  %20 = icmp eq ptr %18, null
  br i1 %20, label %21, label %22

21:                                               ; preds = %19
  invoke void @stacktrace_add(ptr noundef nonnull @.str, i64 noundef 731, i32 noundef 2)
          to label %46 unwind label %13

22:                                               ; preds = %19
  %23 = load i32, ptr %18, align 8, !tbaa !5
  switch i32 %23, label %46 [
    i32 1, label %24
    i32 2, label %41
  ]

24:                                               ; preds = %22
  %25 = invoke ptr @get_Name_desc()
          to label %26 unwind label %13

26:                                               ; preds = %24
  %27 = getelementptr inbounds i8, ptr %18, i64 8
  %28 = call noundef ptr @_ZN7UapkiNS7SmartBAadEv(ptr noundef nonnull align 8 dereferenceable(8) %5)
  %29 = invoke i32 @asn_encode_ba(ptr noundef %25, ptr noundef nonnull %27, ptr noundef %28)
          to label %30 unwind label %13

30:                                               ; preds = %26
  %.not37 = icmp eq i32 %29, 0
  br i1 %.not37, label %32, label %31

31:                                               ; preds = %30
  invoke void @stacktrace_add(ptr noundef nonnull @.str, i64 noundef 734, i32 noundef %29)
          to label %46 unwind label %13

32:                                               ; preds = %30
  %33 = getelementptr inbounds i8, ptr %18, i64 88
  %34 = call noundef ptr @_ZN7UapkiNS7SmartBAadEv(ptr noundef nonnull align 8 dereferenceable(8) %6)
  %35 = invoke i32 @asn_INTEGER2ba(ptr noundef nonnull %33, ptr noundef %34)
          to label %36 unwind label %13

36:                                               ; preds = %32
  %.not38 = icmp eq i32 %35, 0
  br i1 %.not38, label %38, label %37

37:                                               ; preds = %36
  invoke void @stacktrace_add(ptr noundef nonnull @.str, i64 noundef 735, i32 noundef %35)
          to label %46 unwind label %13

38:                                               ; preds = %36
  %39 = call noundef ptr @_ZN7UapkiNS7SmartBA3popEv(ptr noundef nonnull align 8 dereferenceable(8) %5)
  store ptr %39, ptr %1, align 8, !tbaa !15
  %40 = call noundef ptr @_ZN7UapkiNS7SmartBA3popEv(ptr noundef nonnull align 8 dereferenceable(8) %6)
  store ptr %40, ptr %2, align 8, !tbaa !15
  br label %46

41:                                               ; preds = %22
  %42 = getelementptr inbounds i8, ptr %18, i64 8
  %43 = invoke i32 @asn_OCTSTRING2ba(ptr noundef nonnull %42, ptr noundef nonnull %3)
          to label %44 unwind label %13

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

45:                                               ; preds = %44
  invoke void @stacktrace_add(ptr noundef nonnull @.str, i64 noundef 740, i32 noundef %43)
          to label %46 unwind label %13

46:                                               ; preds = %38, %44, %22, %45, %37, %31, %21
  %.028 = phi i32 [ 2, %21 ], [ 0, %22 ], [ %43, %45 ], [ 0, %44 ], [ %29, %31 ], [ %35, %37 ], [ 0, %38 ]
  %47 = invoke ptr @get_SignerIdentifier_desc()
          to label %48 unwind label %13

48:                                               ; preds = %46
  invoke void @asn_free(ptr noundef %47, ptr noundef %18)
          to label %49 unwind label %13

49:                                               ; preds = %48, %8
  %.0 = phi i32 [ 4101, %8 ], [ %.028, %48 ]
  call void @_ZN7UapkiNS7SmartBAD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #4
  call void @_ZN7UapkiNS7SmartBAD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %5) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #4
  ret i32 %.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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #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 = { 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, !7, i64 0}
!6 = !{!"_ZTS16SignerIdentifier", !7, i64 0, !8, i64 8, !10, i64 128}
!7 = !{!"_ZTS19SignerIdentifier_PR", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTS16asn_struct_ctx_s", !11, i64 0, !11, i64 2, !12, i64 4, !13, i64 8, !14, i64 16}
!11 = !{!"short", !8, i64 0}
!12 = !{!"int", !8, i64 0}
!13 = !{!"any pointer", !8, i64 0}
!14 = !{!"long", !8, i64 0}
!15 = !{!13, !13, i64 0}


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