; LLVM IR from openssl/openssl :: crypto/ec (ecp_smpl)

; 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.ec_group_st = type { ptr, ptr, ptr, ptr, i32, i32, i32, i32, ptr, i64, ptr, [6 x i32], ptr, ptr, i32, ptr, ptr, ptr, ptr, i32, %union.anon, ptr, ptr }
%union.anon = type { ptr }
%struct.ec_method_st = type { i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }

@.str = external hidden unnamed_addr constant [70 x i8], align 1
@__func__.ossl_ec_GFp_simple_group_set_curve = external hidden unnamed_addr constant [35 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @ossl_ec_GFp_simple_group_set_curve(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4) #0 {
  %6 = alloca i32, align 4
  %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 i32, align 4
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = 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
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #3
  store i32 0, ptr %12, align 4, !tbaa !9
  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
  %16 = load ptr, ptr %8, align 8, !tbaa !5
  %17 = call i32 @BN_num_bits(ptr noundef %16)
  %18 = icmp sle i32 %17, 2
  br i1 %18, label %23, label %19

19:                                               ; preds = %5
  %20 = load ptr, ptr %8, align 8, !tbaa !5
  %21 = call i32 @BN_is_odd(ptr noundef %20)
  %22 = icmp ne i32 %21, 0
  br i1 %22, label %24, label %23

23:                                               ; preds = %19, %5
  call void @ERR_new()
  call void @ERR_set_debug(ptr noundef @.str, i32 noundef 151, ptr noundef @__func__.ossl_ec_GFp_simple_group_set_curve)
  call void (i32, i32, ptr, ...) @ERR_set_error(i32 noundef 16, i32 noundef 103, ptr noundef null)
  store i32 0, ptr %6, align 4
  store i32 1, ptr %15, align 4
  br label %148

24:                                               ; preds = %19
  %25 = load ptr, ptr %11, align 8, !tbaa !5
  %26 = icmp eq ptr %25, null
  br i1 %26, label %27, label %36

27:                                               ; preds = %24
  %28 = load ptr, ptr %7, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct.ec_group_st, ptr %28, i32 0, i32 21
  %30 = load ptr, ptr %29, align 8, !tbaa !11
  %31 = call ptr @BN_CTX_new_ex(ptr noundef %30)
  store ptr %31, ptr %13, align 8, !tbaa !5
  store ptr %31, ptr %11, align 8, !tbaa !5
  %32 = load ptr, ptr %11, align 8, !tbaa !5
  %33 = icmp eq ptr %32, null
  br i1 %33, label %34, label %35

34:                                               ; preds = %27
  store i32 0, ptr %6, align 4
  store i32 1, ptr %15, align 4
  br label %148

35:                                               ; preds = %27
  br label %36

36:                                               ; preds = %35, %24
  %37 = load ptr, ptr %11, align 8, !tbaa !5
  call void @BN_CTX_start(ptr noundef %37)
  %38 = load ptr, ptr %11, align 8, !tbaa !5
  %39 = call ptr @BN_CTX_get(ptr noundef %38)
  store ptr %39, ptr %14, align 8, !tbaa !5
  %40 = load ptr, ptr %14, align 8, !tbaa !5
  %41 = icmp eq ptr %40, null
  br i1 %41, label %42, label %43

42:                                               ; preds = %36
  br label %144

43:                                               ; preds = %36
  %44 = load ptr, ptr %7, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.ec_group_st, ptr %44, i32 0, i32 10
  %46 = load ptr, ptr %45, align 8, !tbaa !14
  %47 = load ptr, ptr %8, align 8, !tbaa !5
  %48 = call ptr @BN_copy(ptr noundef %46, ptr noundef %47)
  %49 = icmp ne ptr %48, null
  br i1 %49, label %51, label %50

50:                                               ; preds = %43
  br label %144

51:                                               ; preds = %43
  %52 = load ptr, ptr %7, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.ec_group_st, ptr %52, i32 0, i32 10
  %54 = load ptr, ptr %53, align 8, !tbaa !14
  call void @BN_set_negative(ptr noundef %54, i32 noundef 0)
  %55 = load ptr, ptr %14, align 8, !tbaa !5
  %56 = load ptr, ptr %9, align 8, !tbaa !5
  %57 = load ptr, ptr %8, align 8, !tbaa !5
  %58 = load ptr, ptr %11, align 8, !tbaa !5
  %59 = call i32 @BN_nnmod(ptr noundef %55, ptr noundef %56, ptr noundef %57, ptr noundef %58)
  %60 = icmp ne i32 %59, 0
  br i1 %60, label %62, label %61

61:                                               ; preds = %51
  br label %144

62:                                               ; preds = %51
  %63 = load ptr, ptr %7, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct.ec_group_st, ptr %63, i32 0, i32 0
  %65 = load ptr, ptr %64, align 8, !tbaa !15
  %66 = getelementptr inbounds %struct.ec_method_st, ptr %65, i32 0, i32 36
  %67 = load ptr, ptr %66, align 8, !tbaa !16
  %68 = icmp ne ptr %67, null
  br i1 %68, label %69, label %85

69:                                               ; preds = %62
  %70 = load ptr, ptr %7, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct.ec_group_st, ptr %70, i32 0, i32 0
  %72 = load ptr, ptr %71, align 8, !tbaa !15
  %73 = getelementptr inbounds %struct.ec_method_st, ptr %72, i32 0, i32 36
  %74 = load ptr, ptr %73, align 8, !tbaa !16
  %75 = load ptr, ptr %7, align 8, !tbaa !5
  %76 = load ptr, ptr %7, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.ec_group_st, ptr %76, i32 0, i32 12
  %78 = load ptr, ptr %77, align 8, !tbaa !18
  %79 = load ptr, ptr %14, align 8, !tbaa !5
  %80 = load ptr, ptr %11, align 8, !tbaa !5
  %81 = call i32 %74(ptr noundef %75, ptr noundef %78, ptr noundef %79, ptr noundef %80)
  %82 = icmp ne i32 %81, 0
  br i1 %82, label %84, label %83

83:                                               ; preds = %69
  br label %144

84:                                               ; preds = %69
  br label %94

85:                                               ; preds = %62
  %86 = load ptr, ptr %7, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct.ec_group_st, ptr %86, i32 0, i32 12
  %88 = load ptr, ptr %87, align 8, !tbaa !18
  %89 = load ptr, ptr %14, align 8, !tbaa !5
  %90 = call ptr @BN_copy(ptr noundef %88, ptr noundef %89)
  %91 = icmp ne ptr %90, null
  br i1 %91, label %93, label %92

92:                                               ; preds = %85
  br label %144

93:                                               ; preds = %85
  br label %94

94:                                               ; preds = %93, %84
  %95 = load ptr, ptr %7, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct.ec_group_st, ptr %95, i32 0, i32 13
  %97 = load ptr, ptr %96, align 8, !tbaa !19
  %98 = load ptr, ptr %10, align 8, !tbaa !5
  %99 = load ptr, ptr %8, align 8, !tbaa !5
  %100 = load ptr, ptr %11, align 8, !tbaa !5
  %101 = call i32 @BN_nnmod(ptr noundef %97, ptr noundef %98, ptr noundef %99, ptr noundef %100)
  %102 = icmp ne i32 %101, 0
  br i1 %102, label %104, label %103

103:                                              ; preds = %94
  br label %144

104:                                              ; preds = %94
  %105 = load ptr, ptr %7, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct.ec_group_st, ptr %105, i32 0, i32 0
  %107 = load ptr, ptr %106, align 8, !tbaa !15
  %108 = getelementptr inbounds %struct.ec_method_st, ptr %107, i32 0, i32 36
  %109 = load ptr, ptr %108, align 8, !tbaa !16
  %110 = icmp ne ptr %109, null
  br i1 %110, label %111, label %129

111:                                              ; preds = %104
  %112 = load ptr, ptr %7, align 8, !tbaa !5
  %113 = getelementptr inbounds %struct.ec_group_st, ptr %112, i32 0, i32 0
  %114 = load ptr, ptr %113, align 8, !tbaa !15
  %115 = getelementptr inbounds %struct.ec_method_st, ptr %114, i32 0, i32 36
  %116 = load ptr, ptr %115, align 8, !tbaa !16
  %117 = load ptr, ptr %7, align 8, !tbaa !5
  %118 = load ptr, ptr %7, align 8, !tbaa !5
  %119 = getelementptr inbounds %struct.ec_group_st, ptr %118, i32 0, i32 13
  %120 = load ptr, ptr %119, align 8, !tbaa !19
  %121 = load ptr, ptr %7, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.ec_group_st, ptr %121, i32 0, i32 13
  %123 = load ptr, ptr %122, align 8, !tbaa !19
  %124 = load ptr, ptr %11, align 8, !tbaa !5
  %125 = call i32 %116(ptr noundef %117, ptr noundef %120, ptr noundef %123, ptr noundef %124)
  %126 = icmp ne i32 %125, 0
  br i1 %126, label %128, label %127

127:                                              ; preds = %111
  br label %144

128:                                              ; preds = %111
  br label %129

129:                                              ; preds = %128, %104
  %130 = load ptr, ptr %14, align 8, !tbaa !5
  %131 = call i32 @BN_add_word(ptr noundef %130, i64 noundef 3)
  %132 = icmp ne i32 %131, 0
  br i1 %132, label %134, label %133

133:                                              ; preds = %129
  br label %144

134:                                              ; preds = %129
  %135 = load ptr, ptr %14, align 8, !tbaa !5
  %136 = load ptr, ptr %7, align 8, !tbaa !5
  %137 = getelementptr inbounds %struct.ec_group_st, ptr %136, i32 0, i32 10
  %138 = load ptr, ptr %137, align 8, !tbaa !14
  %139 = call i32 @BN_cmp(ptr noundef %135, ptr noundef %138)
  %140 = icmp eq i32 0, %139
  %141 = zext i1 %140 to i32
  %142 = load ptr, ptr %7, align 8, !tbaa !5
  %143 = getelementptr inbounds %struct.ec_group_st, ptr %142, i32 0, i32 14
  store i32 %141, ptr %143, align 8, !tbaa !20
  store i32 1, ptr %12, align 4, !tbaa !9
  br label %144

144:                                              ; preds = %134, %133, %127, %103, %92, %83, %61, %50, %42
  %145 = load ptr, ptr %11, align 8, !tbaa !5
  call void @BN_CTX_end(ptr noundef %145)
  %146 = load ptr, ptr %13, align 8, !tbaa !5
  call void @BN_CTX_free(ptr noundef %146)
  %147 = load i32, ptr %12, align 4, !tbaa !9
  store i32 %147, ptr %6, align 4
  store i32 1, ptr %15, align 4
  br label %148

148:                                              ; preds = %144, %34, %23
  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 4, ptr %12) #3
  %149 = load i32, ptr %6, align 4
  ret i32 %149
}

declare ptr @BN_copy(ptr noundef, ptr noundef) #1

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

declare i32 @BN_num_bits(ptr noundef) #1

declare i32 @BN_is_odd(ptr noundef) #1

declare void @ERR_new() #1

declare void @ERR_set_debug(ptr noundef, i32 noundef, ptr noundef) #1

declare void @ERR_set_error(i32 noundef, i32 noundef, ptr noundef, ...) #1

declare ptr @BN_CTX_new_ex(ptr noundef) #1

declare void @BN_CTX_start(ptr noundef) #1

declare ptr @BN_CTX_get(ptr noundef) #1

declare void @BN_set_negative(ptr noundef, i32 noundef) #1

declare i32 @BN_nnmod(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #1

declare i32 @BN_add_word(ptr noundef, i64 noundef) #1

declare i32 @BN_cmp(ptr noundef, ptr noundef) #1

declare void @BN_CTX_end(ptr noundef) #1

declare void @BN_CTX_free(ptr noundef) #1

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #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 = { "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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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, !6, i64 168}
!12 = !{!"ec_group_st", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !10, i64 32, !10, i64 36, !10, i64 40, !10, i64 44, !6, i64 48, !13, i64 56, !6, i64 64, !7, i64 72, !6, i64 96, !6, i64 104, !10, i64 112, !6, i64 120, !6, i64 128, !6, i64 136, !6, i64 144, !10, i64 152, !7, i64 160, !6, i64 168, !6, i64 176}
!13 = !{!"long", !7, i64 0}
!14 = !{!12, !6, i64 64}
!15 = !{!12, !6, i64 0}
!16 = !{!17, !6, i64 280}
!17 = !{!"ec_method_st", !10, i64 0, !10, i64 4, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !6, i64 112, !6, i64 120, !6, i64 128, !6, i64 136, !6, i64 144, !6, i64 152, !6, i64 160, !6, i64 168, !6, i64 176, !6, i64 184, !6, i64 192, !6, i64 200, !6, i64 208, !6, i64 216, !6, i64 224, !6, i64 232, !6, i64 240, !6, i64 248, !6, i64 256, !6, i64 264, !6, i64 272, !6, i64 280, !6, i64 288, !6, i64 296, !6, i64 304, !6, i64 312, !6, i64 320, !6, i64 328, !6, i64 336, !6, i64 344, !6, i64 352, !6, i64 360, !6, i64 368, !6, i64 376, !6, i64 384, !6, i64 392, !6, i64 400, !6, i64 408, !6, i64 416, !6, i64 424, !6, i64 432, !6, i64 440}
!18 = !{!12, !6, i64 96}
!19 = !{!12, !6, i64 104}
!20 = !{!12, !10, i64 112}


; 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 [70 x i8], align 1
@__func__.ossl_ec_GFp_simple_group_set_curve = external hidden unnamed_addr constant [35 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local range(i32 0, 2) i32 @ossl_ec_GFp_simple_group_set_curve(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4) local_unnamed_addr #0 {
  %6 = tail call i32 @BN_num_bits(ptr noundef %1) #2
  %7 = icmp slt i32 %6, 3
  br i1 %7, label %10, label %8

8:                                                ; preds = %5
  %9 = tail call i32 @BN_is_odd(ptr noundef %1) #2
  %.not = icmp eq i32 %9, 0
  br i1 %.not, label %10, label %11

10:                                               ; preds = %8, %5
  tail call void @ERR_new() #2
  tail call void @ERR_set_debug(ptr noundef nonnull @.str, i32 noundef 151, ptr noundef nonnull @__func__.ossl_ec_GFp_simple_group_set_curve) #2
  tail call void (i32, i32, ptr, ...) @ERR_set_error(i32 noundef 16, i32 noundef 103, ptr noundef null) #2
  br label %58

11:                                               ; preds = %8
  %12 = icmp eq ptr %4, null
  br i1 %12, label %13, label %18

13:                                               ; preds = %11
  %14 = getelementptr inbounds i8, ptr %0, i64 168
  %15 = load ptr, ptr %14, align 8, !tbaa !5
  %16 = tail call ptr @BN_CTX_new_ex(ptr noundef %15) #2
  %17 = icmp eq ptr %16, null
  br i1 %17, label %58, label %18

18:                                               ; preds = %13, %11
  %.042 = phi ptr [ %16, %13 ], [ %4, %11 ]
  %.040 = phi ptr [ %16, %13 ], [ null, %11 ]
  tail call void @BN_CTX_start(ptr noundef nonnull %.042) #2
  %19 = tail call ptr @BN_CTX_get(ptr noundef nonnull %.042) #2
  %20 = icmp eq ptr %19, null
  br i1 %20, label %57, label %21

21:                                               ; preds = %18
  %22 = getelementptr inbounds i8, ptr %0, i64 64
  %23 = load ptr, ptr %22, align 8, !tbaa !12
  %24 = tail call ptr @BN_copy(ptr noundef %23, ptr noundef %1) #2
  %.not48 = icmp eq ptr %24, null
  br i1 %.not48, label %57, label %25

25:                                               ; preds = %21
  %26 = load ptr, ptr %22, align 8, !tbaa !12
  tail call void @BN_set_negative(ptr noundef %26, i32 noundef 0) #2
  %27 = tail call i32 @BN_nnmod(ptr noundef nonnull %19, ptr noundef %2, ptr noundef %1, ptr noundef nonnull %.042) #2
  %.not49 = icmp eq i32 %27, 0
  br i1 %.not49, label %57, label %28

28:                                               ; preds = %25
  %29 = load ptr, ptr %0, align 8, !tbaa !13
  %30 = getelementptr inbounds i8, ptr %29, i64 280
  %31 = load ptr, ptr %30, align 8, !tbaa !14
  %.not50 = icmp eq ptr %31, null
  %32 = getelementptr inbounds i8, ptr %0, i64 96
  %33 = load ptr, ptr %32, align 8, !tbaa !16
  br i1 %.not50, label %36, label %34

34:                                               ; preds = %28
  %35 = tail call i32 %31(ptr noundef nonnull %0, ptr noundef %33, ptr noundef nonnull %19, ptr noundef nonnull %.042) #2
  %.not52 = icmp eq i32 %35, 0
  br i1 %.not52, label %57, label %38

36:                                               ; preds = %28
  %37 = tail call ptr @BN_copy(ptr noundef %33, ptr noundef nonnull %19) #2
  %.not51 = icmp eq ptr %37, null
  br i1 %.not51, label %57, label %38

38:                                               ; preds = %36, %34
  %39 = getelementptr inbounds i8, ptr %0, i64 104
  %40 = load ptr, ptr %39, align 8, !tbaa !17
  %41 = tail call i32 @BN_nnmod(ptr noundef %40, ptr noundef %3, ptr noundef %1, ptr noundef nonnull %.042) #2
  %.not53 = icmp eq i32 %41, 0
  br i1 %.not53, label %57, label %42

42:                                               ; preds = %38
  %43 = load ptr, ptr %0, align 8, !tbaa !13
  %44 = getelementptr inbounds i8, ptr %43, i64 280
  %45 = load ptr, ptr %44, align 8, !tbaa !14
  %.not54 = icmp eq ptr %45, null
  br i1 %.not54, label %49, label %46

46:                                               ; preds = %42
  %47 = load ptr, ptr %39, align 8, !tbaa !17
  %48 = tail call i32 %45(ptr noundef nonnull %0, ptr noundef %47, ptr noundef %47, ptr noundef nonnull %.042) #2
  %.not55 = icmp eq i32 %48, 0
  br i1 %.not55, label %57, label %49

49:                                               ; preds = %46, %42
  %50 = tail call i32 @BN_add_word(ptr noundef nonnull %19, i64 noundef 3) #2
  %.not56 = icmp eq i32 %50, 0
  br i1 %.not56, label %57, label %51

51:                                               ; preds = %49
  %52 = load ptr, ptr %22, align 8, !tbaa !12
  %53 = tail call i32 @BN_cmp(ptr noundef nonnull %19, ptr noundef %52) #2
  %54 = icmp eq i32 %53, 0
  %55 = zext i1 %54 to i32
  %56 = getelementptr inbounds i8, ptr %0, i64 112
  store i32 %55, ptr %56, align 8, !tbaa !18
  br label %57

57:                                               ; preds = %49, %46, %38, %36, %34, %25, %21, %18, %51
  %.041 = phi i32 [ 0, %18 ], [ 1, %51 ], [ 0, %49 ], [ 0, %46 ], [ 0, %38 ], [ 0, %34 ], [ 0, %36 ], [ 0, %25 ], [ 0, %21 ]
  tail call void @BN_CTX_end(ptr noundef nonnull %.042) #2
  tail call void @BN_CTX_free(ptr noundef %.040) #2
  br label %58

58:                                               ; preds = %13, %57, %10
  %.0 = phi i32 [ 0, %10 ], [ %.041, %57 ], [ 0, %13 ]
  ret i32 %.0
}

declare ptr @BN_copy(ptr noundef, ptr noundef) local_unnamed_addr #1

declare i32 @BN_num_bits(ptr noundef) local_unnamed_addr #1

declare i32 @BN_is_odd(ptr noundef) local_unnamed_addr #1

declare void @ERR_new() local_unnamed_addr #1

declare void @ERR_set_debug(ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #1

declare void @ERR_set_error(i32 noundef, i32 noundef, ptr noundef, ...) local_unnamed_addr #1

declare ptr @BN_CTX_new_ex(ptr noundef) local_unnamed_addr #1

declare void @BN_CTX_start(ptr noundef) local_unnamed_addr #1

declare ptr @BN_CTX_get(ptr noundef) local_unnamed_addr #1

declare void @BN_set_negative(ptr noundef, i32 noundef) local_unnamed_addr #1

declare i32 @BN_nnmod(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

declare i32 @BN_add_word(ptr noundef, i64 noundef) local_unnamed_addr #1

declare i32 @BN_cmp(ptr noundef, ptr noundef) local_unnamed_addr #1

declare void @BN_CTX_end(ptr noundef) local_unnamed_addr #1

declare void @BN_CTX_free(ptr noundef) local_unnamed_addr #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 = { "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 }

!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, !7, i64 168}
!6 = !{!"ec_group_st", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !10, i64 32, !10, i64 36, !10, i64 40, !10, i64 44, !7, i64 48, !11, i64 56, !7, i64 64, !8, i64 72, !7, i64 96, !7, i64 104, !10, i64 112, !7, i64 120, !7, i64 128, !7, i64 136, !7, i64 144, !10, i64 152, !8, i64 160, !7, i64 168, !7, i64 176}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"long", !8, i64 0}
!12 = !{!6, !7, i64 64}
!13 = !{!6, !7, i64 0}
!14 = !{!15, !7, i64 280}
!15 = !{!"ec_method_st", !10, i64 0, !10, i64 4, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48, !7, i64 56, !7, i64 64, !7, i64 72, !7, i64 80, !7, i64 88, !7, i64 96, !7, i64 104, !7, i64 112, !7, i64 120, !7, i64 128, !7, i64 136, !7, i64 144, !7, i64 152, !7, i64 160, !7, i64 168, !7, i64 176, !7, i64 184, !7, i64 192, !7, i64 200, !7, i64 208, !7, i64 216, !7, i64 224, !7, i64 232, !7, i64 240, !7, i64 248, !7, i64 256, !7, i64 264, !7, i64 272, !7, i64 280, !7, i64 288, !7, i64 296, !7, i64 304, !7, i64 312, !7, i64 320, !7, i64 328, !7, i64 336, !7, i64 344, !7, i64 352, !7, i64 360, !7, i64 368, !7, i64 376, !7, i64 384, !7, i64 392, !7, i64 400, !7, i64 408, !7, i64 416, !7, i64 424, !7, i64 432, !7, i64 440}
!16 = !{!6, !7, i64 96}
!17 = !{!6, !7, i64 104}
!18 = !{!6, !10, i64 112}


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