; LLVM IR from specinfo-ua/UAPKI :: library/uapki/src (ocsp-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::Ocsp::OcspHelper" = type <{ %"class.std::vector", ptr, ptr, ptr, ptr, ptr, ptr, ptr, i64, i32, [4 x i8] }>
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<UapkiNS::Ocsp::OcspHelper::SingleResponseInfo, std::allocator<UapkiNS::Ocsp::OcspHelper::SingleResponseInfo>>::_Vector_impl" }
%"struct.std::_Vector_base<UapkiNS::Ocsp::OcspHelper::SingleResponseInfo, std::allocator<UapkiNS::Ocsp::OcspHelper::SingleResponseInfo>>::_Vector_impl" = type { %"struct.std::_Vector_base<UapkiNS::Ocsp::OcspHelper::SingleResponseInfo, std::allocator<UapkiNS::Ocsp::OcspHelper::SingleResponseInfo>>::_Vector_impl_data" }
%"struct.std::_Vector_base<UapkiNS::Ocsp::OcspHelper::SingleResponseInfo, std::allocator<UapkiNS::Ocsp::OcspHelper::SingleResponseInfo>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.OCSPResponse = type { %struct.ASN__PRIMITIVE_TYPE_s, ptr, %struct.asn_struct_ctx_s }
%struct.ASN__PRIMITIVE_TYPE_s = type { ptr, i32 }
%struct.asn_struct_ctx_s = type { i16, i16, i32, ptr, i64 }
%struct.ResponseBytes = type { %struct.ASN__PRIMITIVE_TYPE_s, %struct.OCTET_STRING, %struct.asn_struct_ctx_s }
%struct.OCTET_STRING = type { ptr, i32, %struct.asn_struct_ctx_s }
%struct.BasicOCSPResponse = type { %struct.ResponseData, %struct.AlgorithmIdentifier, %struct.BIT_STRING_s, ptr, %struct.asn_struct_ctx_s }
%struct.ResponseData = type { ptr, %struct.ResponderID, %struct.OCTET_STRING, %"struct.ResponseData::responses", ptr, %struct.asn_struct_ctx_s }
%struct.ResponderID = type { i32, %"union.ResponderID::ResponderID_u", %struct.asn_struct_ctx_s }
%"union.ResponderID::ResponderID_u" = type { %struct.Name }
%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.13, %struct.asn_struct_ctx_s }
%struct.anon.13 = type { ptr, i32, i32, ptr }
%"struct.ResponseData::responses" = type { %struct.anon.14, %struct.asn_struct_ctx_s }
%struct.anon.14 = type { ptr, i32, i32, ptr }
%struct.AlgorithmIdentifier = type { %struct.ASN__PRIMITIVE_TYPE_s, ptr, %struct.asn_struct_ctx_s }
%struct.BIT_STRING_s = type { ptr, i32, i32, %struct.asn_struct_ctx_s }

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

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

declare ptr @get_BasicOCSPResponse_desc() #0

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN7UapkiNS4Ocsp10OcspHelper17parseOcspResponseEPK12ByteArray_st(ptr noundef nonnull align 8 dereferenceable(92) %0, ptr noundef %1) #2 align 2 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  %12 = load ptr, ptr %4, align 8
  %13 = getelementptr inbounds %"class.UapkiNS::Ocsp::OcspHelper", ptr %12, i32 0, i32 9
  store i32 -1, ptr %13, align 8, !tbaa !9
  %14 = load ptr, ptr %5, align 8, !tbaa !5
  %15 = icmp ne ptr %14, null
  br i1 %15, label %17, label %16

16:                                               ; preds = %2
  store i32 4198, ptr %3, align 4
  br label %124

17:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #3
  %18 = call ptr @get_OCSPResponse_desc()
  %19 = load ptr, ptr %5, align 8, !tbaa !5
  %20 = call ptr @asn_decode_ba_with_alloc(ptr noundef %18, ptr noundef %19)
  store ptr %20, ptr %6, align 8, !tbaa !5
  %21 = load ptr, ptr %6, align 8, !tbaa !5
  %22 = icmp ne ptr %21, null
  br i1 %22, label %24, label %23

23:                                               ; preds = %17
  store i32 4198, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %123

24:                                               ; preds = %17
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #3
  store i32 0, ptr %8, align 4, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #3
  store ptr null, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #3
  store i32 0, ptr %10, align 4, !tbaa !17
  br label %25

25:                                               ; preds = %24
  %26 = load ptr, ptr %6, align 8, !tbaa !5
  %27 = getelementptr inbounds %struct.OCSPResponse, ptr %26, i32 0, i32 0
  %28 = call noundef i32 @_ZN7UapkiNS4Util18enumeratedFromAsn1EPK21ASN__PRIMITIVE_TYPE_sPj(ptr noundef %27, ptr noundef %10)
  store i32 %28, ptr %8, align 4, !tbaa !17
  %29 = load i32, ptr %8, align 4, !tbaa !17
  %30 = icmp ne i32 %29, 0
  br i1 %30, label %31, label %33

31:                                               ; preds = %25
  %32 = load i32, ptr %8, align 4, !tbaa !17
  call void @stacktrace_add(ptr noundef @.str, i64 noundef 245, i32 noundef %32)
  br label %116

33:                                               ; preds = %25
  br label %34

34:                                               ; preds = %33
  br label %35

35:                                               ; preds = %34
  %36 = load i32, ptr %10, align 4, !tbaa !17
  %37 = getelementptr inbounds %"class.UapkiNS::Ocsp::OcspHelper", ptr %12, i32 0, i32 9
  store i32 %36, ptr %37, align 8, !tbaa !9
  %38 = getelementptr inbounds %"class.UapkiNS::Ocsp::OcspHelper", ptr %12, i32 0, i32 9
  %39 = load i32, ptr %38, align 8, !tbaa !9
  %40 = icmp eq i32 %39, 0
  br i1 %40, label %41, label %115

41:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #3
  %42 = load ptr, ptr %6, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.OCSPResponse, ptr %42, i32 0, i32 1
  %44 = load ptr, ptr %43, align 8, !tbaa !19
  store ptr %44, ptr %11, align 8, !tbaa !5
  %45 = load ptr, ptr %11, align 8, !tbaa !5
  %46 = icmp ne ptr %45, null
  br i1 %46, label %47, label %52

47:                                               ; preds = %41
  %48 = load ptr, ptr %11, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.ResponseBytes, ptr %48, i32 0, i32 0
  %50 = load ptr, ptr @OID_PKIX_OcspBasic, align 8, !tbaa !5
  %51 = call zeroext i1 @OID_is_equal_oid(ptr noundef %49, ptr noundef %50)
  br i1 %51, label %57, label %52

52:                                               ; preds = %47, %41
  br label %53

53:                                               ; preds = %52
  store i32 4198, ptr %8, align 4, !tbaa !17
  %54 = load i32, ptr %8, align 4, !tbaa !17
  call void @stacktrace_create(ptr noundef @.str, i64 noundef 251, i32 noundef %54, ptr noundef null)
  store i32 4, ptr %7, align 4
  br label %112

55:                                               ; No predecessors!
  br label %56

56:                                               ; preds = %55
  br label %57

57:                                               ; preds = %56, %47
  %58 = call ptr @get_BasicOCSPResponse_desc()
  %59 = load ptr, ptr %11, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.ResponseBytes, ptr %59, i32 0, i32 1
  %61 = getelementptr inbounds %struct.OCTET_STRING, ptr %60, i32 0, i32 0
  %62 = load ptr, ptr %61, align 8, !tbaa !24
  %63 = load ptr, ptr %11, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct.ResponseBytes, ptr %63, i32 0, i32 1
  %65 = getelementptr inbounds %struct.OCTET_STRING, ptr %64, i32 0, i32 1
  %66 = load i32, ptr %65, align 8, !tbaa !27
  %67 = sext i32 %66 to i64
  %68 = call ptr @asn_decode_with_alloc(ptr noundef %58, ptr noundef %62, i64 noundef %67)
  store ptr %68, ptr %9, align 8, !tbaa !5
  %69 = load ptr, ptr %9, align 8, !tbaa !5
  %70 = icmp ne ptr %69, null
  br i1 %70, label %76, label %71

71:                                               ; preds = %57
  br label %72

72:                                               ; preds = %71
  store i32 4198, ptr %8, align 4, !tbaa !17
  %73 = load i32, ptr %8, align 4, !tbaa !17
  call void @stacktrace_create(ptr noundef @.str, i64 noundef 257, i32 noundef %73, ptr noundef null)
  store i32 4, ptr %7, align 4
  br label %112

74:                                               ; No predecessors!
  br label %75

75:                                               ; preds = %74
  br label %76

76:                                               ; preds = %75, %57
  %77 = load ptr, ptr %11, align 8, !tbaa !5
  %78 = getelementptr inbounds %struct.ResponseBytes, ptr %77, i32 0, i32 1
  %79 = getelementptr inbounds %struct.OCTET_STRING, ptr %78, i32 0, i32 0
  %80 = load ptr, ptr %79, align 8, !tbaa !24
  %81 = load ptr, ptr %11, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.ResponseBytes, ptr %81, i32 0, i32 1
  %83 = getelementptr inbounds %struct.OCTET_STRING, ptr %82, i32 0, i32 1
  %84 = load i32, ptr %83, align 8, !tbaa !27
  %85 = sext i32 %84 to i64
  %86 = call ptr @ba_alloc_from_uint8(ptr noundef %80, i64 noundef %85)
  %87 = getelementptr inbounds %"class.UapkiNS::Ocsp::OcspHelper", ptr %12, i32 0, i32 3
  store ptr %86, ptr %87, align 8, !tbaa !28
  %88 = getelementptr inbounds %"class.UapkiNS::Ocsp::OcspHelper", ptr %12, i32 0, i32 3
  %89 = load ptr, ptr %88, align 8, !tbaa !28
  %90 = icmp ne ptr %89, null
  br i1 %90, label %96, label %91

91:                                               ; preds = %76
  br label %92

92:                                               ; preds = %91
  store i32 4198, ptr %8, align 4, !tbaa !17
  %93 = load i32, ptr %8, align 4, !tbaa !17
  call void @stacktrace_create(ptr noundef @.str, i64 noundef 262, i32 noundef %93, ptr noundef null)
  store i32 4, ptr %7, align 4
  br label %112

94:                                               ; No predecessors!
  br label %95

95:                                               ; preds = %94
  br label %96

96:                                               ; preds = %95, %76
  br label %97

97:                                               ; preds = %96
  %98 = call ptr @get_ResponseData_desc()
  %99 = load ptr, ptr %9, align 8, !tbaa !5
  %100 = getelementptr inbounds %struct.BasicOCSPResponse, ptr %99, i32 0, i32 0
  %101 = getelementptr inbounds %"class.UapkiNS::Ocsp::OcspHelper", ptr %12, i32 0, i32 7
  %102 = call i32 @asn_encode_ba(ptr noundef %98, ptr noundef %100, ptr noundef %101)
  store i32 %102, ptr %8, align 4, !tbaa !17
  %103 = load i32, ptr %8, align 4, !tbaa !17
  %104 = icmp ne i32 %103, 0
  br i1 %104, label %105, label %107

105:                                              ; preds = %97
  %106 = load i32, ptr %8, align 4, !tbaa !17
  call void @stacktrace_add(ptr noundef @.str, i64 noundef 265, i32 noundef %106)
  store i32 4, ptr %7, align 4
  br label %112

107:                                              ; preds = %97
  br label %108

108:                                              ; preds = %107
  br label %109

109:                                              ; preds = %108
  %110 = load ptr, ptr %9, align 8, !tbaa !5
  %111 = getelementptr inbounds %"class.UapkiNS::Ocsp::OcspHelper", ptr %12, i32 0, i32 2
  store ptr %110, ptr %111, align 8, !tbaa !29
  store ptr null, ptr %9, align 8, !tbaa !5
  store i32 0, ptr %7, align 4
  br label %112

112:                                              ; preds = %109, %105, %92, %72, %53
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #3
  %113 = load i32, ptr %7, align 4
  switch i32 %113, label %122 [
    i32 0, label %114
    i32 4, label %116
  ]

114:                                              ; preds = %112
  br label %115

115:                                              ; preds = %114, %35
  br label %116

116:                                              ; preds = %115, %112, %31
  %117 = call ptr @get_BasicOCSPResponse_desc()
  %118 = load ptr, ptr %9, align 8, !tbaa !5
  call void @asn_free(ptr noundef %117, ptr noundef %118)
  %119 = call ptr @get_OCSPResponse_desc()
  %120 = load ptr, ptr %6, align 8, !tbaa !5
  call void @asn_free(ptr noundef %119, ptr noundef %120)
  %121 = load i32, ptr %8, align 4, !tbaa !17
  store i32 %121, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %122

122:                                              ; preds = %116, %112
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #3
  br label %123

123:                                              ; preds = %122, %23
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #3
  br label %124

124:                                              ; preds = %123, %16
  %125 = load i32, ptr %3, align 4
  ret i32 %125
}

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

declare ptr @get_OCSPResponse_desc() #0

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

declare zeroext i1 @OID_is_equal_oid(ptr noundef, ptr noundef) #0

declare ptr @asn_decode_with_alloc(ptr noundef, ptr noundef, i64 noundef) #0

declare ptr @ba_alloc_from_uint8(ptr noundef, i64 noundef) #0

declare ptr @get_ResponseData_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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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, !16, i64 88}
!10 = !{!"_ZTSN7UapkiNS4Ocsp10OcspHelperE", !11, i64 0, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !15, i64 80, !16, i64 88}
!11 = !{!"_ZTSSt6vectorIN7UapkiNS4Ocsp10OcspHelper18SingleResponseInfoESaIS3_EE", !12, i64 0}
!12 = !{!"_ZTSSt12_Vector_baseIN7UapkiNS4Ocsp10OcspHelper18SingleResponseInfoESaIS3_EE", !13, i64 0}
!13 = !{!"_ZTSNSt12_Vector_baseIN7UapkiNS4Ocsp10OcspHelper18SingleResponseInfoESaIS3_EE12_Vector_implE", !14, i64 0}
!14 = !{!"_ZTSNSt12_Vector_baseIN7UapkiNS4Ocsp10OcspHelper18SingleResponseInfoESaIS3_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!15 = !{!"long", !7, i64 0}
!16 = !{!"_ZTSN7UapkiNS4Ocsp14ResponseStatusE", !7, i64 0}
!17 = !{!18, !18, i64 0}
!18 = !{!"int", !7, i64 0}
!19 = !{!20, !6, i64 16}
!20 = !{!"_ZTS12OCSPResponse", !21, i64 0, !6, i64 16, !22, i64 24}
!21 = !{!"_ZTS21ASN__PRIMITIVE_TYPE_s", !6, i64 0, !18, i64 8}
!22 = !{!"_ZTS16asn_struct_ctx_s", !23, i64 0, !23, i64 2, !18, i64 4, !6, i64 8, !15, i64 16}
!23 = !{!"short", !7, i64 0}
!24 = !{!25, !6, i64 16}
!25 = !{!"_ZTS13ResponseBytes", !21, i64 0, !26, i64 16, !22, i64 56}
!26 = !{!"_ZTS12OCTET_STRING", !6, i64 0, !18, i64 8, !22, i64 16}
!27 = !{!25, !18, i64 24}
!28 = !{!10, !6, i64 40}
!29 = !{!10, !6, i64 32}


; 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 [22 x i8], align 1
@OID_PKIX_OcspBasic = external local_unnamed_addr global ptr, align 8

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

declare ptr @get_BasicOCSPResponse_desc() 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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN7UapkiNS4Ocsp10OcspHelper17parseOcspResponseEPK12ByteArray_st(ptr noundef nonnull align 8 dereferenceable(92) %0, ptr noundef %1) local_unnamed_addr #2 align 2 {
  %3 = alloca i32, align 4
  %4 = getelementptr inbounds i8, ptr %0, i64 88
  store i32 -1, ptr %4, align 8, !tbaa !5
  %.not = icmp eq ptr %1, null
  br i1 %.not, label %47, label %5

5:                                                ; preds = %2
  %6 = tail call ptr @get_OCSPResponse_desc()
  %7 = tail call ptr @asn_decode_ba_with_alloc(ptr noundef %6, ptr noundef nonnull %1)
  %.not40 = icmp eq ptr %7, null
  br i1 %.not40, label %47, label %8

8:                                                ; preds = %5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #3
  store i32 0, ptr %3, align 4, !tbaa !16
  %9 = call noundef i32 @_ZN7UapkiNS4Util18enumeratedFromAsn1EPK21ASN__PRIMITIVE_TYPE_sPj(ptr noundef nonnull %7, ptr noundef nonnull %3)
  %.not41 = icmp eq i32 %9, 0
  br i1 %.not41, label %11, label %10

10:                                               ; preds = %8
  call void @stacktrace_add(ptr noundef nonnull @.str, i64 noundef 245, i32 noundef %9)
  br label %44

11:                                               ; preds = %8
  %12 = load i32, ptr %3, align 4, !tbaa !16
  store i32 %12, ptr %4, align 8, !tbaa !5
  %13 = icmp eq i32 %12, 0
  br i1 %13, label %14, label %44

14:                                               ; preds = %11
  %15 = getelementptr inbounds i8, ptr %7, i64 16
  %16 = load ptr, ptr %15, align 8, !tbaa !18
  %.not42 = icmp eq ptr %16, null
  br i1 %.not42, label %20, label %17

17:                                               ; preds = %14
  %18 = load ptr, ptr @OID_PKIX_OcspBasic, align 8, !tbaa !23
  %19 = call zeroext i1 @OID_is_equal_oid(ptr noundef nonnull %16, ptr noundef %18)
  br i1 %19, label %21, label %20

20:                                               ; preds = %14, %17
  call void @stacktrace_create(ptr noundef nonnull @.str, i64 noundef 251, i32 noundef 4198, ptr noundef null)
  br label %44

21:                                               ; preds = %17
  %22 = call ptr @get_BasicOCSPResponse_desc()
  %23 = getelementptr inbounds i8, ptr %16, i64 16
  %24 = load ptr, ptr %23, align 8, !tbaa !24
  %25 = getelementptr inbounds i8, ptr %16, i64 24
  %26 = load i32, ptr %25, align 8, !tbaa !27
  %27 = sext i32 %26 to i64
  %28 = call ptr @asn_decode_with_alloc(ptr noundef %22, ptr noundef %24, i64 noundef %27)
  %.not43 = icmp eq ptr %28, null
  br i1 %.not43, label %29, label %30

29:                                               ; preds = %21
  call void @stacktrace_create(ptr noundef nonnull @.str, i64 noundef 257, i32 noundef 4198, ptr noundef null)
  br label %44

30:                                               ; preds = %21
  %31 = load ptr, ptr %23, align 8, !tbaa !24
  %32 = load i32, ptr %25, align 8, !tbaa !27
  %33 = sext i32 %32 to i64
  %34 = call ptr @ba_alloc_from_uint8(ptr noundef %31, i64 noundef %33)
  %35 = getelementptr inbounds i8, ptr %0, i64 40
  store ptr %34, ptr %35, align 8, !tbaa !28
  %.not44 = icmp eq ptr %34, null
  br i1 %.not44, label %36, label %37

36:                                               ; preds = %30
  call void @stacktrace_create(ptr noundef nonnull @.str, i64 noundef 262, i32 noundef 4198, ptr noundef null)
  br label %44

37:                                               ; preds = %30
  %38 = call ptr @get_ResponseData_desc()
  %39 = getelementptr inbounds i8, ptr %0, i64 72
  %40 = call i32 @asn_encode_ba(ptr noundef %38, ptr noundef nonnull %28, ptr noundef nonnull %39)
  %.not45 = icmp eq i32 %40, 0
  br i1 %.not45, label %42, label %41

41:                                               ; preds = %37
  call void @stacktrace_add(ptr noundef nonnull @.str, i64 noundef 265, i32 noundef %40)
  br label %44

42:                                               ; preds = %37
  %43 = getelementptr inbounds i8, ptr %0, i64 32
  store ptr %28, ptr %43, align 8, !tbaa !29
  br label %44

44:                                               ; preds = %20, %29, %36, %41, %42, %11, %10
  %.129 = phi i32 [ %9, %10 ], [ 0, %11 ], [ %40, %41 ], [ 0, %42 ], [ 4198, %36 ], [ 4198, %29 ], [ 4198, %20 ]
  %.127 = phi ptr [ null, %10 ], [ null, %11 ], [ %28, %41 ], [ null, %42 ], [ %28, %36 ], [ null, %29 ], [ null, %20 ]
  %45 = call ptr @get_BasicOCSPResponse_desc()
  call void @asn_free(ptr noundef %45, ptr noundef %.127)
  %46 = call ptr @get_OCSPResponse_desc()
  call void @asn_free(ptr noundef %46, ptr noundef nonnull %7)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #3
  br label %47

47:                                               ; preds = %44, %5, %2
  %.2 = phi i32 [ 4198, %2 ], [ %.129, %44 ], [ 4198, %5 ]
  ret i32 %.2
}

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

declare ptr @get_OCSPResponse_desc() local_unnamed_addr #0

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

declare zeroext i1 @OID_is_equal_oid(ptr noundef, ptr noundef) local_unnamed_addr #0

declare ptr @asn_decode_with_alloc(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #0

declare ptr @ba_alloc_from_uint8(ptr noundef, i64 noundef) local_unnamed_addr #0

declare ptr @get_ResponseData_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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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, !15, i64 88}
!6 = !{!"_ZTSN7UapkiNS4Ocsp10OcspHelperE", !7, i64 0, !11, i64 24, !11, i64 32, !11, i64 40, !11, i64 48, !11, i64 56, !11, i64 64, !11, i64 72, !14, i64 80, !15, i64 88}
!7 = !{!"_ZTSSt6vectorIN7UapkiNS4Ocsp10OcspHelper18SingleResponseInfoESaIS3_EE", !8, i64 0}
!8 = !{!"_ZTSSt12_Vector_baseIN7UapkiNS4Ocsp10OcspHelper18SingleResponseInfoESaIS3_EE", !9, i64 0}
!9 = !{!"_ZTSNSt12_Vector_baseIN7UapkiNS4Ocsp10OcspHelper18SingleResponseInfoESaIS3_EE12_Vector_implE", !10, i64 0}
!10 = !{!"_ZTSNSt12_Vector_baseIN7UapkiNS4Ocsp10OcspHelper18SingleResponseInfoESaIS3_EE17_Vector_impl_dataE", !11, i64 0, !11, i64 8, !11, i64 16}
!11 = !{!"any pointer", !12, i64 0}
!12 = !{!"omnipotent char", !13, i64 0}
!13 = !{!"Simple C++ TBAA"}
!14 = !{!"long", !12, i64 0}
!15 = !{!"_ZTSN7UapkiNS4Ocsp14ResponseStatusE", !12, i64 0}
!16 = !{!17, !17, i64 0}
!17 = !{!"int", !12, i64 0}
!18 = !{!19, !11, i64 16}
!19 = !{!"_ZTS12OCSPResponse", !20, i64 0, !11, i64 16, !21, i64 24}
!20 = !{!"_ZTS21ASN__PRIMITIVE_TYPE_s", !11, i64 0, !17, i64 8}
!21 = !{!"_ZTS16asn_struct_ctx_s", !22, i64 0, !22, i64 2, !17, i64 4, !11, i64 8, !14, i64 16}
!22 = !{!"short", !12, i64 0}
!23 = !{!11, !11, i64 0}
!24 = !{!25, !11, i64 16}
!25 = !{!"_ZTS13ResponseBytes", !20, i64 0, !26, i64 16, !21, i64 56}
!26 = !{!"_ZTS12OCTET_STRING", !11, i64 0, !17, i64 8, !21, i64 16}
!27 = !{!25, !17, i64 24}
!28 = !{!6, !11, i64 40}
!29 = !{!6, !11, i64 32}


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