; LLVM IR from cryptid-org/cryptid-native :: dependencies/gmp/src (mini-gmp)

; 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.__mpz_struct = type { i32, i32, ptr }

@.str.1 = external hidden unnamed_addr constant [92 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [17 x i8], align 1
@__PRETTY_FUNCTION__.mpz_probab_prime_p = external hidden unnamed_addr constant [50 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [8 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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local void @mpz_init(ptr noundef) #2

; Function Attrs: nounwind uwtable
declare dso_local void @mpz_clear(ptr noundef) #2

; Function Attrs: nounwind uwtable
declare dso_local void @mpz_set_ui(ptr noundef, i64 noundef) #2

; Function Attrs: nounwind uwtable
declare dso_local i32 @mpz_cmp(ptr noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
declare dso_local i32 @mpz_cmpabs_ui(ptr noundef, i64 noundef) #2

; Function Attrs: nounwind uwtable
declare hidden i64 @mpz_abs_sub_ui(ptr noundef, ptr noundef, i64 noundef) #2

; Function Attrs: nounwind uwtable
declare dso_local void @mpz_tdiv_q_2exp(ptr noundef, ptr noundef, i64 noundef) #2

; Function Attrs: nounwind uwtable
declare dso_local i64 @mpz_gcd_ui(ptr noundef, ptr noundef, i64 noundef) #2

; Function Attrs: nounwind uwtable
define dso_local i32 @mpz_probab_prime_p(ptr noundef %0, i32 noundef %1) #2 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca [1 x %struct.__mpz_struct], align 16
  %7 = alloca [1 x %struct.__mpz_struct], align 16
  %8 = alloca [1 x %struct.__mpz_struct], align 16
  %9 = alloca i64, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i32 %1, ptr %5, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 16, ptr %6) #3
  call void @llvm.lifetime.start.p0(i64 16, ptr %7) #3
  call void @llvm.lifetime.start.p0(i64 16, ptr %8) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #3
  %13 = load ptr, ptr %4, align 8, !tbaa !5
  %14 = getelementptr inbounds %struct.__mpz_struct, ptr %13, i32 0, i32 1
  %15 = load i32, ptr %14, align 4, !tbaa !11
  %16 = icmp ne i32 %15, 0
  %17 = zext i1 %16 to i32
  %18 = load ptr, ptr %4, align 8, !tbaa !5
  %19 = getelementptr inbounds %struct.__mpz_struct, ptr %18, i32 0, i32 2
  %20 = load ptr, ptr %19, align 8, !tbaa !13
  %21 = getelementptr inbounds i64, ptr %20, i64 0
  %22 = load i64, ptr %21, align 8, !tbaa !14
  %23 = trunc i64 %22 to i32
  %24 = and i32 %17, %23
  %25 = icmp ne i32 %24, 0
  br i1 %25, label %32, label %26

26:                                               ; preds = %2
  %27 = load ptr, ptr %4, align 8, !tbaa !5
  %28 = call i32 @mpz_cmpabs_ui(ptr noundef %27, i64 noundef 2)
  %29 = icmp eq i32 %28, 0
  %30 = zext i1 %29 to i64
  %31 = select i1 %29, i32 2, i32 0
  store i32 %31, ptr %3, align 4
  store i32 1, ptr %12, align 4
  br label %122

32:                                               ; preds = %2
  %33 = load ptr, ptr %4, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct.__mpz_struct, ptr %33, i32 0, i32 1
  %35 = load i32, ptr %34, align 4, !tbaa !11
  %36 = icmp ne i32 %35, 0
  br i1 %36, label %37, label %38

37:                                               ; preds = %32
  br label %39

38:                                               ; preds = %32
  call void @__assert_fail(ptr noundef @.str.19, ptr noundef @.str.1, i32 noundef 3445, ptr noundef @__PRETTY_FUNCTION__.mpz_probab_prime_p) #4
  unreachable

39:                                               ; preds = %37
  %40 = load ptr, ptr %4, align 8, !tbaa !5
  %41 = call i32 @mpz_cmpabs_ui(ptr noundef %40, i64 noundef 64)
  %42 = icmp slt i32 %41, 0
  br i1 %42, label %43, label %53

43:                                               ; preds = %39
  %44 = load ptr, ptr %4, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.__mpz_struct, ptr %44, i32 0, i32 2
  %46 = load ptr, ptr %45, align 8, !tbaa !13
  %47 = getelementptr inbounds i64, ptr %46, i64 0
  %48 = load i64, ptr %47, align 8, !tbaa !14
  %49 = lshr i64 %48, 1
  %50 = lshr i64 3379140316, %49
  %51 = and i64 %50, 2
  %52 = trunc i64 %51 to i32
  store i32 %52, ptr %3, align 4
  store i32 1, ptr %12, align 4
  br label %122

53:                                               ; preds = %39
  %54 = load ptr, ptr %4, align 8, !tbaa !5
  %55 = call i64 @mpz_gcd_ui(ptr noundef null, ptr noundef %54, i64 noundef 3234846615)
  %56 = icmp ne i64 %55, 1
  br i1 %56, label %57, label %58

57:                                               ; preds = %53
  store i32 0, ptr %3, align 4
  store i32 1, ptr %12, align 4
  br label %122

58:                                               ; preds = %53
  %59 = load ptr, ptr %4, align 8, !tbaa !5
  %60 = call i32 @mpz_cmpabs_ui(ptr noundef %59, i64 noundef 961)
  %61 = icmp slt i32 %60, 0
  br i1 %61, label %62, label %63

62:                                               ; preds = %58
  store i32 2, ptr %3, align 4
  store i32 1, ptr %12, align 4
  br label %122

63:                                               ; preds = %58
  %64 = getelementptr inbounds [1 x %struct.__mpz_struct], ptr %6, i64 0, i64 0
  call void @mpz_init(ptr noundef %64)
  %65 = getelementptr inbounds [1 x %struct.__mpz_struct], ptr %7, i64 0, i64 0
  call void @mpz_init(ptr noundef %65)
  %66 = getelementptr inbounds [1 x %struct.__mpz_struct], ptr %8, i64 0, i64 0
  call void @mpz_init(ptr noundef %66)
  %67 = getelementptr inbounds [1 x %struct.__mpz_struct], ptr %6, i64 0, i64 0
  %68 = load ptr, ptr %4, align 8, !tbaa !5
  %69 = call i64 @mpz_abs_sub_ui(ptr noundef %67, ptr noundef %68, i64 noundef 1)
  %70 = trunc i64 %69 to i32
  %71 = getelementptr inbounds [1 x %struct.__mpz_struct], ptr %6, i64 0, i64 0
  %72 = getelementptr inbounds %struct.__mpz_struct, ptr %71, i32 0, i32 1
  store i32 %70, ptr %72, align 4, !tbaa !11
  %73 = getelementptr inbounds [1 x %struct.__mpz_struct], ptr %6, i64 0, i64 0
  %74 = call i64 @mpz_scan1(ptr noundef %73, i64 noundef 0)
  store i64 %74, ptr %9, align 8, !tbaa !14
  %75 = getelementptr inbounds [1 x %struct.__mpz_struct], ptr %7, i64 0, i64 0
  %76 = getelementptr inbounds [1 x %struct.__mpz_struct], ptr %6, i64 0, i64 0
  %77 = load i64, ptr %9, align 8, !tbaa !14
  call void @mpz_tdiv_q_2exp(ptr noundef %75, ptr noundef %76, i64 noundef %77)
  store i32 0, ptr %11, align 4, !tbaa !9
  store i32 1, ptr %10, align 4, !tbaa !9
  br label %78

78:                                               ; preds = %114, %63
  %79 = load i32, ptr %10, align 4, !tbaa !9
  %80 = load i32, ptr %11, align 4, !tbaa !9
  %81 = load i32, ptr %5, align 4, !tbaa !9
  %82 = icmp slt i32 %80, %81
  %83 = zext i1 %82 to i32
  %84 = and i32 %79, %83
  %85 = icmp ne i32 %84, 0
  br i1 %85, label %86, label %117

86:                                               ; preds = %78
  %87 = getelementptr inbounds [1 x %struct.__mpz_struct], ptr %8, i64 0, i64 0
  %88 = load i32, ptr %11, align 4, !tbaa !9
  %89 = sext i32 %88 to i64
  %90 = load i32, ptr %11, align 4, !tbaa !9
  %91 = sext i32 %90 to i64
  %92 = mul i64 %89, %91
  %93 = load i32, ptr %11, align 4, !tbaa !9
  %94 = sext i32 %93 to i64
  %95 = add i64 %92, %94
  %96 = add i64 %95, 41
  call void @mpz_set_ui(ptr noundef %87, i64 noundef %96)
  %97 = getelementptr inbounds [1 x %struct.__mpz_struct], ptr %8, i64 0, i64 0
  %98 = getelementptr inbounds [1 x %struct.__mpz_struct], ptr %6, i64 0, i64 0
  %99 = call i32 @mpz_cmp(ptr noundef %97, ptr noundef %98)
  %100 = icmp sge i32 %99, 0
  br i1 %100, label %101, label %107

101:                                              ; preds = %86
  %102 = load i32, ptr %11, align 4, !tbaa !9
  %103 = icmp sge i32 %102, 30
  br i1 %103, label %104, label %105

104:                                              ; preds = %101
  br label %106

105:                                              ; preds = %101
  call void @__assert_fail(ptr noundef @.str.20, ptr noundef @.str.1, i32 noundef 3478, ptr noundef @__PRETTY_FUNCTION__.mpz_probab_prime_p) #4
  unreachable

106:                                              ; preds = %104
  br label %117

107:                                              ; preds = %86
  %108 = load ptr, ptr %4, align 8, !tbaa !5
  %109 = getelementptr inbounds [1 x %struct.__mpz_struct], ptr %6, i64 0, i64 0
  %110 = getelementptr inbounds [1 x %struct.__mpz_struct], ptr %8, i64 0, i64 0
  %111 = getelementptr inbounds [1 x %struct.__mpz_struct], ptr %7, i64 0, i64 0
  %112 = load i64, ptr %9, align 8, !tbaa !14
  %113 = call i32 @gmp_millerrabin(ptr noundef %108, ptr noundef %109, ptr noundef %110, ptr noundef %111, i64 noundef %112)
  store i32 %113, ptr %10, align 4, !tbaa !9
  br label %114

114:                                              ; preds = %107
  %115 = load i32, ptr %11, align 4, !tbaa !9
  %116 = add nsw i32 %115, 1
  store i32 %116, ptr %11, align 4, !tbaa !9
  br label %78, !llvm.loop !16

117:                                              ; preds = %106, %78
  %118 = getelementptr inbounds [1 x %struct.__mpz_struct], ptr %6, i64 0, i64 0
  call void @mpz_clear(ptr noundef %118)
  %119 = getelementptr inbounds [1 x %struct.__mpz_struct], ptr %7, i64 0, i64 0
  call void @mpz_clear(ptr noundef %119)
  %120 = getelementptr inbounds [1 x %struct.__mpz_struct], ptr %8, i64 0, i64 0
  call void @mpz_clear(ptr noundef %120)
  %121 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %121, ptr %3, align 4
  store i32 1, ptr %12, align 4
  br label %122

122:                                              ; preds = %117, %62, %57, %43, %26
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr %7) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr %6) #3
  %123 = load i32, ptr %3, align 4
  ret i32 %123
}

; Function Attrs: nounwind uwtable
declare dso_local i64 @mpz_scan1(ptr noundef, i64 noundef) #2

; Function Attrs: nounwind uwtable
declare hidden i32 @gmp_millerrabin(ptr noundef, ptr noundef, ptr noundef, ptr noundef, i64 noundef) #2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { noreturn 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 = { nounwind }
attributes #4 = { noreturn 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, !10, i64 4}
!12 = !{!"", !10, i64 0, !10, i64 4, !6, i64 8}
!13 = !{!12, !6, i64 8}
!14 = !{!15, !15, i64 0}
!15 = !{!"long", !7, i64 0}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}


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

%struct.__mpz_struct = type { i32, i32, ptr }

@.str.1 = external hidden unnamed_addr constant [92 x i8], align 1
@__PRETTY_FUNCTION__.mpz_probab_prime_p = external hidden unnamed_addr constant [50 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [8 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: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local void @mpz_init(ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare dso_local void @mpz_clear(ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare dso_local void @mpz_set_ui(ptr noundef, i64 noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare dso_local i32 @mpz_cmp(ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare dso_local i32 @mpz_cmpabs_ui(ptr noundef, i64 noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare hidden i64 @mpz_abs_sub_ui(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare dso_local void @mpz_tdiv_q_2exp(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare dso_local i64 @mpz_gcd_ui(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
define dso_local i32 @mpz_probab_prime_p(ptr noundef %0, i32 noundef %1) local_unnamed_addr #2 {
  %3 = alloca [1 x %struct.__mpz_struct], align 16
  %4 = alloca [1 x %struct.__mpz_struct], align 16
  %5 = alloca [1 x %struct.__mpz_struct], align 16
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #3
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #3
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #3
  %6 = getelementptr inbounds i8, ptr %0, i64 4
  %7 = load i32, ptr %6, align 4, !tbaa !5
  %.not = icmp eq i32 %7, 0
  %8 = getelementptr inbounds i8, ptr %0, i64 8
  %9 = load ptr, ptr %8, align 8, !tbaa !11
  %10 = load i64, ptr %9, align 8, !tbaa !12
  %11 = and i64 %10, 1
  %.not2324 = icmp eq i64 %11, 0
  %.not23 = select i1 %.not, i1 true, i1 %.not2324
  br i1 %.not23, label %12, label %16

12:                                               ; preds = %2
  %13 = tail call i32 @mpz_cmpabs_ui(ptr noundef nonnull %0, i64 noundef 2)
  %14 = icmp eq i32 %13, 0
  %15 = select i1 %14, i32 2, i32 0
  br label %52

16:                                               ; preds = %2
  %17 = tail call i32 @mpz_cmpabs_ui(ptr noundef nonnull %0, i64 noundef 64)
  %18 = icmp slt i32 %17, 0
  br i1 %18, label %19, label %26

19:                                               ; preds = %16
  %20 = load ptr, ptr %8, align 8, !tbaa !11
  %21 = load i64, ptr %20, align 8, !tbaa !12
  %22 = lshr i64 %21, 1
  %23 = lshr i64 3379140316, %22
  %24 = trunc nuw i64 %23 to i32
  %25 = and i32 %24, 2
  br label %52

26:                                               ; preds = %16
  %27 = tail call i64 @mpz_gcd_ui(ptr noundef null, ptr noundef nonnull %0, i64 noundef 3234846615)
  %.not25 = icmp eq i64 %27, 1
  br i1 %.not25, label %28, label %52

28:                                               ; preds = %26
  %29 = tail call i32 @mpz_cmpabs_ui(ptr noundef nonnull %0, i64 noundef 961)
  %30 = icmp slt i32 %29, 0
  br i1 %30, label %52, label %31

31:                                               ; preds = %28
  call void @mpz_init(ptr noundef nonnull %3)
  call void @mpz_init(ptr noundef nonnull %4)
  call void @mpz_init(ptr noundef nonnull %5)
  %32 = call i64 @mpz_abs_sub_ui(ptr noundef nonnull %3, ptr noundef nonnull %0, i64 noundef 1)
  %33 = trunc i64 %32 to i32
  %34 = getelementptr inbounds i8, ptr %3, i64 4
  store i32 %33, ptr %34, align 4, !tbaa !5
  %35 = call i64 @mpz_scan1(ptr noundef nonnull %3, i64 noundef 0)
  call void @mpz_tdiv_q_2exp(ptr noundef nonnull %4, ptr noundef nonnull %3, i64 noundef %35)
  %36 = icmp slt i32 %1, 1
  br i1 %36, label %.loopexit, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %31
  %37 = zext nneg i32 %1 to i64
  call void @mpz_set_ui(ptr noundef nonnull %5, i64 noundef 41)
  %38 = call i32 @mpz_cmp(ptr noundef nonnull %5, ptr noundef nonnull %3)
  %39 = icmp sgt i32 %38, -1
  br i1 %39, label %46, label %.lr.ph40

.lr.ph:                                           ; preds = %.lr.ph40
  %40 = add nuw nsw i64 %48, 1
  %41 = mul nuw nsw i64 %40, %48
  %42 = add nuw nsw i64 %41, 41
  call void @mpz_set_ui(ptr noundef nonnull %5, i64 noundef %42)
  %43 = call i32 @mpz_cmp(ptr noundef nonnull %5, ptr noundef nonnull %3)
  %44 = icmp sgt i32 %43, -1
  br i1 %44, label %.lr.ph._crit_edge, label %.lr.ph40, !llvm.loop !14

.lr.ph._crit_edge:                                ; preds = %.lr.ph
  %45 = icmp ugt i64 %48, 29
  br label %46

46:                                               ; preds = %.lr.ph._crit_edge, %.lr.ph.preheader
  %indvars.iv.lcssa = phi i1 [ %45, %.lr.ph._crit_edge ], [ false, %.lr.ph.preheader ]
  %.02131.lcssa = phi i32 [ %49, %.lr.ph._crit_edge ], [ 1, %.lr.ph.preheader ]
  br i1 %indvars.iv.lcssa, label %.loopexit, label %47

47:                                               ; preds = %46
  call void @__assert_fail(ptr noundef nonnull @.str.20, ptr noundef nonnull @.str.1, i32 noundef 3478, ptr noundef nonnull @__PRETTY_FUNCTION__.mpz_probab_prime_p) #4
  unreachable

.lr.ph40:                                         ; preds = %.lr.ph.preheader, %.lr.ph
  %48 = phi i64 [ %40, %.lr.ph ], [ 1, %.lr.ph.preheader ]
  %49 = call i32 @gmp_millerrabin(ptr noundef %0, ptr noundef nonnull %3, ptr noundef nonnull %5, ptr noundef nonnull %4, i64 noundef %35)
  %50 = icmp uge i64 %48, %37
  %51 = and i32 %49, 1
  %.not2627 = icmp eq i32 %51, 0
  %.not26 = select i1 %50, i1 true, i1 %.not2627
  br i1 %.not26, label %.loopexit, label %.lr.ph, !llvm.loop !14

.loopexit:                                        ; preds = %.lr.ph40, %31, %46
  %.02130 = phi i32 [ %.02131.lcssa, %46 ], [ 1, %31 ], [ %49, %.lr.ph40 ]
  call void @mpz_clear(ptr noundef nonnull %3)
  call void @mpz_clear(ptr noundef nonnull %4)
  call void @mpz_clear(ptr noundef nonnull %5)
  br label %52

52:                                               ; preds = %28, %26, %.loopexit, %19, %12
  %.022 = phi i32 [ %25, %19 ], [ %.02130, %.loopexit ], [ %15, %12 ], [ 0, %26 ], [ 2, %28 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #3
  ret i32 %.022
}

; Function Attrs: nounwind uwtable
declare dso_local i64 @mpz_scan1(ptr noundef, i64 noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare hidden i32 @gmp_millerrabin(ptr noundef, ptr noundef, ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { noreturn 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 = { nounwind }
attributes #4 = { noreturn 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 4}
!6 = !{!"", !7, i64 0, !7, i64 4, !10, i64 8}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!6, !10, i64 8}
!12 = !{!13, !13, i64 0}
!13 = !{!"long", !8, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}


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