; LLVM IR from specinfo-ua/UAPKI :: library/cm-pkcs12/src/storage (pkcs12-utils)

; 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.PFX = type { %struct.ASN__PRIMITIVE_TYPE_s, %struct.ContentInfo, ptr, %struct.asn_struct_ctx_s }
%struct.ASN__PRIMITIVE_TYPE_s = type { ptr, i32 }
%struct.ContentInfo = type { %struct.ASN__PRIMITIVE_TYPE_s, %struct.ANY, %struct.asn_struct_ctx_s }
%struct.ANY = type { ptr, i32, %struct.asn_struct_ctx_s }
%struct.asn_struct_ctx_s = type { i16, i16, i32, ptr, i64 }
%struct.MacData = type { %struct.DigestInfo, %struct.OCTET_STRING, ptr, %struct.asn_struct_ctx_s }
%struct.DigestInfo = type { %struct.AlgorithmIdentifier, %struct.OCTET_STRING, %struct.asn_struct_ctx_s }
%struct.AlgorithmIdentifier = type { %struct.ASN__PRIMITIVE_TYPE_s, ptr, %struct.asn_struct_ctx_s }
%struct.OCTET_STRING = type { ptr, i32, %struct.asn_struct_ctx_s }

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @pkcs12_calc_hmac(i32 noundef, ptr noundef, 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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local i32 @pkcs12_get_data_and_calc_mac(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5) #0 {
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca i64, align 8
  %17 = alloca i32, align 4
  store ptr %0, ptr %7, align 8, !tbaa !5
  store ptr %1, ptr %8, align 8, !tbaa !5
  store ptr %2, ptr %9, align 8, !tbaa !5
  store ptr %3, ptr %10, align 8, !tbaa !5
  store ptr %4, ptr %11, align 8, !tbaa !5
  store ptr %5, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #3
  store i32 0, ptr %13, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #3
  store ptr null, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #3
  store ptr null, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #3
  store i64 0, ptr %16, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #3
  store i32 0, ptr %17, align 4, !tbaa !9
  br label %18

18:                                               ; preds = %6
  %19 = load ptr, ptr %7, align 8, !tbaa !5
  %20 = icmp ne ptr %19, null
  br i1 %20, label %23, label %21

21:                                               ; preds = %18
  store i32 2, ptr %13, align 4, !tbaa !9
  %22 = load i32, ptr %13, align 4, !tbaa !9
  call void @stacktrace_create(ptr noundef @.str, i64 noundef 75, i32 noundef %22, ptr noundef null)
  br label %136

23:                                               ; preds = %18
  br label %24

24:                                               ; preds = %23
  br label %25

25:                                               ; preds = %24
  br label %26

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

29:                                               ; preds = %26
  store i32 2, ptr %13, align 4, !tbaa !9
  %30 = load i32, ptr %13, align 4, !tbaa !9
  call void @stacktrace_create(ptr noundef @.str, i64 noundef 76, i32 noundef %30, ptr noundef null)
  br label %136

31:                                               ; preds = %26
  br label %32

32:                                               ; preds = %31
  br label %33

33:                                               ; preds = %32
  br label %34

34:                                               ; preds = %33
  %35 = load ptr, ptr %11, align 8, !tbaa !5
  %36 = icmp ne ptr %35, null
  br i1 %36, label %39, label %37

37:                                               ; preds = %34
  store i32 2, ptr %13, align 4, !tbaa !9
  %38 = load i32, ptr %13, align 4, !tbaa !9
  call void @stacktrace_create(ptr noundef @.str, i64 noundef 77, i32 noundef %38, ptr noundef null)
  br label %136

39:                                               ; preds = %34
  br label %40

40:                                               ; preds = %39
  br label %41

41:                                               ; preds = %40
  br label %42

42:                                               ; preds = %41
  %43 = load ptr, ptr %12, align 8, !tbaa !5
  %44 = icmp ne ptr %43, null
  br i1 %44, label %47, label %45

45:                                               ; preds = %42
  store i32 2, ptr %13, align 4, !tbaa !9
  %46 = load i32, ptr %13, align 4, !tbaa !9
  call void @stacktrace_create(ptr noundef @.str, i64 noundef 78, i32 noundef %46, ptr noundef null)
  br label %136

47:                                               ; preds = %42
  br label %48

48:                                               ; preds = %47
  br label %49

49:                                               ; preds = %48
  %50 = load ptr, ptr %7, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.PFX, ptr %50, i32 0, i32 2
  %52 = load ptr, ptr %51, align 8, !tbaa !13
  %53 = getelementptr inbounds %struct.MacData, ptr %52, i32 0, i32 0
  %54 = getelementptr inbounds %struct.DigestInfo, ptr %53, i32 0, i32 0
  %55 = getelementptr inbounds %struct.AlgorithmIdentifier, ptr %54, i32 0, i32 0
  %56 = call i32 @hash_from_OID(ptr noundef %55)
  store i32 %56, ptr %17, align 4, !tbaa !9
  %57 = load i32, ptr %17, align 4, !tbaa !9
  %58 = icmp eq i32 %57, 0
  br i1 %58, label %59, label %64

59:                                               ; preds = %49
  br label %60

60:                                               ; preds = %59
  store i32 1047, ptr %13, align 4, !tbaa !9
  %61 = load i32, ptr %13, align 4, !tbaa !9
  call void @stacktrace_create(ptr noundef @.str, i64 noundef 82, i32 noundef %61, ptr noundef null)
  br label %136

62:                                               ; No predecessors!
  br label %63

63:                                               ; preds = %62
  br label %64

64:                                               ; preds = %63, %49
  br label %65

65:                                               ; preds = %64
  %66 = load ptr, ptr %7, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.PFX, ptr %66, i32 0, i32 2
  %68 = load ptr, ptr %67, align 8, !tbaa !13
  %69 = getelementptr inbounds %struct.MacData, ptr %68, i32 0, i32 1
  %70 = call i32 @asn_OCTSTRING2ba(ptr noundef %69, ptr noundef %14)
  store i32 %70, ptr %13, align 4, !tbaa !9
  %71 = load i32, ptr %13, align 4, !tbaa !9
  %72 = icmp ne i32 %71, 0
  br i1 %72, label %73, label %75

73:                                               ; preds = %65
  %74 = load i32, ptr %13, align 4, !tbaa !9
  call void @stacktrace_add(ptr noundef @.str, i64 noundef 84, i32 noundef %74)
  br label %136

75:                                               ; preds = %65
  br label %76

76:                                               ; preds = %75
  br label %77

77:                                               ; preds = %76
  br label %78

78:                                               ; preds = %77
  %79 = load ptr, ptr %7, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct.PFX, ptr %79, i32 0, i32 2
  %81 = load ptr, ptr %80, align 8, !tbaa !13
  %82 = getelementptr inbounds %struct.MacData, ptr %81, i32 0, i32 2
  %83 = load ptr, ptr %82, align 8, !tbaa !20
  %84 = call i32 @asn_INTEGER2ulong(ptr noundef %83, ptr noundef %16)
  store i32 %84, ptr %13, align 4, !tbaa !9
  %85 = load i32, ptr %13, align 4, !tbaa !9
  %86 = icmp ne i32 %85, 0
  br i1 %86, label %87, label %89

87:                                               ; preds = %78
  %88 = load i32, ptr %13, align 4, !tbaa !9
  call void @stacktrace_add(ptr noundef @.str, i64 noundef 85, i32 noundef %88)
  br label %136

89:                                               ; preds = %78
  br label %90

90:                                               ; preds = %89
  br label %91

91:                                               ; preds = %90
  br label %92

92:                                               ; preds = %91
  %93 = load ptr, ptr %8, align 8, !tbaa !5
  %94 = load ptr, ptr %14, align 8, !tbaa !5
  %95 = load i64, ptr %16, align 8, !tbaa !11
  %96 = load i32, ptr %17, align 4, !tbaa !9
  %97 = call i32 @pbkdf1(ptr noundef %93, ptr noundef %94, i8 noundef zeroext 3, i64 noundef %95, i64 noundef 0, i32 noundef %96, ptr noundef %15)
  store i32 %97, ptr %13, align 4, !tbaa !9
  %98 = load i32, ptr %13, align 4, !tbaa !9
  %99 = icmp ne i32 %98, 0
  br i1 %99, label %100, label %102

100:                                              ; preds = %92
  %101 = load i32, ptr %13, align 4, !tbaa !9
  call void @stacktrace_add(ptr noundef @.str, i64 noundef 87, i32 noundef %101)
  br label %136

102:                                              ; preds = %92
  br label %103

103:                                              ; preds = %102
  br label %104

104:                                              ; preds = %103
  br label %105

105:                                              ; preds = %104
  %106 = load ptr, ptr %7, align 8, !tbaa !5
  %107 = getelementptr inbounds %struct.PFX, ptr %106, i32 0, i32 1
  %108 = load ptr, ptr %11, align 8, !tbaa !5
  %109 = call i32 @cinfo_get_data(ptr noundef %107, ptr noundef %108)
  store i32 %109, ptr %13, align 4, !tbaa !9
  %110 = load i32, ptr %13, align 4, !tbaa !9
  %111 = icmp ne i32 %110, 0
  br i1 %111, label %112, label %114

112:                                              ; preds = %105
  %113 = load i32, ptr %13, align 4, !tbaa !9
  call void @stacktrace_add(ptr noundef @.str, i64 noundef 88, i32 noundef %113)
  br label %136

114:                                              ; preds = %105
  br label %115

115:                                              ; preds = %114
  br label %116

116:                                              ; preds = %115
  br label %117

117:                                              ; preds = %116
  %118 = load i32, ptr %17, align 4, !tbaa !9
  %119 = load ptr, ptr %15, align 8, !tbaa !5
  %120 = load ptr, ptr %11, align 8, !tbaa !5
  %121 = load ptr, ptr %120, align 8, !tbaa !5
  %122 = load ptr, ptr %12, align 8, !tbaa !5
  %123 = call i32 @pkcs12_calc_hmac(i32 noundef %118, ptr noundef %119, ptr noundef %121, ptr noundef %122)
  store i32 %123, ptr %13, align 4, !tbaa !9
  %124 = load i32, ptr %13, align 4, !tbaa !9
  %125 = icmp ne i32 %124, 0
  br i1 %125, label %126, label %128

126:                                              ; preds = %117
  %127 = load i32, ptr %13, align 4, !tbaa !9
  call void @stacktrace_add(ptr noundef @.str, i64 noundef 89, i32 noundef %127)
  br label %136

128:                                              ; preds = %117
  br label %129

129:                                              ; preds = %128
  br label %130

130:                                              ; preds = %129
  %131 = load i32, ptr %17, align 4, !tbaa !9
  %132 = call ptr @hash_to_oid(i32 noundef %131)
  %133 = load ptr, ptr %9, align 8, !tbaa !5
  store ptr %132, ptr %133, align 8, !tbaa !5
  %134 = load i64, ptr %16, align 8, !tbaa !11
  %135 = load ptr, ptr %10, align 8, !tbaa !5
  store i64 %134, ptr %135, align 8, !tbaa !11
  br label %136

136:                                              ; preds = %130, %126, %112, %100, %87, %73, %60, %45, %37, %29, %21
  %137 = load ptr, ptr %14, align 8, !tbaa !5
  call void @ba_free(ptr noundef %137)
  %138 = load ptr, ptr %15, align 8, !tbaa !5
  call void @ba_free(ptr noundef %138)
  %139 = load i32, ptr %13, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #3
  ret i32 %139
}

declare i32 @hash_from_OID(ptr noundef) #2

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

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

declare i32 @pbkdf1(ptr noundef, ptr noundef, i8 noundef zeroext, i64 noundef, i64 noundef, i32 noundef, ptr noundef) #2

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

declare ptr @hash_to_oid(i32 noundef) #2

declare void @ba_free(ptr noundef) #2

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!14, !6, i64 96}
!14 = !{!"PFX", !15, i64 0, !16, i64 16, !6, i64 96, !18, i64 104}
!15 = !{!"ASN__PRIMITIVE_TYPE_s", !6, i64 0, !10, i64 8}
!16 = !{!"ContentInfo", !15, i64 0, !17, i64 16, !18, i64 56}
!17 = !{!"ANY", !6, i64 0, !10, i64 8, !18, i64 16}
!18 = !{!"asn_struct_ctx_s", !19, i64 0, !19, i64 2, !10, i64 4, !6, i64 8, !12, i64 16}
!19 = !{!"short", !7, i64 0}
!20 = !{!21, !6, i64 152}
!21 = !{!"MacData", !22, i64 0, !24, i64 112, !6, i64 152, !18, i64 160}
!22 = !{!"DigestInfo", !23, i64 0, !24, i64 48, !18, i64 88}
!23 = !{!"AlgorithmIdentifier", !15, i64 0, !6, i64 16, !18, i64 24}
!24 = !{!"OCTET_STRING", !6, i64 0, !10, i64 8, !18, i64 16}


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

; Function Attrs: nounwind uwtable
declare dso_local i32 @pkcs12_calc_hmac(i32 noundef, ptr noundef, 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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local i32 @pkcs12_get_data_and_calc_mac(ptr noundef %0, ptr noundef %1, ptr nocapture noundef writeonly %2, ptr nocapture noundef writeonly %3, ptr noundef %4, ptr noundef %5) local_unnamed_addr #0 {
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i64, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #3
  store ptr null, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #3
  store ptr null, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #3
  store i64 0, ptr %9, align 8, !tbaa !9
  %.not = icmp eq ptr %0, null
  br i1 %.not, label %10, label %11

10:                                               ; preds = %6
  tail call void @stacktrace_create(ptr noundef nonnull @.str, i64 noundef 75, i32 noundef 2, ptr noundef null) #3
  br label %51

11:                                               ; preds = %6
  %.not43 = icmp eq ptr %1, null
  br i1 %.not43, label %12, label %13

12:                                               ; preds = %11
  tail call void @stacktrace_create(ptr noundef nonnull @.str, i64 noundef 76, i32 noundef 2, ptr noundef null) #3
  br label %51

13:                                               ; preds = %11
  %.not44 = icmp eq ptr %4, null
  br i1 %.not44, label %14, label %15

14:                                               ; preds = %13
  tail call void @stacktrace_create(ptr noundef nonnull @.str, i64 noundef 77, i32 noundef 2, ptr noundef null) #3
  br label %51

15:                                               ; preds = %13
  %.not45 = icmp eq ptr %5, null
  br i1 %.not45, label %16, label %17

16:                                               ; preds = %15
  tail call void @stacktrace_create(ptr noundef nonnull @.str, i64 noundef 78, i32 noundef 2, ptr noundef null) #3
  br label %51

17:                                               ; preds = %15
  %18 = getelementptr inbounds i8, ptr %0, i64 96
  %19 = load ptr, ptr %18, align 8, !tbaa !11
  %20 = tail call i32 @hash_from_OID(ptr noundef %19) #3
  %21 = icmp eq i32 %20, 0
  br i1 %21, label %22, label %23

22:                                               ; preds = %17
  tail call void @stacktrace_create(ptr noundef nonnull @.str, i64 noundef 82, i32 noundef 1047, ptr noundef null) #3
  br label %51

23:                                               ; preds = %17
  %24 = load ptr, ptr %18, align 8, !tbaa !11
  %25 = getelementptr inbounds i8, ptr %24, i64 112
  %26 = call i32 @asn_OCTSTRING2ba(ptr noundef nonnull %25, ptr noundef nonnull %7) #3
  %.not46 = icmp eq i32 %26, 0
  br i1 %.not46, label %28, label %27

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

28:                                               ; preds = %23
  %29 = load ptr, ptr %18, align 8, !tbaa !11
  %30 = getelementptr inbounds i8, ptr %29, i64 152
  %31 = load ptr, ptr %30, align 8, !tbaa !19
  %32 = call i32 @asn_INTEGER2ulong(ptr noundef %31, ptr noundef nonnull %9) #3
  %.not47 = icmp eq i32 %32, 0
  br i1 %.not47, label %34, label %33

33:                                               ; preds = %28
  call void @stacktrace_add(ptr noundef nonnull @.str, i64 noundef 85, i32 noundef %32) #3
  br label %51

34:                                               ; preds = %28
  %35 = load ptr, ptr %7, align 8, !tbaa !5
  %36 = load i64, ptr %9, align 8, !tbaa !9
  %37 = call i32 @pbkdf1(ptr noundef nonnull %1, ptr noundef %35, i8 noundef zeroext 3, i64 noundef %36, i64 noundef 0, i32 noundef %20, ptr noundef nonnull %8) #3
  %.not48 = icmp eq i32 %37, 0
  br i1 %.not48, label %39, label %38

38:                                               ; preds = %34
  call void @stacktrace_add(ptr noundef nonnull @.str, i64 noundef 87, i32 noundef %37) #3
  br label %51

39:                                               ; preds = %34
  %40 = getelementptr inbounds i8, ptr %0, i64 16
  %41 = call i32 @cinfo_get_data(ptr noundef nonnull %40, ptr noundef nonnull %4) #3
  %.not49 = icmp eq i32 %41, 0
  br i1 %.not49, label %43, label %42

42:                                               ; preds = %39
  call void @stacktrace_add(ptr noundef nonnull @.str, i64 noundef 88, i32 noundef %41) #3
  br label %51

43:                                               ; preds = %39
  %44 = load ptr, ptr %8, align 8, !tbaa !5
  %45 = load ptr, ptr %4, align 8, !tbaa !5
  %46 = call i32 @pkcs12_calc_hmac(i32 noundef %20, ptr noundef %44, ptr noundef %45, ptr noundef nonnull %5)
  %.not50 = icmp eq i32 %46, 0
  br i1 %.not50, label %48, label %47

47:                                               ; preds = %43
  call void @stacktrace_add(ptr noundef nonnull @.str, i64 noundef 89, i32 noundef %46) #3
  br label %51

48:                                               ; preds = %43
  %49 = call ptr @hash_to_oid(i32 noundef %20) #3
  store ptr %49, ptr %2, align 8, !tbaa !5
  %50 = load i64, ptr %9, align 8, !tbaa !9
  store i64 %50, ptr %3, align 8, !tbaa !9
  br label %51

51:                                               ; preds = %48, %47, %42, %38, %33, %27, %22, %16, %14, %12, %10
  %.0 = phi i32 [ 1047, %22 ], [ %26, %27 ], [ %32, %33 ], [ %37, %38 ], [ %41, %42 ], [ %46, %47 ], [ 0, %48 ], [ 2, %16 ], [ 2, %14 ], [ 2, %12 ], [ 2, %10 ]
  %52 = load ptr, ptr %7, align 8, !tbaa !5
  call void @ba_free(ptr noundef %52) #3
  %53 = load ptr, ptr %8, align 8, !tbaa !5
  call void @ba_free(ptr noundef %53) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #3
  ret i32 %.0
}

declare i32 @hash_from_OID(ptr noundef) local_unnamed_addr #2

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

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

declare i32 @pbkdf1(ptr noundef, ptr noundef, i8 noundef zeroext, i64 noundef, i64 noundef, i32 noundef, ptr noundef) local_unnamed_addr #2

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

declare ptr @hash_to_oid(i32 noundef) local_unnamed_addr #2

declare void @ba_free(ptr noundef) local_unnamed_addr #2

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!12, !6, i64 96}
!12 = !{!"PFX", !13, i64 0, !15, i64 16, !6, i64 96, !17, i64 104}
!13 = !{!"ASN__PRIMITIVE_TYPE_s", !6, i64 0, !14, i64 8}
!14 = !{!"int", !7, i64 0}
!15 = !{!"ContentInfo", !13, i64 0, !16, i64 16, !17, i64 56}
!16 = !{!"ANY", !6, i64 0, !14, i64 8, !17, i64 16}
!17 = !{!"asn_struct_ctx_s", !18, i64 0, !18, i64 2, !14, i64 4, !6, i64 8, !10, i64 16}
!18 = !{!"short", !7, i64 0}
!19 = !{!20, !6, i64 152}
!20 = !{!"MacData", !21, i64 0, !23, i64 112, !6, i64 152, !17, i64 160}
!21 = !{!"DigestInfo", !22, i64 0, !23, i64 48, !17, i64 88}
!22 = !{!"AlgorithmIdentifier", !13, i64 0, !6, i64 16, !17, i64 24}
!23 = !{!"OCTET_STRING", !6, i64 0, !14, i64 8, !17, i64 16}


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