; LLVM IR from openssl/openssl :: test (bntest)

; 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.17 = external hidden unnamed_addr constant [63 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [19 x i8], align 1
@ctx = external hidden global ptr, align 8
@.str.19 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.33 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.34 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.35 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.36 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.37 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.38 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.39 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.40 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.41 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.42 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.43 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.44 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.45 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.46 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.47 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.48 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.49 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.50 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.51 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.52 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.53 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.54 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.55 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.56 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.57 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.58 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.59 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.60 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.61 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.62 = external hidden unnamed_addr constant [15 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @setup_tests() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #3
  store i32 0, ptr %4, align 4, !tbaa !5
  br label %6

6:                                                ; preds = %15, %0
  %7 = call i32 @opt_next()
  store i32 %7, ptr %2, align 4, !tbaa !5
  %8 = icmp ne i32 %7, 0
  br i1 %8, label %9, label %16

9:                                                ; preds = %6
  %10 = load i32, ptr %2, align 4, !tbaa !5
  switch i32 %10, label %13 [
    i32 1, label %11
    i32 500, label %12
    i32 501, label %12
    i32 502, label %12
    i32 503, label %12
    i32 504, label %12
    i32 505, label %12
    i32 -1, label %14
  ]

11:                                               ; preds = %9
  store i32 1, ptr %4, align 4, !tbaa !5
  br label %15

12:                                               ; preds = %9, %9, %9, %9, %9, %9
  br label %15

13:                                               ; preds = %9
  br label %14

14:                                               ; preds = %13, %9
  store i32 0, ptr %1, align 4
  store i32 1, ptr %5, align 4
  br label %34

15:                                               ; preds = %12, %11
  br label %6, !llvm.loop !9

16:                                               ; preds = %6
  %17 = call i64 @test_get_argument_count()
  %18 = trunc i64 %17 to i32
  store i32 %18, ptr %3, align 4, !tbaa !5
  %19 = call ptr @BN_CTX_new()
  store ptr %19, ptr @ctx, align 8, !tbaa !11
  %20 = call i32 @test_ptr(ptr noundef @.str.17, i32 noundef 3377, ptr noundef @.str.18, ptr noundef %19)
  %21 = icmp ne i32 %20, 0
  br i1 %21, label %23, label %22

22:                                               ; preds = %16
  store i32 0, ptr %1, align 4
  store i32 1, ptr %5, align 4
  br label %34

23:                                               ; preds = %16
  %24 = load i32, ptr %3, align 4, !tbaa !5
  %25 = icmp eq i32 %24, 0
  br i1 %25, label %26, label %31

26:                                               ; preds = %23
  call void @add_test(ptr noundef @.str.19, ptr noundef @test_sub)
  call void @add_test(ptr noundef @.str.20, ptr noundef @test_div_recip)
  call void @add_all_tests(ptr noundef @.str.21, ptr noundef @test_signed_mod_replace_ab, i32 noundef 4, i32 noundef 1)
  call void @add_all_tests(ptr noundef @.str.22, ptr noundef @test_signed_mod_replace_ba, i32 noundef 4, i32 noundef 1)
  call void @add_test(ptr noundef @.str.23, ptr noundef @test_mod)
  call void @add_test(ptr noundef @.str.24, ptr noundef @test_mod_inverse)
  call void @add_all_tests(ptr noundef @.str.25, ptr noundef @test_mod_exp_alias, i32 noundef 2, i32 noundef 1)
  call void @add_test(ptr noundef @.str.26, ptr noundef @test_modexp_mont5)
  call void @add_test(ptr noundef @.str.27, ptr noundef @test_kronecker)
  call void @add_test(ptr noundef @.str.28, ptr noundef @test_rand)
  call void @add_test(ptr noundef @.str.29, ptr noundef @test_bn2padded)
  call void @add_test(ptr noundef @.str.30, ptr noundef @test_dec2bn)
  call void @add_test(ptr noundef @.str.31, ptr noundef @test_hex2bn)
  call void @add_test(ptr noundef @.str.32, ptr noundef @test_asc2bn)
  call void @add_test(ptr noundef @.str.33, ptr noundef @test_bin2zero)
  call void @add_test(ptr noundef @.str.34, ptr noundef @test_bin2bn_lengths)
  call void @add_all_tests(ptr noundef @.str.35, ptr noundef @test_mpi, i32 noundef 6, i32 noundef 1)
  call void @add_all_tests(ptr noundef @.str.36, ptr noundef @test_bn2signed, i32 noundef 43, i32 noundef 1)
  call void @add_test(ptr noundef @.str.37, ptr noundef @test_negzero)
  call void @add_test(ptr noundef @.str.38, ptr noundef @test_badmod)
  call void @add_test(ptr noundef @.str.39, ptr noundef @test_expmodzero)
  call void @add_test(ptr noundef @.str.40, ptr noundef @test_expmodone)
  call void @add_all_tests(ptr noundef @.str.41, ptr noundef @test_smallprime, i32 noundef 16, i32 noundef 1)
  call void @add_all_tests(ptr noundef @.str.42, ptr noundef @test_smallsafeprime, i32 noundef 16, i32 noundef 1)
  call void @add_test(ptr noundef @.str.43, ptr noundef @test_swap)
  call void @add_test(ptr noundef @.str.44, ptr noundef @test_ctx_consttime_flag)
  call void @add_test(ptr noundef @.str.45, ptr noundef @test_gf2m_add)
  call void @add_test(ptr noundef @.str.46, ptr noundef @test_gf2m_mod)
  call void @add_test(ptr noundef @.str.47, ptr noundef @test_gf2m_mul)
  call void @add_test(ptr noundef @.str.48, ptr noundef @test_gf2m_sqr)
  call void @add_test(ptr noundef @.str.49, ptr noundef @test_gf2m_modinv)
  call void @add_test(ptr noundef @.str.50, ptr noundef @test_gf2m_moddiv)
  call void @add_test(ptr noundef @.str.51, ptr noundef @test_gf2m_modexp)
  call void @add_test(ptr noundef @.str.52, ptr noundef @test_gf2m_modsqrt)
  call void @add_test(ptr noundef @.str.53, ptr noundef @test_gf2m_modsolvequad)
  call void @add_all_tests(ptr noundef @.str.54, ptr noundef @test_is_prime, i32 noundef 5, i32 noundef 1)
  call void @add_all_tests(ptr noundef @.str.55, ptr noundef @test_not_prime, i32 noundef 4, i32 noundef 1)
  call void @add_test(ptr noundef @.str.56, ptr noundef @test_gcd_prime)
  call void @add_test(ptr noundef @.str.57, ptr noundef @test_coprime)
  call void @add_all_tests(ptr noundef @.str.58, ptr noundef @test_mod_exp, i32 noundef 16, i32 noundef 1)
  call void @add_all_tests(ptr noundef @.str.59, ptr noundef @test_mod_exp_consttime, i32 noundef 16, i32 noundef 1)
  call void @add_test(ptr noundef @.str.60, ptr noundef @test_mod_exp2_mont)
  %27 = load i32, ptr %4, align 4, !tbaa !5
  %28 = icmp ne i32 %27, 0
  br i1 %28, label %29, label %30

29:                                               ; preds = %26
  call void @add_test(ptr noundef @.str.61, ptr noundef @test_rand_range)
  br label %30

30:                                               ; preds = %29, %26
  br label %33

31:                                               ; preds = %23
  %32 = load i32, ptr %3, align 4, !tbaa !5
  call void @add_all_tests(ptr noundef @.str.62, ptr noundef @run_file_tests, i32 noundef %32, i32 noundef 1)
  br label %33

33:                                               ; preds = %31, %30
  store i32 1, ptr %1, align 4
  store i32 1, ptr %5, align 4
  br label %34

34:                                               ; preds = %33, %22, %14
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #3
  %35 = load i32, ptr %1, align 4
  ret i32 %35
}

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

declare i32 @opt_next() #2

declare i64 @test_get_argument_count() #2

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

declare ptr @BN_CTX_new() #2

declare void @add_test(ptr noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
declare hidden i32 @test_sub() #0

; Function Attrs: nounwind uwtable
declare hidden i32 @test_div_recip() #0

declare void @add_all_tests(ptr noundef, ptr noundef, i32 noundef, i32 noundef) #2

; Function Attrs: nounwind uwtable
declare hidden i32 @test_signed_mod_replace_ab(i32 noundef) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @test_signed_mod_replace_ba(i32 noundef) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @test_mod() #0

; Function Attrs: nounwind uwtable
declare hidden i32 @test_mod_inverse() #0

; Function Attrs: nounwind uwtable
declare hidden i32 @test_mod_exp_alias(i32 noundef) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @test_modexp_mont5() #0

; Function Attrs: nounwind uwtable
declare hidden i32 @test_kronecker() #0

; Function Attrs: nounwind uwtable
declare hidden i32 @test_rand() #0

; Function Attrs: nounwind uwtable
declare hidden i32 @test_bn2padded() #0

; Function Attrs: nounwind uwtable
declare hidden i32 @test_dec2bn() #0

; Function Attrs: nounwind uwtable
declare hidden i32 @test_hex2bn() #0

; Function Attrs: nounwind uwtable
declare hidden i32 @test_asc2bn() #0

; Function Attrs: nounwind uwtable
declare hidden i32 @test_bin2zero() #0

; Function Attrs: nounwind uwtable
declare hidden i32 @test_bin2bn_lengths() #0

; Function Attrs: nounwind uwtable
declare hidden i32 @test_mpi(i32 noundef) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @test_bn2signed(i32 noundef) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @test_negzero() #0

; Function Attrs: nounwind uwtable
declare hidden i32 @test_badmod() #0

; Function Attrs: nounwind uwtable
declare hidden i32 @test_expmodzero() #0

; Function Attrs: nounwind uwtable
declare hidden i32 @test_expmodone() #0

; Function Attrs: nounwind uwtable
declare hidden i32 @test_smallprime(i32 noundef) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @test_smallsafeprime(i32 noundef) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @test_swap() #0

; Function Attrs: nounwind uwtable
declare hidden i32 @test_ctx_consttime_flag() #0

; Function Attrs: nounwind uwtable
declare hidden i32 @test_gf2m_add() #0

; Function Attrs: nounwind uwtable
declare hidden i32 @test_gf2m_mod() #0

; Function Attrs: nounwind uwtable
declare hidden i32 @test_gf2m_mul() #0

; Function Attrs: nounwind uwtable
declare hidden i32 @test_gf2m_sqr() #0

; Function Attrs: nounwind uwtable
declare hidden i32 @test_gf2m_modinv() #0

; Function Attrs: nounwind uwtable
declare hidden i32 @test_gf2m_moddiv() #0

; Function Attrs: nounwind uwtable
declare hidden i32 @test_gf2m_modexp() #0

; Function Attrs: nounwind uwtable
declare hidden i32 @test_gf2m_modsqrt() #0

; Function Attrs: nounwind uwtable
declare hidden i32 @test_gf2m_modsolvequad() #0

; Function Attrs: nounwind uwtable
declare hidden i32 @test_is_prime(i32 noundef) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @test_not_prime(i32 noundef) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @test_gcd_prime() #0

; Function Attrs: nounwind uwtable
declare hidden i32 @test_coprime() #0

; Function Attrs: nounwind uwtable
declare hidden i32 @test_mod_exp(i32 noundef) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @test_mod_exp_consttime(i32 noundef) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @test_mod_exp2_mont() #0

; Function Attrs: nounwind uwtable
declare hidden i32 @test_rand_range() #0

; Function Attrs: nounwind uwtable
declare hidden i32 @run_file_tests(i32 noundef) #0

; 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!12, !12, i64 0}
!12 = !{!"any pointer", !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.17 = external hidden unnamed_addr constant [63 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [19 x i8], align 1
@ctx = external hidden local_unnamed_addr global ptr, align 8
@.str.19 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.33 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.34 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.35 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.36 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.37 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.38 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.39 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.40 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.41 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.42 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.43 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.44 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.45 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.46 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.47 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.48 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.49 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.50 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.51 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.52 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.53 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.54 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.55 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.56 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.57 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.58 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.59 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.60 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.61 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.62 = external hidden unnamed_addr constant [15 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local range(i32 0, 2) i32 @setup_tests() local_unnamed_addr #0 {
  br label %.outer

.outer:                                           ; preds = %1, %0
  %.not9 = phi i1 [ true, %0 ], [ false, %1 ]
  br label %1

1:                                                ; preds = %.backedge, %.outer
  %2 = tail call i32 @opt_next() #2
  switch i32 %2, label %.loopexit [
    i32 0, label %3
    i32 1, label %.outer
    i32 500, label %.backedge
    i32 501, label %.backedge
    i32 502, label %.backedge
    i32 503, label %.backedge
    i32 504, label %.backedge
    i32 505, label %.backedge
  ], !llvm.loop !5

.backedge:                                        ; preds = %1, %1, %1, %1, %1, %1
  br label %1, !llvm.loop !5

3:                                                ; preds = %1
  %4 = tail call i64 @test_get_argument_count() #2
  %5 = trunc i64 %4 to i32
  %6 = tail call ptr @BN_CTX_new() #2
  store ptr %6, ptr @ctx, align 8, !tbaa !7
  %7 = tail call i32 @test_ptr(ptr noundef nonnull @.str.17, i32 noundef 3377, ptr noundef nonnull @.str.18, ptr noundef %6) #2
  %.not8 = icmp eq i32 %7, 0
  br i1 %.not8, label %.loopexit, label %8

8:                                                ; preds = %3
  %9 = icmp eq i32 %5, 0
  br i1 %9, label %10, label %12

10:                                               ; preds = %8
  tail call void @add_test(ptr noundef nonnull @.str.19, ptr noundef nonnull @test_sub) #2
  tail call void @add_test(ptr noundef nonnull @.str.20, ptr noundef nonnull @test_div_recip) #2
  tail call void @add_all_tests(ptr noundef nonnull @.str.21, ptr noundef nonnull @test_signed_mod_replace_ab, i32 noundef 4, i32 noundef 1) #2
  tail call void @add_all_tests(ptr noundef nonnull @.str.22, ptr noundef nonnull @test_signed_mod_replace_ba, i32 noundef 4, i32 noundef 1) #2
  tail call void @add_test(ptr noundef nonnull @.str.23, ptr noundef nonnull @test_mod) #2
  tail call void @add_test(ptr noundef nonnull @.str.24, ptr noundef nonnull @test_mod_inverse) #2
  tail call void @add_all_tests(ptr noundef nonnull @.str.25, ptr noundef nonnull @test_mod_exp_alias, i32 noundef 2, i32 noundef 1) #2
  tail call void @add_test(ptr noundef nonnull @.str.26, ptr noundef nonnull @test_modexp_mont5) #2
  tail call void @add_test(ptr noundef nonnull @.str.27, ptr noundef nonnull @test_kronecker) #2
  tail call void @add_test(ptr noundef nonnull @.str.28, ptr noundef nonnull @test_rand) #2
  tail call void @add_test(ptr noundef nonnull @.str.29, ptr noundef nonnull @test_bn2padded) #2
  tail call void @add_test(ptr noundef nonnull @.str.30, ptr noundef nonnull @test_dec2bn) #2
  tail call void @add_test(ptr noundef nonnull @.str.31, ptr noundef nonnull @test_hex2bn) #2
  tail call void @add_test(ptr noundef nonnull @.str.32, ptr noundef nonnull @test_asc2bn) #2
  tail call void @add_test(ptr noundef nonnull @.str.33, ptr noundef nonnull @test_bin2zero) #2
  tail call void @add_test(ptr noundef nonnull @.str.34, ptr noundef nonnull @test_bin2bn_lengths) #2
  tail call void @add_all_tests(ptr noundef nonnull @.str.35, ptr noundef nonnull @test_mpi, i32 noundef 6, i32 noundef 1) #2
  tail call void @add_all_tests(ptr noundef nonnull @.str.36, ptr noundef nonnull @test_bn2signed, i32 noundef 43, i32 noundef 1) #2
  tail call void @add_test(ptr noundef nonnull @.str.37, ptr noundef nonnull @test_negzero) #2
  tail call void @add_test(ptr noundef nonnull @.str.38, ptr noundef nonnull @test_badmod) #2
  tail call void @add_test(ptr noundef nonnull @.str.39, ptr noundef nonnull @test_expmodzero) #2
  tail call void @add_test(ptr noundef nonnull @.str.40, ptr noundef nonnull @test_expmodone) #2
  tail call void @add_all_tests(ptr noundef nonnull @.str.41, ptr noundef nonnull @test_smallprime, i32 noundef 16, i32 noundef 1) #2
  tail call void @add_all_tests(ptr noundef nonnull @.str.42, ptr noundef nonnull @test_smallsafeprime, i32 noundef 16, i32 noundef 1) #2
  tail call void @add_test(ptr noundef nonnull @.str.43, ptr noundef nonnull @test_swap) #2
  tail call void @add_test(ptr noundef nonnull @.str.44, ptr noundef nonnull @test_ctx_consttime_flag) #2
  tail call void @add_test(ptr noundef nonnull @.str.45, ptr noundef nonnull @test_gf2m_add) #2
  tail call void @add_test(ptr noundef nonnull @.str.46, ptr noundef nonnull @test_gf2m_mod) #2
  tail call void @add_test(ptr noundef nonnull @.str.47, ptr noundef nonnull @test_gf2m_mul) #2
  tail call void @add_test(ptr noundef nonnull @.str.48, ptr noundef nonnull @test_gf2m_sqr) #2
  tail call void @add_test(ptr noundef nonnull @.str.49, ptr noundef nonnull @test_gf2m_modinv) #2
  tail call void @add_test(ptr noundef nonnull @.str.50, ptr noundef nonnull @test_gf2m_moddiv) #2
  tail call void @add_test(ptr noundef nonnull @.str.51, ptr noundef nonnull @test_gf2m_modexp) #2
  tail call void @add_test(ptr noundef nonnull @.str.52, ptr noundef nonnull @test_gf2m_modsqrt) #2
  tail call void @add_test(ptr noundef nonnull @.str.53, ptr noundef nonnull @test_gf2m_modsolvequad) #2
  tail call void @add_all_tests(ptr noundef nonnull @.str.54, ptr noundef nonnull @test_is_prime, i32 noundef 5, i32 noundef 1) #2
  tail call void @add_all_tests(ptr noundef nonnull @.str.55, ptr noundef nonnull @test_not_prime, i32 noundef 4, i32 noundef 1) #2
  tail call void @add_test(ptr noundef nonnull @.str.56, ptr noundef nonnull @test_gcd_prime) #2
  tail call void @add_test(ptr noundef nonnull @.str.57, ptr noundef nonnull @test_coprime) #2
  tail call void @add_all_tests(ptr noundef nonnull @.str.58, ptr noundef nonnull @test_mod_exp, i32 noundef 16, i32 noundef 1) #2
  tail call void @add_all_tests(ptr noundef nonnull @.str.59, ptr noundef nonnull @test_mod_exp_consttime, i32 noundef 16, i32 noundef 1) #2
  tail call void @add_test(ptr noundef nonnull @.str.60, ptr noundef nonnull @test_mod_exp2_mont) #2
  br i1 %.not9, label %.loopexit, label %11

11:                                               ; preds = %10
  tail call void @add_test(ptr noundef nonnull @.str.61, ptr noundef nonnull @test_rand_range) #2
  br label %.loopexit

12:                                               ; preds = %8
  tail call void @add_all_tests(ptr noundef nonnull @.str.62, ptr noundef nonnull @run_file_tests, i32 noundef %5, i32 noundef 1) #2
  br label %.loopexit

.loopexit:                                        ; preds = %1, %12, %11, %10, %3
  %.05 = phi i32 [ 0, %3 ], [ 1, %10 ], [ 1, %11 ], [ 1, %12 ], [ 0, %1 ]
  ret i32 %.05
}

declare i32 @opt_next() local_unnamed_addr #1

declare i64 @test_get_argument_count() local_unnamed_addr #1

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

declare ptr @BN_CTX_new() local_unnamed_addr #1

declare void @add_test(ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare hidden i32 @test_sub() #0

; Function Attrs: nounwind uwtable
declare hidden i32 @test_div_recip() #0

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

; Function Attrs: nounwind uwtable
declare hidden i32 @test_signed_mod_replace_ab(i32 noundef) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @test_signed_mod_replace_ba(i32 noundef) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @test_mod() #0

; Function Attrs: nounwind uwtable
declare hidden i32 @test_mod_inverse() #0

; Function Attrs: nounwind uwtable
declare hidden i32 @test_mod_exp_alias(i32 noundef) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @test_modexp_mont5() #0

; Function Attrs: nounwind uwtable
declare hidden i32 @test_kronecker() #0

; Function Attrs: nounwind uwtable
declare hidden i32 @test_rand() #0

; Function Attrs: nounwind uwtable
declare hidden i32 @test_bn2padded() #0

; Function Attrs: nounwind uwtable
declare hidden i32 @test_dec2bn() #0

; Function Attrs: nounwind uwtable
declare hidden i32 @test_hex2bn() #0

; Function Attrs: nounwind uwtable
declare hidden i32 @test_asc2bn() #0

; Function Attrs: nounwind uwtable
declare hidden i32 @test_bin2zero() #0

; Function Attrs: nounwind uwtable
declare hidden i32 @test_bin2bn_lengths() #0

; Function Attrs: nounwind uwtable
declare hidden i32 @test_mpi(i32 noundef) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @test_bn2signed(i32 noundef) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @test_negzero() #0

; Function Attrs: nounwind uwtable
declare hidden i32 @test_badmod() #0

; Function Attrs: nounwind uwtable
declare hidden i32 @test_expmodzero() #0

; Function Attrs: nounwind uwtable
declare hidden i32 @test_expmodone() #0

; Function Attrs: nounwind uwtable
declare hidden i32 @test_smallprime(i32 noundef) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @test_smallsafeprime(i32 noundef) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @test_swap() #0

; Function Attrs: nounwind uwtable
declare hidden i32 @test_ctx_consttime_flag() #0

; Function Attrs: nounwind uwtable
declare hidden i32 @test_gf2m_add() #0

; Function Attrs: nounwind uwtable
declare hidden i32 @test_gf2m_mod() #0

; Function Attrs: nounwind uwtable
declare hidden i32 @test_gf2m_mul() #0

; Function Attrs: nounwind uwtable
declare hidden i32 @test_gf2m_sqr() #0

; Function Attrs: nounwind uwtable
declare hidden i32 @test_gf2m_modinv() #0

; Function Attrs: nounwind uwtable
declare hidden i32 @test_gf2m_moddiv() #0

; Function Attrs: nounwind uwtable
declare hidden i32 @test_gf2m_modexp() #0

; Function Attrs: nounwind uwtable
declare hidden i32 @test_gf2m_modsqrt() #0

; Function Attrs: nounwind uwtable
declare hidden i32 @test_gf2m_modsolvequad() #0

; Function Attrs: nounwind uwtable
declare hidden i32 @test_is_prime(i32 noundef) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @test_not_prime(i32 noundef) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @test_gcd_prime() #0

; Function Attrs: nounwind uwtable
declare hidden i32 @test_coprime() #0

; Function Attrs: nounwind uwtable
declare hidden i32 @test_mod_exp(i32 noundef) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @test_mod_exp_consttime(i32 noundef) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @test_mod_exp2_mont() #0

; Function Attrs: nounwind uwtable
declare hidden i32 @test_rand_range() #0

; Function Attrs: nounwind uwtable
declare hidden i32 @run_file_tests(i32 noundef) #0

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 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}
!7 = !{!8, !8, i64 0}
!8 = !{!"any pointer", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C/C++ TBAA"}


; Effective O3 passes: GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass