; LLVM IR from specinfo-ua/UAPKI :: library/common/pkix (extension-helper)

; 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.BasicConstraints = type { ptr, ptr, %struct.asn_struct_ctx_s }
%struct.asn_struct_ctx_s = type { i16, i16, i32, ptr, i64 }

@.str = external hidden unnamed_addr constant [33 x i8], align 1
@OID_X509v3_BasicConstraints = external global ptr, align 8

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.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 noundef ptr @_ZN7UapkiNS7SmartBAadEv(ptr noundef nonnull align 8 dereferenceable(8)) #1 align 2

declare i32 @__gxx_personality_v0(...)

declare void @stacktrace_add(ptr noundef, i64 noundef, i32 noundef) #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 nounwind uwtable
declare dso_local void @_ZN7UapkiNS7SmartBAD2Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #1 align 2

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN7UapkiNS15ExtensionHelper18getBasicConstrainsEPK10ExtensionsRbRi(ptr noundef %0, ptr noundef nonnull align 1 dereferenceable(1) %1, ptr noundef nonnull align 4 dereferenceable(4) %2) #3 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 ptr, align 8
  %10 = alloca %"class.UapkiNS::SmartBA", align 8
  %11 = alloca i8, align 1
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca i64, align 8
  %15 = 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
  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
  store ptr null, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  call void @_ZN7UapkiNS7SmartBAC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %10)
  call void @llvm.lifetime.start.p0(i64 1, ptr %11) #4
  store i8 0, ptr %11, align 1, !tbaa !11
  br label %16

16:                                               ; preds = %3
  %17 = load ptr, ptr %6, align 8, !tbaa !5
  %18 = load i8, ptr %17, align 1, !tbaa !11, !range !13, !noundef !14
  %19 = trunc i8 %18 to i1
  br i1 %19, label %27, label %20

20:                                               ; preds = %16
  store i32 2, ptr %8, align 4, !tbaa !9
  %21 = load i32, ptr %8, align 4, !tbaa !9
  invoke void @stacktrace_create(ptr noundef @.str, i64 noundef 183, i32 noundef %21, ptr noundef null)
          to label %22 unwind label %23

22:                                               ; preds = %20
  br label %117

23:                                               ; preds = %119, %117, %63, %59, %57, %55, %49, %44, %40, %34, %20
  %24 = landingpad { ptr, i32 }
          cleanup
  %25 = extractvalue { ptr, i32 } %24, 0
  store ptr %25, ptr %12, align 8
  %26 = extractvalue { ptr, i32 } %24, 1
  store i32 %26, ptr %13, align 4
  br label %125

27:                                               ; preds = %16
  br label %28

28:                                               ; preds = %27
  br label %29

29:                                               ; preds = %28
  br label %30

30:                                               ; preds = %29
  %31 = load ptr, ptr %7, align 8, !tbaa !5
  %32 = load i32, ptr %31, align 4, !tbaa !9
  %33 = icmp ne i32 %32, 0
  br i1 %33, label %37, label %34

34:                                               ; preds = %30
  store i32 2, ptr %8, align 4, !tbaa !9
  %35 = load i32, ptr %8, align 4, !tbaa !9
  invoke void @stacktrace_create(ptr noundef @.str, i64 noundef 184, i32 noundef %35, ptr noundef null)
          to label %36 unwind label %23

36:                                               ; preds = %34
  br label %117

37:                                               ; preds = %30
  br label %38

38:                                               ; preds = %37
  br label %39

39:                                               ; preds = %38
  br label %40

40:                                               ; preds = %39
  %41 = load ptr, ptr %5, align 8, !tbaa !5
  %42 = load ptr, ptr @OID_X509v3_BasicConstraints, align 8, !tbaa !5
  %43 = invoke noundef ptr @_ZN7UapkiNS7SmartBAadEv(ptr noundef nonnull align 8 dereferenceable(8) %10)
          to label %44 unwind label %23

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

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 186, i32 noundef %50)
          to label %51 unwind label %23

51:                                               ; preds = %49
  br label %117

52:                                               ; preds = %46
  br label %53

53:                                               ; preds = %52
  br label %54

54:                                               ; preds = %53
  br label %55

55:                                               ; preds = %54
  %56 = invoke ptr @get_BasicConstraints_desc()
          to label %57 unwind label %23

57:                                               ; preds = %55
  %58 = invoke noundef ptr @_ZNK7UapkiNS7SmartBA3getEv(ptr noundef nonnull align 8 dereferenceable(8) %10)
          to label %59 unwind label %23

59:                                               ; preds = %57
  %60 = invoke ptr @asn_decode_ba_with_alloc(ptr noundef %56, ptr noundef %58)
          to label %61 unwind label %23

61:                                               ; preds = %59
  store ptr %60, ptr %9, align 8, !tbaa !5
  %62 = icmp eq ptr null, %60
  br i1 %62, label %63, label %66

63:                                               ; preds = %61
  store i32 2, ptr %8, align 4, !tbaa !9
  %64 = load i32, ptr %8, align 4, !tbaa !9
  invoke void @stacktrace_add(ptr noundef @.str, i64 noundef 188, i32 noundef %64)
          to label %65 unwind label %23

65:                                               ; preds = %63
  br label %117

66:                                               ; preds = %61
  br label %67

67:                                               ; preds = %66
  br label %68

68:                                               ; preds = %67
  %69 = load ptr, ptr %6, align 8, !tbaa !5
  store i8 0, ptr %69, align 1, !tbaa !11
  %70 = load ptr, ptr %9, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct.BasicConstraints, ptr %70, i32 0, i32 0
  %72 = load ptr, ptr %71, align 8, !tbaa !15
  %73 = icmp ne ptr %72, null
  br i1 %73, label %74, label %81

74:                                               ; preds = %68
  %75 = load ptr, ptr %9, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.BasicConstraints, ptr %75, i32 0, i32 0
  %77 = load ptr, ptr %76, align 8, !tbaa !15
  %78 = icmp ne ptr %77, null
  %79 = load ptr, ptr %6, align 8, !tbaa !5
  %80 = zext i1 %78 to i8
  store i8 %80, ptr %79, align 1, !tbaa !11
  br label %81

81:                                               ; preds = %74, %68
  %82 = load ptr, ptr %7, align 8, !tbaa !5
  store i32 -1, ptr %82, align 4, !tbaa !9
  %83 = load ptr, ptr %9, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct.BasicConstraints, ptr %83, i32 0, i32 1
  %85 = load ptr, ptr %84, align 8, !tbaa !20
  %86 = icmp ne ptr %85, null
  br i1 %86, label %87, label %112

87:                                               ; preds = %81
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  br label %88

88:                                               ; preds = %87
  %89 = load ptr, ptr %9, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct.BasicConstraints, ptr %89, i32 0, i32 1
  %91 = load ptr, ptr %90, align 8, !tbaa !20
  %92 = invoke i32 @asn_INTEGER2long(ptr noundef %91, ptr noundef %14)
          to label %93 unwind label %99

93:                                               ; preds = %88
  store i32 %92, ptr %8, align 4, !tbaa !9
  %94 = load i32, ptr %8, align 4, !tbaa !9
  %95 = icmp ne i32 %94, 0
  br i1 %95, label %96, label %103

96:                                               ; preds = %93
  %97 = load i32, ptr %8, align 4, !tbaa !9
  invoke void @stacktrace_add(ptr noundef @.str, i64 noundef 198, i32 noundef %97)
          to label %98 unwind label %99

98:                                               ; preds = %96
  store i32 4, ptr %15, align 4
  br label %109

99:                                               ; preds = %96, %88
  %100 = landingpad { ptr, i32 }
          cleanup
  %101 = extractvalue { ptr, i32 } %100, 0
  store ptr %101, ptr %12, align 8
  %102 = extractvalue { ptr, i32 } %100, 1
  store i32 %102, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  br label %125

103:                                              ; preds = %93
  br label %104

104:                                              ; preds = %103
  br label %105

105:                                              ; preds = %104
  %106 = load i64, ptr %14, align 8, !tbaa !21
  %107 = trunc i64 %106 to i32
  %108 = load ptr, ptr %7, align 8, !tbaa !5
  store i32 %107, ptr %108, align 4, !tbaa !9
  store i32 0, ptr %15, align 4
  br label %109

109:                                              ; preds = %105, %98
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  %110 = load i32, ptr %15, align 4
  switch i32 %110, label %123 [
    i32 0, label %111
    i32 4, label %117
  ]

111:                                              ; preds = %109
  br label %112

112:                                              ; preds = %111, %81
  %113 = load i8, ptr %11, align 1, !tbaa !11, !range !13, !noundef !14
  %114 = trunc i8 %113 to i1
  %115 = zext i1 %114 to i64
  %116 = select i1 %114, i32 0, i32 4151
  store i32 %116, ptr %8, align 4, !tbaa !9
  br label %117

117:                                              ; preds = %112, %109, %65, %51, %36, %22
  %118 = invoke ptr @get_BasicConstraints_desc()
          to label %119 unwind label %23

119:                                              ; preds = %117
  %120 = load ptr, ptr %9, align 8, !tbaa !5
  invoke void @asn_free(ptr noundef %118, ptr noundef %120)
          to label %121 unwind label %23

121:                                              ; preds = %119
  %122 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %122, ptr %4, align 4
  store i32 1, ptr %15, align 4
  br label %123

123:                                              ; preds = %121, %109
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #4
  call void @_ZN7UapkiNS7SmartBAD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  %124 = load i32, ptr %4, align 4
  ret i32 %124

125:                                              ; preds = %99, %23
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #4
  call void @_ZN7UapkiNS7SmartBAD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  br label %126

126:                                              ; preds = %125
  %127 = load ptr, ptr %12, align 8
  %128 = load i32, ptr %13, align 4
  %129 = insertvalue { ptr, i32 } poison, ptr %127, 0
  %130 = insertvalue { ptr, i32 } %129, i32 %128, 1
  resume { ptr, i32 } %130
}

declare ptr @get_BasicConstraints_desc() #2

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

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 = { "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, !12, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{i8 0, i8 2}
!14 = !{}
!15 = !{!16, !6, i64 0}
!16 = !{!"_ZTS16BasicConstraints", !6, i64 0, !6, i64 8, !17, i64 16}
!17 = !{!"_ZTS16asn_struct_ctx_s", !18, i64 0, !18, i64 2, !10, i64 4, !6, i64 8, !19, i64 16}
!18 = !{!"short", !7, i64 0}
!19 = !{!"long", !7, i64 0}
!20 = !{!16, !6, i64 8}
!21 = !{!19, !19, 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 [33 x i8], align 1
@OID_X509v3_BasicConstraints = external local_unnamed_addr global ptr, align 8

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNK7UapkiNS7SmartBA3getEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN7UapkiNS15ExtensionHelper18getBasicConstrainsEPK10ExtensionsRbRi(ptr noundef %0, ptr nocapture noundef nonnull align 1 dereferenceable(1) %1, ptr nocapture noundef nonnull align 4 dereferenceable(4) %2) local_unnamed_addr #3 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.UapkiNS::SmartBA", align 8
  %5 = alloca i8, align 1
  %6 = alloca i64, 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 1, ptr nonnull %5) #4
  store i8 0, ptr %5, align 1, !tbaa !5
  %7 = load i8, ptr %1, align 1, !tbaa !5, !range !9, !noundef !10
  %8 = trunc nuw i8 %7 to i1
  br i1 %8, label %11, label %.invoke

9:                                                ; preds = %.invoke, %47, %45, %27, %22, %20, %19, %14
  %10 = landingpad { ptr, i32 }
          cleanup
  br label %49

11:                                               ; preds = %3
  %12 = load i32, ptr %2, align 4, !tbaa !11
  %.not = icmp eq i32 %12, 0
  br i1 %.not, label %.invoke, label %14

.invoke:                                          ; preds = %3, %11
  %13 = phi i64 [ 184, %11 ], [ 183, %3 ]
  invoke void @stacktrace_create(ptr noundef nonnull @.str, i64 noundef %13, i32 noundef 2, ptr noundef null)
          to label %45 unwind label %9

14:                                               ; preds = %11
  %15 = load ptr, ptr @OID_X509v3_BasicConstraints, align 8, !tbaa !13
  %16 = call noundef ptr @_ZN7UapkiNS7SmartBAadEv(ptr noundef nonnull align 8 dereferenceable(8) %4)
  %17 = invoke noundef i32 @_ZN7UapkiNS4Util23extnValueFromExtensionsEPK10ExtensionsPKcPbPP12ByteArray_st(ptr noundef %0, ptr noundef %15, ptr noundef nonnull %5, ptr noundef %16)
          to label %18 unwind label %9

18:                                               ; preds = %14
  %.not31 = icmp eq i32 %17, 0
  br i1 %.not31, label %20, label %19

19:                                               ; preds = %18
  invoke void @stacktrace_add(ptr noundef nonnull @.str, i64 noundef 186, i32 noundef %17)
          to label %45 unwind label %9

20:                                               ; preds = %18
  %21 = invoke ptr @get_BasicConstraints_desc()
          to label %22 unwind label %9

22:                                               ; preds = %20
  %23 = call noundef ptr @_ZNK7UapkiNS7SmartBA3getEv(ptr noundef nonnull align 8 dereferenceable(8) %4)
  %24 = invoke ptr @asn_decode_ba_with_alloc(ptr noundef %21, ptr noundef %23)
          to label %25 unwind label %9

25:                                               ; preds = %22
  %26 = icmp eq ptr %24, null
  br i1 %26, label %27, label %28

27:                                               ; preds = %25
  invoke void @stacktrace_add(ptr noundef nonnull @.str, i64 noundef 188, i32 noundef 2)
          to label %45 unwind label %9

28:                                               ; preds = %25
  %29 = load ptr, ptr %24, align 8, !tbaa !15
  %.not32 = icmp ne ptr %29, null
  %spec.store.select = zext i1 %.not32 to i8
  store i8 %spec.store.select, ptr %1, align 1
  store i32 -1, ptr %2, align 4, !tbaa !11
  %30 = getelementptr inbounds i8, ptr %24, i64 8
  %31 = load ptr, ptr %30, align 8, !tbaa !20
  %.not33 = icmp eq ptr %31, null
  br i1 %.not33, label %41, label %32

32:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #4
  %33 = invoke i32 @asn_INTEGER2long(ptr noundef nonnull %31, ptr noundef nonnull %6)
          to label %34 unwind label %36

34:                                               ; preds = %32
  %.not34 = icmp eq i32 %33, 0
  br i1 %.not34, label %.thread, label %35

35:                                               ; preds = %34
  invoke void @stacktrace_add(ptr noundef nonnull @.str, i64 noundef 198, i32 noundef %33)
          to label %40 unwind label %36

36:                                               ; preds = %35, %32
  %37 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #4
  br label %49

.thread:                                          ; preds = %34
  %38 = load i64, ptr %6, align 8, !tbaa !21
  %39 = trunc i64 %38 to i32
  store i32 %39, ptr %2, align 4, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #4
  br label %41

40:                                               ; preds = %35
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #4
  br label %45

41:                                               ; preds = %.thread, %28
  %42 = load i8, ptr %5, align 1, !tbaa !5, !range !9, !noundef !10
  %43 = trunc nuw i8 %42 to i1
  %44 = select i1 %43, i32 0, i32 4151
  br label %45

45:                                               ; preds = %.invoke, %40, %27, %19, %41
  %.026 = phi i32 [ %17, %19 ], [ 2, %27 ], [ %33, %40 ], [ %44, %41 ], [ 2, %.invoke ]
  %.025 = phi ptr [ null, %19 ], [ null, %27 ], [ %24, %40 ], [ %24, %41 ], [ null, %.invoke ]
  %46 = invoke ptr @get_BasicConstraints_desc()
          to label %47 unwind label %9

47:                                               ; preds = %45
  invoke void @asn_free(ptr noundef %46, ptr noundef %.025)
          to label %48 unwind label %9

48:                                               ; preds = %47
  call void @llvm.lifetime.end.p0(i64 1, 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 %.026

49:                                               ; preds = %36, %9
  %.pn = phi { ptr, i32 } [ %10, %9 ], [ %37, %36 ]
  call void @llvm.lifetime.end.p0(i64 1, 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 ptr @get_BasicConstraints_desc() local_unnamed_addr #2

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

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 = { "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 = !{!"bool", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{i8 0, i8 2}
!10 = !{}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"any pointer", !7, i64 0}
!15 = !{!16, !14, i64 0}
!16 = !{!"_ZTS16BasicConstraints", !14, i64 0, !14, i64 8, !17, i64 16}
!17 = !{!"_ZTS16asn_struct_ctx_s", !18, i64 0, !18, i64 2, !12, i64 4, !14, i64 8, !19, i64 16}
!18 = !{!"short", !7, i64 0}
!19 = !{!"long", !7, i64 0}
!20 = !{!16, !14, i64 8}
!21 = !{!19, !19, i64 0}


; Effective O3 passes: CorrelatedValuePropagationPass,DSEPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass