; LLVM IR from jim-b/ECCSI-SAKKE :: src/utils (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"

@stdout = external global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [69 x i8], align 1

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

; Function Attrs: nounwind
declare i32 @snprintf(ptr noundef, i64 noundef, ptr noundef, ...) #1

; Function Attrs: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #1

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

; Function Attrs: nounwind uwtable
declare dso_local void @utils_BNdump(i8 noundef zeroext, ptr noundef, ptr noundef, i8 noundef zeroext, ptr noundef) #2

; Function Attrs: nounwind uwtable
define dso_local void @utils_displayAffineCoordinates(i8 noundef zeroext %0, ptr noundef %1, ptr noundef %2, i8 noundef zeroext %3, ptr noundef %4, ptr noundef %5) #2 {
  %7 = alloca i8, align 1
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i8, align 1
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca [1200 x i8], align 16
  %17 = alloca [1200 x i8], align 16
  %18 = alloca [1200 x i8], align 16
  %19 = alloca [1200 x i8], align 16
  %20 = alloca [1200 x i8], align 16
  store i8 %0, ptr %7, align 1, !tbaa !5
  store ptr %1, ptr %8, align 8, !tbaa !8
  store ptr %2, ptr %9, align 8, !tbaa !8
  store i8 %3, ptr %10, align 1, !tbaa !5
  store ptr %4, ptr %11, align 8, !tbaa !8
  store ptr %5, ptr %12, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  %21 = call ptr @BN_CTX_new()
  store ptr %21, ptr %13, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  %22 = call ptr @BN_new()
  store ptr %22, ptr %14, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #4
  %23 = call ptr @BN_new()
  store ptr %23, ptr %15, align 8, !tbaa !8
  %24 = load ptr, ptr %11, align 8, !tbaa !8
  %25 = load ptr, ptr %12, align 8, !tbaa !8
  %26 = load ptr, ptr %14, align 8, !tbaa !8
  %27 = load ptr, ptr %15, align 8, !tbaa !8
  %28 = load ptr, ptr %13, align 8, !tbaa !8
  %29 = call i32 @EC_POINT_get_affine_coordinates_GFp(ptr noundef %24, ptr noundef %25, ptr noundef %26, ptr noundef %27, ptr noundef %28)
  %30 = load i8, ptr %7, align 1, !tbaa !5
  %31 = zext i8 %30 to i32
  switch i32 %31, label %112 [
    i32 1, label %32
    i32 2, label %52
    i32 3, label %72
    i32 4, label %92
  ]

32:                                               ; preds = %6
  %33 = load ptr, ptr %9, align 8, !tbaa !8
  %34 = icmp ne ptr %33, null
  br i1 %34, label %35, label %43

35:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 1200, ptr %16) #4
  %36 = getelementptr inbounds [1200 x i8], ptr %16, i64 0, i64 0
  %37 = load ptr, ptr %8, align 8, !tbaa !8
  %38 = load ptr, ptr %9, align 8, !tbaa !8
  %39 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef %36, i64 noundef 1200, ptr noundef @.str.16, ptr noundef %37, ptr noundef %38) #4
  %40 = load ptr, ptr @stdout, align 8, !tbaa !8
  %41 = getelementptr inbounds [1200 x i8], ptr %16, i64 0, i64 0
  %42 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %40, ptr noundef @.str.2, ptr noundef %41) #4
  call void @llvm.lifetime.end.p0(i64 1200, ptr %16) #4
  br label %43

43:                                               ; preds = %35, %32
  %44 = load i8, ptr %7, align 1, !tbaa !5
  %45 = load ptr, ptr %8, align 8, !tbaa !8
  %46 = load i8, ptr %10, align 1, !tbaa !5
  %47 = load ptr, ptr %14, align 8, !tbaa !8
  call void @utils_BNdump(i8 noundef zeroext %44, ptr noundef %45, ptr noundef @.str.17, i8 noundef zeroext %46, ptr noundef %47)
  %48 = load i8, ptr %7, align 1, !tbaa !5
  %49 = load ptr, ptr %8, align 8, !tbaa !8
  %50 = load i8, ptr %10, align 1, !tbaa !5
  %51 = load ptr, ptr %15, align 8, !tbaa !8
  call void @utils_BNdump(i8 noundef zeroext %48, ptr noundef %49, ptr noundef @.str.18, i8 noundef zeroext %50, ptr noundef %51)
  br label %118

52:                                               ; preds = %6
  %53 = load ptr, ptr %9, align 8, !tbaa !8
  %54 = icmp ne ptr %53, null
  br i1 %54, label %55, label %63

55:                                               ; preds = %52
  call void @llvm.lifetime.start.p0(i64 1200, ptr %17) #4
  %56 = getelementptr inbounds [1200 x i8], ptr %17, i64 0, i64 0
  %57 = load ptr, ptr %8, align 8, !tbaa !8
  %58 = load ptr, ptr %9, align 8, !tbaa !8
  %59 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef %56, i64 noundef 1200, ptr noundef @.str.16, ptr noundef %57, ptr noundef %58) #4
  %60 = load ptr, ptr @stdout, align 8, !tbaa !8
  %61 = getelementptr inbounds [1200 x i8], ptr %17, i64 0, i64 0
  %62 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %60, ptr noundef @.str.3, ptr noundef %61) #4
  call void @llvm.lifetime.end.p0(i64 1200, ptr %17) #4
  br label %63

63:                                               ; preds = %55, %52
  %64 = load i8, ptr %7, align 1, !tbaa !5
  %65 = load ptr, ptr %8, align 8, !tbaa !8
  %66 = load i8, ptr %10, align 1, !tbaa !5
  %67 = load ptr, ptr %14, align 8, !tbaa !8
  call void @utils_BNdump(i8 noundef zeroext %64, ptr noundef %65, ptr noundef @.str.17, i8 noundef zeroext %66, ptr noundef %67)
  %68 = load i8, ptr %7, align 1, !tbaa !5
  %69 = load ptr, ptr %8, align 8, !tbaa !8
  %70 = load i8, ptr %10, align 1, !tbaa !5
  %71 = load ptr, ptr %15, align 8, !tbaa !8
  call void @utils_BNdump(i8 noundef zeroext %68, ptr noundef %69, ptr noundef @.str.18, i8 noundef zeroext %70, ptr noundef %71)
  br label %118

72:                                               ; preds = %6
  %73 = load ptr, ptr %9, align 8, !tbaa !8
  %74 = icmp ne ptr %73, null
  br i1 %74, label %75, label %83

75:                                               ; preds = %72
  call void @llvm.lifetime.start.p0(i64 1200, ptr %18) #4
  %76 = getelementptr inbounds [1200 x i8], ptr %18, i64 0, i64 0
  %77 = load ptr, ptr %8, align 8, !tbaa !8
  %78 = load ptr, ptr %9, align 8, !tbaa !8
  %79 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef %76, i64 noundef 1200, ptr noundef @.str.16, ptr noundef %77, ptr noundef %78) #4
  %80 = load ptr, ptr @stdout, align 8, !tbaa !8
  %81 = getelementptr inbounds [1200 x i8], ptr %18, i64 0, i64 0
  %82 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %80, ptr noundef @.str.4, ptr noundef %81) #4
  call void @llvm.lifetime.end.p0(i64 1200, ptr %18) #4
  br label %83

83:                                               ; preds = %75, %72
  %84 = load i8, ptr %7, align 1, !tbaa !5
  %85 = load ptr, ptr %8, align 8, !tbaa !8
  %86 = load i8, ptr %10, align 1, !tbaa !5
  %87 = load ptr, ptr %14, align 8, !tbaa !8
  call void @utils_BNdump(i8 noundef zeroext %84, ptr noundef %85, ptr noundef @.str.17, i8 noundef zeroext %86, ptr noundef %87)
  %88 = load i8, ptr %7, align 1, !tbaa !5
  %89 = load ptr, ptr %8, align 8, !tbaa !8
  %90 = load i8, ptr %10, align 1, !tbaa !5
  %91 = load ptr, ptr %15, align 8, !tbaa !8
  call void @utils_BNdump(i8 noundef zeroext %88, ptr noundef %89, ptr noundef @.str.18, i8 noundef zeroext %90, ptr noundef %91)
  br label %118

92:                                               ; preds = %6
  %93 = load ptr, ptr %9, align 8, !tbaa !8
  %94 = icmp ne ptr %93, null
  br i1 %94, label %95, label %103

95:                                               ; preds = %92
  call void @llvm.lifetime.start.p0(i64 1200, ptr %19) #4
  %96 = getelementptr inbounds [1200 x i8], ptr %19, i64 0, i64 0
  %97 = load ptr, ptr %8, align 8, !tbaa !8
  %98 = load ptr, ptr %9, align 8, !tbaa !8
  %99 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef %96, i64 noundef 1200, ptr noundef @.str.16, ptr noundef %97, ptr noundef %98) #4
  %100 = load ptr, ptr @stdout, align 8, !tbaa !8
  %101 = getelementptr inbounds [1200 x i8], ptr %19, i64 0, i64 0
  %102 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %100, ptr noundef @.str.5, ptr noundef %101) #4
  call void @llvm.lifetime.end.p0(i64 1200, ptr %19) #4
  br label %103

103:                                              ; preds = %95, %92
  %104 = load i8, ptr %7, align 1, !tbaa !5
  %105 = load ptr, ptr %8, align 8, !tbaa !8
  %106 = load i8, ptr %10, align 1, !tbaa !5
  %107 = load ptr, ptr %14, align 8, !tbaa !8
  call void @utils_BNdump(i8 noundef zeroext %104, ptr noundef %105, ptr noundef @.str.17, i8 noundef zeroext %106, ptr noundef %107)
  %108 = load i8, ptr %7, align 1, !tbaa !5
  %109 = load ptr, ptr %8, align 8, !tbaa !8
  %110 = load i8, ptr %10, align 1, !tbaa !5
  %111 = load ptr, ptr %15, align 8, !tbaa !8
  call void @utils_BNdump(i8 noundef zeroext %108, ptr noundef %109, ptr noundef @.str.18, i8 noundef zeroext %110, ptr noundef %111)
  br label %118

112:                                              ; preds = %6
  call void @llvm.lifetime.start.p0(i64 1200, ptr %20) #4
  %113 = getelementptr inbounds [1200 x i8], ptr %20, i64 0, i64 0
  %114 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef %113, i64 noundef 1200, ptr noundef @.str.9, ptr noundef @.str.19) #4
  %115 = load ptr, ptr @stdout, align 8, !tbaa !8
  %116 = getelementptr inbounds [1200 x i8], ptr %20, i64 0, i64 0
  %117 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %115, ptr noundef @.str.2, ptr noundef %116) #4
  call void @llvm.lifetime.end.p0(i64 1200, ptr %20) #4
  br label %118

118:                                              ; preds = %112, %103, %83, %63, %43
  %119 = load ptr, ptr %14, align 8, !tbaa !8
  call void @BN_clear_free(ptr noundef %119)
  %120 = load ptr, ptr %15, align 8, !tbaa !8
  call void @BN_clear_free(ptr noundef %120)
  %121 = load ptr, ptr %13, align 8, !tbaa !8
  call void @BN_CTX_free(ptr noundef %121)
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  ret void
}

declare ptr @BN_CTX_new() #3

declare ptr @BN_new() #3

declare i32 @EC_POINT_get_affine_coordinates_GFp(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #3

declare void @BN_clear_free(ptr noundef) #3

declare void @BN_CTX_free(ptr noundef) #3

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nounwind "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 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { "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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C/C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"any pointer", !6, 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"

@stdout = external local_unnamed_addr global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [69 x i8], align 1

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

; Function Attrs: nofree nounwind
declare noundef i32 @snprintf(ptr noalias nocapture noundef writeonly, i64 noundef, ptr nocapture noundef readonly, ...) local_unnamed_addr #1

; Function Attrs: nofree nounwind
declare noundef i32 @fprintf(ptr nocapture noundef, ptr nocapture noundef readonly, ...) local_unnamed_addr #1

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

; Function Attrs: nounwind uwtable
declare dso_local void @utils_BNdump(i8 noundef zeroext, ptr noundef, ptr noundef, i8 noundef zeroext, ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
define dso_local void @utils_displayAffineCoordinates(i8 noundef zeroext %0, ptr noundef %1, ptr noundef %2, i8 noundef zeroext %3, ptr noundef %4, ptr noundef %5) local_unnamed_addr #2 {
  %7 = alloca [1200 x i8], align 16
  %8 = alloca [1200 x i8], align 16
  %9 = alloca [1200 x i8], align 16
  %10 = alloca [1200 x i8], align 16
  %11 = alloca [1200 x i8], align 16
  %12 = tail call ptr @BN_CTX_new() #4
  %13 = tail call ptr @BN_new() #4
  %14 = tail call ptr @BN_new() #4
  %15 = tail call i32 @EC_POINT_get_affine_coordinates_GFp(ptr noundef %4, ptr noundef %5, ptr noundef %13, ptr noundef %14, ptr noundef %12) #4
  switch i8 %0, label %40 [
    i8 1, label %16
    i8 2, label %22
    i8 3, label %28
    i8 4, label %34
  ]

16:                                               ; preds = %6
  %.not54 = icmp eq ptr %2, null
  br i1 %.not54, label %21, label %17

17:                                               ; preds = %16
  call void @llvm.lifetime.start.p0(i64 1200, ptr nonnull %7) #4
  %18 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull dereferenceable(1) %7, i64 noundef 1200, ptr noundef nonnull @.str.16, ptr noundef %1, ptr noundef nonnull %2) #4
  %19 = load ptr, ptr @stdout, align 8, !tbaa !5
  %20 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %19, ptr noundef nonnull @.str.2, ptr noundef nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 1200, ptr nonnull %7) #4
  br label %21

21:                                               ; preds = %17, %16
  call void @utils_BNdump(i8 noundef zeroext 1, ptr noundef %1, ptr noundef nonnull @.str.17, i8 noundef zeroext %3, ptr noundef %13)
  call void @utils_BNdump(i8 noundef zeroext 1, ptr noundef %1, ptr noundef nonnull @.str.18, i8 noundef zeroext %3, ptr noundef %14)
  br label %44

22:                                               ; preds = %6
  %.not53 = icmp eq ptr %2, null
  br i1 %.not53, label %27, label %23

23:                                               ; preds = %22
  call void @llvm.lifetime.start.p0(i64 1200, ptr nonnull %8) #4
  %24 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull dereferenceable(1) %8, i64 noundef 1200, ptr noundef nonnull @.str.16, ptr noundef %1, ptr noundef nonnull %2) #4
  %25 = load ptr, ptr @stdout, align 8, !tbaa !5
  %26 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %25, ptr noundef nonnull @.str.3, ptr noundef nonnull %8) #4
  call void @llvm.lifetime.end.p0(i64 1200, ptr nonnull %8) #4
  br label %27

27:                                               ; preds = %23, %22
  call void @utils_BNdump(i8 noundef zeroext 2, ptr noundef %1, ptr noundef nonnull @.str.17, i8 noundef zeroext %3, ptr noundef %13)
  call void @utils_BNdump(i8 noundef zeroext 2, ptr noundef %1, ptr noundef nonnull @.str.18, i8 noundef zeroext %3, ptr noundef %14)
  br label %44

28:                                               ; preds = %6
  %.not52 = icmp eq ptr %2, null
  br i1 %.not52, label %33, label %29

29:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 1200, ptr nonnull %9) #4
  %30 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull dereferenceable(1) %9, i64 noundef 1200, ptr noundef nonnull @.str.16, ptr noundef %1, ptr noundef nonnull %2) #4
  %31 = load ptr, ptr @stdout, align 8, !tbaa !5
  %32 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %31, ptr noundef nonnull @.str.4, ptr noundef nonnull %9) #4
  call void @llvm.lifetime.end.p0(i64 1200, ptr nonnull %9) #4
  br label %33

33:                                               ; preds = %29, %28
  call void @utils_BNdump(i8 noundef zeroext 3, ptr noundef %1, ptr noundef nonnull @.str.17, i8 noundef zeroext %3, ptr noundef %13)
  call void @utils_BNdump(i8 noundef zeroext 3, ptr noundef %1, ptr noundef nonnull @.str.18, i8 noundef zeroext %3, ptr noundef %14)
  br label %44

34:                                               ; preds = %6
  %.not = icmp eq ptr %2, null
  br i1 %.not, label %39, label %35

35:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 1200, ptr nonnull %10) #4
  %36 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull dereferenceable(1) %10, i64 noundef 1200, ptr noundef nonnull @.str.16, ptr noundef %1, ptr noundef nonnull %2) #4
  %37 = load ptr, ptr @stdout, align 8, !tbaa !5
  %38 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %37, ptr noundef nonnull @.str.5, ptr noundef nonnull %10) #4
  call void @llvm.lifetime.end.p0(i64 1200, ptr nonnull %10) #4
  br label %39

39:                                               ; preds = %35, %34
  call void @utils_BNdump(i8 noundef zeroext 4, ptr noundef %1, ptr noundef nonnull @.str.17, i8 noundef zeroext %3, ptr noundef %13)
  call void @utils_BNdump(i8 noundef zeroext 4, ptr noundef %1, ptr noundef nonnull @.str.18, i8 noundef zeroext %3, ptr noundef %14)
  br label %44

40:                                               ; preds = %6
  call void @llvm.lifetime.start.p0(i64 1200, ptr nonnull %11) #4
  %41 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull dereferenceable(1) %11, i64 noundef 1200, ptr noundef nonnull @.str.9, ptr noundef nonnull @.str.19) #4
  %42 = load ptr, ptr @stdout, align 8, !tbaa !5
  %43 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %42, ptr noundef nonnull @.str.2, ptr noundef nonnull %11) #4
  call void @llvm.lifetime.end.p0(i64 1200, ptr nonnull %11) #4
  br label %44

44:                                               ; preds = %40, %39, %33, %27, %21
  call void @BN_clear_free(ptr noundef %13) #4
  call void @BN_clear_free(ptr noundef %14) #4
  call void @BN_CTX_free(ptr noundef %12) #4
  ret void
}

declare ptr @BN_CTX_new() local_unnamed_addr #3

declare ptr @BN_new() local_unnamed_addr #3

declare i32 @EC_POINT_get_affine_coordinates_GFp(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

declare void @BN_clear_free(ptr noundef) local_unnamed_addr #3

declare void @BN_CTX_free(ptr noundef) local_unnamed_addr #3

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nofree nounwind "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 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { "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/C++ TBAA"}


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