; LLVM IR from open-quantum-safe/oqs-provider :: test (tlstest_helpers)

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

@.str = external hidden unnamed_addr constant [21 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [3 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @create_cert_key(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3) #0 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %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 ptr, align 8
  %14 = alloca ptr, 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
  store ptr %3, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #3
  %16 = load ptr, ptr %5, align 8, !tbaa !5
  %17 = load ptr, ptr %6, align 8, !tbaa !5
  %18 = call ptr @EVP_PKEY_CTX_new_from_name(ptr noundef %16, ptr noundef %17, ptr noundef @.str)
  store ptr %18, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #3
  store ptr null, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #3
  %19 = call ptr @X509_new()
  store ptr %19, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #3
  store ptr null, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #3
  store ptr null, ptr %13, align 8, !tbaa !5
  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 4, ptr %15) #3
  store i32 1, ptr %15, align 4, !tbaa !9
  %20 = load ptr, ptr %9, align 8, !tbaa !5
  %21 = icmp ne ptr %20, null
  br i1 %21, label %22, label %101

22:                                               ; preds = %4
  %23 = load ptr, ptr %9, align 8, !tbaa !5
  %24 = call i32 @EVP_PKEY_keygen_init(ptr noundef %23)
  %25 = icmp ne i32 %24, 0
  br i1 %25, label %26, label %101

26:                                               ; preds = %22
  %27 = load ptr, ptr %9, align 8, !tbaa !5
  %28 = call i32 @EVP_PKEY_generate(ptr noundef %27, ptr noundef %10)
  %29 = icmp ne i32 %28, 0
  br i1 %29, label %30, label %101

30:                                               ; preds = %26
  %31 = load ptr, ptr %10, align 8, !tbaa !5
  %32 = icmp ne ptr %31, null
  br i1 %32, label %33, label %101

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

36:                                               ; preds = %33
  %37 = load ptr, ptr %11, align 8, !tbaa !5
  %38 = call ptr @X509_get_serialNumber(ptr noundef %37)
  %39 = call i32 @ASN1_INTEGER_set(ptr noundef %38, i64 noundef 1)
  %40 = icmp ne i32 %39, 0
  br i1 %40, label %41, label %101

41:                                               ; preds = %36
  %42 = load ptr, ptr %11, align 8, !tbaa !5
  %43 = call ptr @X509_getm_notBefore(ptr noundef %42)
  %44 = call ptr @X509_gmtime_adj(ptr noundef %43, i64 noundef 0)
  %45 = icmp ne ptr %44, null
  br i1 %45, label %46, label %101

46:                                               ; preds = %41
  %47 = load ptr, ptr %11, align 8, !tbaa !5
  %48 = call ptr @X509_getm_notAfter(ptr noundef %47)
  %49 = call ptr @X509_gmtime_adj(ptr noundef %48, i64 noundef 31536000)
  %50 = icmp ne ptr %49, null
  br i1 %50, label %51, label %101

51:                                               ; preds = %46
  %52 = load ptr, ptr %11, align 8, !tbaa !5
  %53 = load ptr, ptr %10, align 8, !tbaa !5
  %54 = call i32 @X509_set_pubkey(ptr noundef %52, ptr noundef %53)
  %55 = icmp ne i32 %54, 0
  br i1 %55, label %56, label %101

56:                                               ; preds = %51
  %57 = load ptr, ptr %11, align 8, !tbaa !5
  %58 = call ptr @X509_get_subject_name(ptr noundef %57)
  store ptr %58, ptr %12, align 8, !tbaa !5
  %59 = icmp ne ptr %58, null
  br i1 %59, label %60, label %101

60:                                               ; preds = %56
  %61 = load ptr, ptr %12, align 8, !tbaa !5
  %62 = call i32 @X509_NAME_add_entry_by_txt(ptr noundef %61, ptr noundef @.str.1, i32 noundef 4097, ptr noundef @.str.2, i32 noundef -1, i32 noundef -1, i32 noundef 0)
  %63 = icmp ne i32 %62, 0
  br i1 %63, label %64, label %101

64:                                               ; preds = %60
  %65 = load ptr, ptr %12, align 8, !tbaa !5
  %66 = call i32 @X509_NAME_add_entry_by_txt(ptr noundef %65, ptr noundef @.str.3, i32 noundef 4097, ptr noundef @.str.4, i32 noundef -1, i32 noundef -1, i32 noundef 0)
  %67 = icmp ne i32 %66, 0
  br i1 %67, label %68, label %101

68:                                               ; preds = %64
  %69 = load ptr, ptr %12, align 8, !tbaa !5
  %70 = call i32 @X509_NAME_add_entry_by_txt(ptr noundef %69, ptr noundef @.str.5, i32 noundef 4097, ptr noundef @.str.6, i32 noundef -1, i32 noundef -1, i32 noundef 0)
  %71 = icmp ne i32 %70, 0
  br i1 %71, label %72, label %101

72:                                               ; preds = %68
  %73 = load ptr, ptr %11, align 8, !tbaa !5
  %74 = load ptr, ptr %12, align 8, !tbaa !5
  %75 = call i32 @X509_set_issuer_name(ptr noundef %73, ptr noundef %74)
  %76 = icmp ne i32 %75, 0
  br i1 %76, label %77, label %101

77:                                               ; preds = %72
  %78 = load ptr, ptr %11, align 8, !tbaa !5
  %79 = load ptr, ptr %10, align 8, !tbaa !5
  %80 = call ptr @EVP_sha256()
  %81 = call i32 @X509_sign(ptr noundef %78, ptr noundef %79, ptr noundef %80)
  %82 = icmp ne i32 %81, 0
  br i1 %82, label %83, label %101

83:                                               ; preds = %77
  %84 = load ptr, ptr %8, align 8, !tbaa !5
  %85 = call ptr @BIO_new_file(ptr noundef %84, ptr noundef @.str.7)
  store ptr %85, ptr %13, align 8, !tbaa !5
  %86 = icmp ne ptr %85, null
  br i1 %86, label %87, label %101

87:                                               ; preds = %83
  %88 = load ptr, ptr %13, align 8, !tbaa !5
  %89 = load ptr, ptr %10, align 8, !tbaa !5
  %90 = call i32 @PEM_write_bio_PrivateKey(ptr noundef %88, ptr noundef %89, ptr noundef null, ptr noundef null, i32 noundef 0, ptr noundef null, ptr noundef null)
  %91 = icmp ne i32 %90, 0
  br i1 %91, label %92, label %101

92:                                               ; preds = %87
  %93 = load ptr, ptr %7, align 8, !tbaa !5
  %94 = call ptr @BIO_new_file(ptr noundef %93, ptr noundef @.str.7)
  store ptr %94, ptr %14, align 8, !tbaa !5
  %95 = icmp ne ptr %94, null
  br i1 %95, label %96, label %101

96:                                               ; preds = %92
  %97 = load ptr, ptr %14, align 8, !tbaa !5
  %98 = load ptr, ptr %11, align 8, !tbaa !5
  %99 = call i32 @PEM_write_bio_X509(ptr noundef %97, ptr noundef %98)
  %100 = icmp ne i32 %99, 0
  br i1 %100, label %102, label %101

101:                                              ; preds = %96, %92, %87, %83, %77, %72, %68, %64, %60, %56, %51, %46, %41, %36, %33, %30, %26, %22, %4
  store i32 0, ptr %15, align 4, !tbaa !9
  br label %102

102:                                              ; preds = %101, %96
  %103 = load ptr, ptr %10, align 8, !tbaa !5
  call void @EVP_PKEY_free(ptr noundef %103)
  %104 = load ptr, ptr %11, align 8, !tbaa !5
  call void @X509_free(ptr noundef %104)
  %105 = load ptr, ptr %9, align 8, !tbaa !5
  call void @EVP_PKEY_CTX_free(ptr noundef %105)
  %106 = load ptr, ptr %13, align 8, !tbaa !5
  %107 = call i32 @BIO_free(ptr noundef %106)
  %108 = load ptr, ptr %14, align 8, !tbaa !5
  %109 = call i32 @BIO_free(ptr noundef %108)
  %110 = load i32, ptr %15, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  ret i32 %110
}

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

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

declare ptr @X509_new() #2

declare i32 @EVP_PKEY_keygen_init(ptr noundef) #2

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

declare i32 @ASN1_INTEGER_set(ptr noundef, i64 noundef) #2

declare ptr @X509_get_serialNumber(ptr noundef) #2

declare ptr @X509_gmtime_adj(ptr noundef, i64 noundef) #2

declare ptr @X509_getm_notBefore(ptr noundef) #2

declare ptr @X509_getm_notAfter(ptr noundef) #2

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

declare ptr @X509_get_subject_name(ptr noundef) #2

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

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

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

declare ptr @EVP_sha256() #2

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

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

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

declare void @EVP_PKEY_free(ptr noundef) #2

declare void @X509_free(ptr noundef) #2

declare void @EVP_PKEY_CTX_free(ptr noundef) #2

declare i32 @BIO_free(ptr noundef) #2

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

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}


; 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 [21 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [3 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local range(i32 0, 2) i32 @create_cert_key(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3) local_unnamed_addr #0 {
  %5 = alloca ptr, align 8
  %6 = tail call ptr @EVP_PKEY_CTX_new_from_name(ptr noundef %0, ptr noundef %1, ptr noundef nonnull @.str) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #3
  store ptr null, ptr %5, align 8, !tbaa !5
  %7 = tail call ptr @X509_new() #3
  %.not = icmp eq ptr %6, null
  br i1 %.not, label %51, label %8

8:                                                ; preds = %4
  %9 = tail call i32 @EVP_PKEY_keygen_init(ptr noundef nonnull %6) #3
  %.not39 = icmp eq i32 %9, 0
  br i1 %.not39, label %51, label %10

10:                                               ; preds = %8
  %11 = call i32 @EVP_PKEY_generate(ptr noundef nonnull %6, ptr noundef nonnull %5) #3
  %12 = icmp ne i32 %11, 0
  %13 = load ptr, ptr %5, align 8
  %14 = icmp ne ptr %13, null
  %or.cond = select i1 %12, i1 %14, i1 false
  %15 = icmp ne ptr %7, null
  %or.cond3 = select i1 %or.cond, i1 %15, i1 false
  br i1 %or.cond3, label %16, label %51

16:                                               ; preds = %10
  %17 = call ptr @X509_get_serialNumber(ptr noundef nonnull %7) #3
  %18 = call i32 @ASN1_INTEGER_set(ptr noundef %17, i64 noundef 1) #3
  %.not40 = icmp eq i32 %18, 0
  br i1 %.not40, label %51, label %19

19:                                               ; preds = %16
  %20 = call ptr @X509_getm_notBefore(ptr noundef nonnull %7) #3
  %21 = call ptr @X509_gmtime_adj(ptr noundef %20, i64 noundef 0) #3
  %.not41 = icmp eq ptr %21, null
  br i1 %.not41, label %51, label %22

22:                                               ; preds = %19
  %23 = call ptr @X509_getm_notAfter(ptr noundef nonnull %7) #3
  %24 = call ptr @X509_gmtime_adj(ptr noundef %23, i64 noundef 31536000) #3
  %.not42 = icmp eq ptr %24, null
  br i1 %.not42, label %51, label %25

25:                                               ; preds = %22
  %26 = load ptr, ptr %5, align 8, !tbaa !5
  %27 = call i32 @X509_set_pubkey(ptr noundef nonnull %7, ptr noundef %26) #3
  %.not43 = icmp eq i32 %27, 0
  br i1 %.not43, label %51, label %28

28:                                               ; preds = %25
  %29 = call ptr @X509_get_subject_name(ptr noundef nonnull %7) #3
  %.not44 = icmp eq ptr %29, null
  br i1 %.not44, label %51, label %30

30:                                               ; preds = %28
  %31 = call i32 @X509_NAME_add_entry_by_txt(ptr noundef nonnull %29, ptr noundef nonnull @.str.1, i32 noundef 4097, ptr noundef nonnull @.str.2, i32 noundef -1, i32 noundef -1, i32 noundef 0) #3
  %.not45 = icmp eq i32 %31, 0
  br i1 %.not45, label %51, label %32

32:                                               ; preds = %30
  %33 = call i32 @X509_NAME_add_entry_by_txt(ptr noundef nonnull %29, ptr noundef nonnull @.str.3, i32 noundef 4097, ptr noundef nonnull @.str.4, i32 noundef -1, i32 noundef -1, i32 noundef 0) #3
  %.not46 = icmp eq i32 %33, 0
  br i1 %.not46, label %51, label %34

34:                                               ; preds = %32
  %35 = call i32 @X509_NAME_add_entry_by_txt(ptr noundef nonnull %29, ptr noundef nonnull @.str.5, i32 noundef 4097, ptr noundef nonnull @.str.6, i32 noundef -1, i32 noundef -1, i32 noundef 0) #3
  %.not47 = icmp eq i32 %35, 0
  br i1 %.not47, label %51, label %36

36:                                               ; preds = %34
  %37 = call i32 @X509_set_issuer_name(ptr noundef nonnull %7, ptr noundef nonnull %29) #3
  %.not48 = icmp eq i32 %37, 0
  br i1 %.not48, label %51, label %38

38:                                               ; preds = %36
  %39 = load ptr, ptr %5, align 8, !tbaa !5
  %40 = call ptr @EVP_sha256() #3
  %41 = call i32 @X509_sign(ptr noundef nonnull %7, ptr noundef %39, ptr noundef %40) #3
  %.not49 = icmp eq i32 %41, 0
  br i1 %.not49, label %51, label %42

42:                                               ; preds = %38
  %43 = call ptr @BIO_new_file(ptr noundef %3, ptr noundef nonnull @.str.7) #3
  %.not50 = icmp eq ptr %43, null
  br i1 %.not50, label %51, label %44

44:                                               ; preds = %42
  %45 = load ptr, ptr %5, align 8, !tbaa !5
  %46 = call i32 @PEM_write_bio_PrivateKey(ptr noundef nonnull %43, ptr noundef %45, ptr noundef null, ptr noundef null, i32 noundef 0, ptr noundef null, ptr noundef null) #3
  %.not51 = icmp eq i32 %46, 0
  br i1 %.not51, label %51, label %47

47:                                               ; preds = %44
  %48 = call ptr @BIO_new_file(ptr noundef %2, ptr noundef nonnull @.str.7) #3
  %.not52 = icmp eq ptr %48, null
  br i1 %.not52, label %51, label %49

49:                                               ; preds = %47
  %50 = call i32 @PEM_write_bio_X509(ptr noundef nonnull %48, ptr noundef nonnull %7) #3
  %.not53 = icmp ne i32 %50, 0
  %spec.select = zext i1 %.not53 to i32
  br label %51

51:                                               ; preds = %49, %4, %8, %10, %16, %19, %22, %25, %28, %30, %32, %34, %36, %38, %42, %44, %47
  %.131 = phi ptr [ %43, %47 ], [ %43, %44 ], [ null, %42 ], [ null, %38 ], [ null, %36 ], [ null, %34 ], [ null, %32 ], [ null, %30 ], [ null, %28 ], [ null, %25 ], [ null, %22 ], [ null, %19 ], [ null, %16 ], [ null, %10 ], [ null, %8 ], [ null, %4 ], [ %43, %49 ]
  %.1 = phi ptr [ null, %47 ], [ null, %44 ], [ null, %42 ], [ null, %38 ], [ null, %36 ], [ null, %34 ], [ null, %32 ], [ null, %30 ], [ null, %28 ], [ null, %25 ], [ null, %22 ], [ null, %19 ], [ null, %16 ], [ null, %10 ], [ null, %8 ], [ null, %4 ], [ %48, %49 ]
  %.0 = phi i32 [ 0, %47 ], [ 0, %44 ], [ 0, %42 ], [ 0, %38 ], [ 0, %36 ], [ 0, %34 ], [ 0, %32 ], [ 0, %30 ], [ 0, %28 ], [ 0, %25 ], [ 0, %22 ], [ 0, %19 ], [ 0, %16 ], [ 0, %10 ], [ 0, %8 ], [ 0, %4 ], [ %spec.select, %49 ]
  %52 = load ptr, ptr %5, align 8, !tbaa !5
  call void @EVP_PKEY_free(ptr noundef %52) #3
  call void @X509_free(ptr noundef %7) #3
  call void @EVP_PKEY_CTX_free(ptr noundef %6) #3
  %53 = call i32 @BIO_free(ptr noundef %.131) #3
  %54 = call i32 @BIO_free(ptr noundef %.1) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #3
  ret i32 %.0
}

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

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

declare ptr @X509_new() local_unnamed_addr #2

declare i32 @EVP_PKEY_keygen_init(ptr noundef) local_unnamed_addr #2

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

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

declare ptr @X509_get_serialNumber(ptr noundef) local_unnamed_addr #2

declare ptr @X509_gmtime_adj(ptr noundef, i64 noundef) local_unnamed_addr #2

declare ptr @X509_getm_notBefore(ptr noundef) local_unnamed_addr #2

declare ptr @X509_getm_notAfter(ptr noundef) local_unnamed_addr #2

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

declare ptr @X509_get_subject_name(ptr noundef) local_unnamed_addr #2

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

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

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

declare ptr @EVP_sha256() local_unnamed_addr #2

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

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

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

declare void @EVP_PKEY_free(ptr noundef) local_unnamed_addr #2

declare void @X509_free(ptr noundef) local_unnamed_addr #2

declare void @EVP_PKEY_CTX_free(ptr noundef) local_unnamed_addr #2

declare i32 @BIO_free(ptr 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

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


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