; LLVM IR from trustwallet/wallet-core :: trezor-crypto/crypto/ed25519-donna (curve25519-donna-32bit)

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

; 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: nounwind uwtable
declare dso_local void @curve25519_mul(ptr noundef, ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local void @curve25519_square(ptr noundef, ptr noundef) #1

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #2

; Function Attrs: nounwind uwtable
define dso_local void @curve25519_divpowm1(ptr noundef %0, ptr noundef %1, ptr noundef %2) #1 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca [10 x i32], align 16
  %8 = alloca [10 x i32], align 16
  %9 = alloca [10 x i32], align 16
  %10 = alloca [10 x i32], align 16
  %11 = alloca [10 x i32], align 16
  %12 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 40, ptr %7) #3
  call void @llvm.memset.p0.i64(ptr align 16 %7, i8 0, i64 40, i1 false)
  call void @llvm.lifetime.start.p0(i64 40, ptr %8) #3
  call void @llvm.memset.p0.i64(ptr align 16 %8, i8 0, i64 40, i1 false)
  call void @llvm.lifetime.start.p0(i64 40, ptr %9) #3
  call void @llvm.memset.p0.i64(ptr align 16 %9, i8 0, i64 40, i1 false)
  call void @llvm.lifetime.start.p0(i64 40, ptr %10) #3
  call void @llvm.memset.p0.i64(ptr align 16 %10, i8 0, i64 40, i1 false)
  call void @llvm.lifetime.start.p0(i64 40, ptr %11) #3
  call void @llvm.memset.p0.i64(ptr align 16 %11, i8 0, i64 40, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #3
  store i32 0, ptr %12, align 4, !tbaa !9
  %13 = getelementptr inbounds [10 x i32], ptr %7, i64 0, i64 0
  %14 = load ptr, ptr %6, align 8, !tbaa !5
  call void @curve25519_square(ptr noundef %13, ptr noundef %14)
  %15 = getelementptr inbounds [10 x i32], ptr %7, i64 0, i64 0
  %16 = getelementptr inbounds [10 x i32], ptr %7, i64 0, i64 0
  %17 = load ptr, ptr %6, align 8, !tbaa !5
  call void @curve25519_mul(ptr noundef %15, ptr noundef %16, ptr noundef %17)
  %18 = getelementptr inbounds [10 x i32], ptr %8, i64 0, i64 0
  %19 = getelementptr inbounds [10 x i32], ptr %7, i64 0, i64 0
  call void @curve25519_square(ptr noundef %18, ptr noundef %19)
  %20 = getelementptr inbounds [10 x i32], ptr %8, i64 0, i64 0
  %21 = getelementptr inbounds [10 x i32], ptr %8, i64 0, i64 0
  %22 = load ptr, ptr %6, align 8, !tbaa !5
  call void @curve25519_mul(ptr noundef %20, ptr noundef %21, ptr noundef %22)
  %23 = getelementptr inbounds [10 x i32], ptr %8, i64 0, i64 0
  %24 = getelementptr inbounds [10 x i32], ptr %8, i64 0, i64 0
  %25 = load ptr, ptr %5, align 8, !tbaa !5
  call void @curve25519_mul(ptr noundef %23, ptr noundef %24, ptr noundef %25)
  %26 = getelementptr inbounds [10 x i32], ptr %9, i64 0, i64 0
  %27 = getelementptr inbounds [10 x i32], ptr %8, i64 0, i64 0
  call void @curve25519_square(ptr noundef %26, ptr noundef %27)
  %28 = getelementptr inbounds [10 x i32], ptr %10, i64 0, i64 0
  %29 = getelementptr inbounds [10 x i32], ptr %9, i64 0, i64 0
  call void @curve25519_square(ptr noundef %28, ptr noundef %29)
  %30 = getelementptr inbounds [10 x i32], ptr %10, i64 0, i64 0
  %31 = getelementptr inbounds [10 x i32], ptr %10, i64 0, i64 0
  call void @curve25519_square(ptr noundef %30, ptr noundef %31)
  %32 = getelementptr inbounds [10 x i32], ptr %10, i64 0, i64 0
  %33 = getelementptr inbounds [10 x i32], ptr %8, i64 0, i64 0
  %34 = getelementptr inbounds [10 x i32], ptr %10, i64 0, i64 0
  call void @curve25519_mul(ptr noundef %32, ptr noundef %33, ptr noundef %34)
  %35 = getelementptr inbounds [10 x i32], ptr %9, i64 0, i64 0
  %36 = getelementptr inbounds [10 x i32], ptr %9, i64 0, i64 0
  %37 = getelementptr inbounds [10 x i32], ptr %10, i64 0, i64 0
  call void @curve25519_mul(ptr noundef %35, ptr noundef %36, ptr noundef %37)
  %38 = getelementptr inbounds [10 x i32], ptr %9, i64 0, i64 0
  %39 = getelementptr inbounds [10 x i32], ptr %9, i64 0, i64 0
  call void @curve25519_square(ptr noundef %38, ptr noundef %39)
  %40 = getelementptr inbounds [10 x i32], ptr %9, i64 0, i64 0
  %41 = getelementptr inbounds [10 x i32], ptr %10, i64 0, i64 0
  %42 = getelementptr inbounds [10 x i32], ptr %9, i64 0, i64 0
  call void @curve25519_mul(ptr noundef %40, ptr noundef %41, ptr noundef %42)
  %43 = getelementptr inbounds [10 x i32], ptr %10, i64 0, i64 0
  %44 = getelementptr inbounds [10 x i32], ptr %9, i64 0, i64 0
  call void @curve25519_square(ptr noundef %43, ptr noundef %44)
  store i32 0, ptr %12, align 4, !tbaa !9
  br label %45

45:                                               ; preds = %51, %3
  %46 = load i32, ptr %12, align 4, !tbaa !9
  %47 = icmp slt i32 %46, 4
  br i1 %47, label %48, label %54

48:                                               ; preds = %45
  %49 = getelementptr inbounds [10 x i32], ptr %10, i64 0, i64 0
  %50 = getelementptr inbounds [10 x i32], ptr %10, i64 0, i64 0
  call void @curve25519_square(ptr noundef %49, ptr noundef %50)
  br label %51

51:                                               ; preds = %48
  %52 = load i32, ptr %12, align 4, !tbaa !9
  %53 = add nsw i32 %52, 1
  store i32 %53, ptr %12, align 4, !tbaa !9
  br label %45, !llvm.loop !11

54:                                               ; preds = %45
  %55 = getelementptr inbounds [10 x i32], ptr %9, i64 0, i64 0
  %56 = getelementptr inbounds [10 x i32], ptr %10, i64 0, i64 0
  %57 = getelementptr inbounds [10 x i32], ptr %9, i64 0, i64 0
  call void @curve25519_mul(ptr noundef %55, ptr noundef %56, ptr noundef %57)
  %58 = getelementptr inbounds [10 x i32], ptr %10, i64 0, i64 0
  %59 = getelementptr inbounds [10 x i32], ptr %9, i64 0, i64 0
  call void @curve25519_square(ptr noundef %58, ptr noundef %59)
  store i32 0, ptr %12, align 4, !tbaa !9
  br label %60

60:                                               ; preds = %66, %54
  %61 = load i32, ptr %12, align 4, !tbaa !9
  %62 = icmp slt i32 %61, 9
  br i1 %62, label %63, label %69

63:                                               ; preds = %60
  %64 = getelementptr inbounds [10 x i32], ptr %10, i64 0, i64 0
  %65 = getelementptr inbounds [10 x i32], ptr %10, i64 0, i64 0
  call void @curve25519_square(ptr noundef %64, ptr noundef %65)
  br label %66

66:                                               ; preds = %63
  %67 = load i32, ptr %12, align 4, !tbaa !9
  %68 = add nsw i32 %67, 1
  store i32 %68, ptr %12, align 4, !tbaa !9
  br label %60, !llvm.loop !13

69:                                               ; preds = %60
  %70 = getelementptr inbounds [10 x i32], ptr %10, i64 0, i64 0
  %71 = getelementptr inbounds [10 x i32], ptr %10, i64 0, i64 0
  %72 = getelementptr inbounds [10 x i32], ptr %9, i64 0, i64 0
  call void @curve25519_mul(ptr noundef %70, ptr noundef %71, ptr noundef %72)
  %73 = getelementptr inbounds [10 x i32], ptr %11, i64 0, i64 0
  %74 = getelementptr inbounds [10 x i32], ptr %10, i64 0, i64 0
  call void @curve25519_square(ptr noundef %73, ptr noundef %74)
  store i32 0, ptr %12, align 4, !tbaa !9
  br label %75

75:                                               ; preds = %81, %69
  %76 = load i32, ptr %12, align 4, !tbaa !9
  %77 = icmp slt i32 %76, 19
  br i1 %77, label %78, label %84

78:                                               ; preds = %75
  %79 = getelementptr inbounds [10 x i32], ptr %11, i64 0, i64 0
  %80 = getelementptr inbounds [10 x i32], ptr %11, i64 0, i64 0
  call void @curve25519_square(ptr noundef %79, ptr noundef %80)
  br label %81

81:                                               ; preds = %78
  %82 = load i32, ptr %12, align 4, !tbaa !9
  %83 = add nsw i32 %82, 1
  store i32 %83, ptr %12, align 4, !tbaa !9
  br label %75, !llvm.loop !14

84:                                               ; preds = %75
  %85 = getelementptr inbounds [10 x i32], ptr %10, i64 0, i64 0
  %86 = getelementptr inbounds [10 x i32], ptr %11, i64 0, i64 0
  %87 = getelementptr inbounds [10 x i32], ptr %10, i64 0, i64 0
  call void @curve25519_mul(ptr noundef %85, ptr noundef %86, ptr noundef %87)
  store i32 0, ptr %12, align 4, !tbaa !9
  br label %88

88:                                               ; preds = %94, %84
  %89 = load i32, ptr %12, align 4, !tbaa !9
  %90 = icmp slt i32 %89, 10
  br i1 %90, label %91, label %97

91:                                               ; preds = %88
  %92 = getelementptr inbounds [10 x i32], ptr %10, i64 0, i64 0
  %93 = getelementptr inbounds [10 x i32], ptr %10, i64 0, i64 0
  call void @curve25519_square(ptr noundef %92, ptr noundef %93)
  br label %94

94:                                               ; preds = %91
  %95 = load i32, ptr %12, align 4, !tbaa !9
  %96 = add nsw i32 %95, 1
  store i32 %96, ptr %12, align 4, !tbaa !9
  br label %88, !llvm.loop !15

97:                                               ; preds = %88
  %98 = getelementptr inbounds [10 x i32], ptr %9, i64 0, i64 0
  %99 = getelementptr inbounds [10 x i32], ptr %10, i64 0, i64 0
  %100 = getelementptr inbounds [10 x i32], ptr %9, i64 0, i64 0
  call void @curve25519_mul(ptr noundef %98, ptr noundef %99, ptr noundef %100)
  %101 = getelementptr inbounds [10 x i32], ptr %10, i64 0, i64 0
  %102 = getelementptr inbounds [10 x i32], ptr %9, i64 0, i64 0
  call void @curve25519_square(ptr noundef %101, ptr noundef %102)
  store i32 0, ptr %12, align 4, !tbaa !9
  br label %103

103:                                              ; preds = %109, %97
  %104 = load i32, ptr %12, align 4, !tbaa !9
  %105 = icmp slt i32 %104, 49
  br i1 %105, label %106, label %112

106:                                              ; preds = %103
  %107 = getelementptr inbounds [10 x i32], ptr %10, i64 0, i64 0
  %108 = getelementptr inbounds [10 x i32], ptr %10, i64 0, i64 0
  call void @curve25519_square(ptr noundef %107, ptr noundef %108)
  br label %109

109:                                              ; preds = %106
  %110 = load i32, ptr %12, align 4, !tbaa !9
  %111 = add nsw i32 %110, 1
  store i32 %111, ptr %12, align 4, !tbaa !9
  br label %103, !llvm.loop !16

112:                                              ; preds = %103
  %113 = getelementptr inbounds [10 x i32], ptr %10, i64 0, i64 0
  %114 = getelementptr inbounds [10 x i32], ptr %10, i64 0, i64 0
  %115 = getelementptr inbounds [10 x i32], ptr %9, i64 0, i64 0
  call void @curve25519_mul(ptr noundef %113, ptr noundef %114, ptr noundef %115)
  %116 = getelementptr inbounds [10 x i32], ptr %11, i64 0, i64 0
  %117 = getelementptr inbounds [10 x i32], ptr %10, i64 0, i64 0
  call void @curve25519_square(ptr noundef %116, ptr noundef %117)
  store i32 0, ptr %12, align 4, !tbaa !9
  br label %118

118:                                              ; preds = %124, %112
  %119 = load i32, ptr %12, align 4, !tbaa !9
  %120 = icmp slt i32 %119, 99
  br i1 %120, label %121, label %127

121:                                              ; preds = %118
  %122 = getelementptr inbounds [10 x i32], ptr %11, i64 0, i64 0
  %123 = getelementptr inbounds [10 x i32], ptr %11, i64 0, i64 0
  call void @curve25519_square(ptr noundef %122, ptr noundef %123)
  br label %124

124:                                              ; preds = %121
  %125 = load i32, ptr %12, align 4, !tbaa !9
  %126 = add nsw i32 %125, 1
  store i32 %126, ptr %12, align 4, !tbaa !9
  br label %118, !llvm.loop !17

127:                                              ; preds = %118
  %128 = getelementptr inbounds [10 x i32], ptr %10, i64 0, i64 0
  %129 = getelementptr inbounds [10 x i32], ptr %11, i64 0, i64 0
  %130 = getelementptr inbounds [10 x i32], ptr %10, i64 0, i64 0
  call void @curve25519_mul(ptr noundef %128, ptr noundef %129, ptr noundef %130)
  store i32 0, ptr %12, align 4, !tbaa !9
  br label %131

131:                                              ; preds = %137, %127
  %132 = load i32, ptr %12, align 4, !tbaa !9
  %133 = icmp slt i32 %132, 50
  br i1 %133, label %134, label %140

134:                                              ; preds = %131
  %135 = getelementptr inbounds [10 x i32], ptr %10, i64 0, i64 0
  %136 = getelementptr inbounds [10 x i32], ptr %10, i64 0, i64 0
  call void @curve25519_square(ptr noundef %135, ptr noundef %136)
  br label %137

137:                                              ; preds = %134
  %138 = load i32, ptr %12, align 4, !tbaa !9
  %139 = add nsw i32 %138, 1
  store i32 %139, ptr %12, align 4, !tbaa !9
  br label %131, !llvm.loop !18

140:                                              ; preds = %131
  %141 = getelementptr inbounds [10 x i32], ptr %9, i64 0, i64 0
  %142 = getelementptr inbounds [10 x i32], ptr %10, i64 0, i64 0
  %143 = getelementptr inbounds [10 x i32], ptr %9, i64 0, i64 0
  call void @curve25519_mul(ptr noundef %141, ptr noundef %142, ptr noundef %143)
  %144 = getelementptr inbounds [10 x i32], ptr %9, i64 0, i64 0
  %145 = getelementptr inbounds [10 x i32], ptr %9, i64 0, i64 0
  call void @curve25519_square(ptr noundef %144, ptr noundef %145)
  %146 = getelementptr inbounds [10 x i32], ptr %9, i64 0, i64 0
  %147 = getelementptr inbounds [10 x i32], ptr %9, i64 0, i64 0
  call void @curve25519_square(ptr noundef %146, ptr noundef %147)
  %148 = getelementptr inbounds [10 x i32], ptr %9, i64 0, i64 0
  %149 = getelementptr inbounds [10 x i32], ptr %9, i64 0, i64 0
  %150 = getelementptr inbounds [10 x i32], ptr %8, i64 0, i64 0
  call void @curve25519_mul(ptr noundef %148, ptr noundef %149, ptr noundef %150)
  %151 = getelementptr inbounds [10 x i32], ptr %9, i64 0, i64 0
  %152 = getelementptr inbounds [10 x i32], ptr %9, i64 0, i64 0
  %153 = getelementptr inbounds [10 x i32], ptr %7, i64 0, i64 0
  call void @curve25519_mul(ptr noundef %151, ptr noundef %152, ptr noundef %153)
  %154 = load ptr, ptr %4, align 8, !tbaa !5
  %155 = getelementptr inbounds [10 x i32], ptr %9, i64 0, i64 0
  %156 = load ptr, ptr %5, align 8, !tbaa !5
  call void @curve25519_mul(ptr noundef %154, ptr noundef %155, ptr noundef %156)
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 40, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 40, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 40, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 40, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 40, ptr %7) #3
  ret void
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { nocallback nofree nounwind willreturn memory(argmem: write) }
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 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !12}
!16 = distinct !{!16, !12}
!17 = distinct !{!17, !12}
!18 = distinct !{!18, !12}


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

; 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: nounwind uwtable
declare dso_local void @curve25519_mul(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local void @curve25519_square(ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #2

; Function Attrs: nounwind uwtable
define dso_local void @curve25519_divpowm1(ptr noundef %0, ptr noundef %1, ptr noundef %2) local_unnamed_addr #1 {
  %4 = alloca [10 x i32], align 16
  %5 = alloca [10 x i32], align 16
  %6 = alloca [10 x i32], align 16
  %7 = alloca [10 x i32], align 16
  %8 = alloca [10 x i32], align 16
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %4) #3
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(40) %4, i8 0, i64 40, i1 false)
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %5) #3
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(40) %5, i8 0, i64 40, i1 false)
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %6) #3
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(40) %6, i8 0, i64 40, i1 false)
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %7) #3
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(40) %7, i8 0, i64 40, i1 false)
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %8) #3
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(40) %8, i8 0, i64 40, i1 false)
  call void @curve25519_square(ptr noundef nonnull %4, ptr noundef %2)
  call void @curve25519_mul(ptr noundef nonnull %4, ptr noundef nonnull %4, ptr noundef %2)
  call void @curve25519_square(ptr noundef nonnull %5, ptr noundef nonnull %4)
  call void @curve25519_mul(ptr noundef nonnull %5, ptr noundef nonnull %5, ptr noundef %2)
  call void @curve25519_mul(ptr noundef nonnull %5, ptr noundef nonnull %5, ptr noundef %1)
  call void @curve25519_square(ptr noundef nonnull %6, ptr noundef nonnull %5)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %6)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @curve25519_mul(ptr noundef nonnull %7, ptr noundef nonnull %5, ptr noundef nonnull %7)
  call void @curve25519_mul(ptr noundef nonnull %6, ptr noundef nonnull %6, ptr noundef nonnull %7)
  call void @curve25519_square(ptr noundef nonnull %6, ptr noundef nonnull %6)
  call void @curve25519_mul(ptr noundef nonnull %6, ptr noundef nonnull %7, ptr noundef nonnull %6)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %6)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @curve25519_mul(ptr noundef nonnull %6, ptr noundef nonnull %7, ptr noundef nonnull %6)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %6)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @curve25519_mul(ptr noundef nonnull %7, ptr noundef nonnull %7, ptr noundef nonnull %6)
  call void @curve25519_square(ptr noundef nonnull %8, ptr noundef nonnull %7)
  call void @curve25519_square(ptr noundef nonnull %8, ptr noundef nonnull %8)
  call void @curve25519_square(ptr noundef nonnull %8, ptr noundef nonnull %8)
  call void @curve25519_square(ptr noundef nonnull %8, ptr noundef nonnull %8)
  call void @curve25519_square(ptr noundef nonnull %8, ptr noundef nonnull %8)
  call void @curve25519_square(ptr noundef nonnull %8, ptr noundef nonnull %8)
  call void @curve25519_square(ptr noundef nonnull %8, ptr noundef nonnull %8)
  call void @curve25519_square(ptr noundef nonnull %8, ptr noundef nonnull %8)
  call void @curve25519_square(ptr noundef nonnull %8, ptr noundef nonnull %8)
  call void @curve25519_square(ptr noundef nonnull %8, ptr noundef nonnull %8)
  call void @curve25519_square(ptr noundef nonnull %8, ptr noundef nonnull %8)
  call void @curve25519_square(ptr noundef nonnull %8, ptr noundef nonnull %8)
  call void @curve25519_square(ptr noundef nonnull %8, ptr noundef nonnull %8)
  call void @curve25519_square(ptr noundef nonnull %8, ptr noundef nonnull %8)
  call void @curve25519_square(ptr noundef nonnull %8, ptr noundef nonnull %8)
  call void @curve25519_square(ptr noundef nonnull %8, ptr noundef nonnull %8)
  call void @curve25519_square(ptr noundef nonnull %8, ptr noundef nonnull %8)
  call void @curve25519_square(ptr noundef nonnull %8, ptr noundef nonnull %8)
  call void @curve25519_square(ptr noundef nonnull %8, ptr noundef nonnull %8)
  call void @curve25519_square(ptr noundef nonnull %8, ptr noundef nonnull %8)
  call void @curve25519_mul(ptr noundef nonnull %7, ptr noundef nonnull %8, ptr noundef nonnull %7)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @curve25519_mul(ptr noundef nonnull %6, ptr noundef nonnull %7, ptr noundef nonnull %6)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %6)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @curve25519_mul(ptr noundef nonnull %7, ptr noundef nonnull %7, ptr noundef nonnull %6)
  call void @curve25519_square(ptr noundef nonnull %8, ptr noundef nonnull %7)
  br label %9

9:                                                ; preds = %3, %9
  %.524 = phi i32 [ 0, %3 ], [ %10, %9 ]
  call void @curve25519_square(ptr noundef nonnull %8, ptr noundef nonnull %8)
  %10 = add nuw nsw i32 %.524, 1
  %exitcond.not = icmp eq i32 %10, 99
  br i1 %exitcond.not, label %11, label %9, !llvm.loop !5

11:                                               ; preds = %9
  call void @curve25519_mul(ptr noundef nonnull %7, ptr noundef nonnull %8, ptr noundef nonnull %7)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @curve25519_square(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @curve25519_mul(ptr noundef nonnull %6, ptr noundef nonnull %7, ptr noundef nonnull %6)
  call void @curve25519_square(ptr noundef nonnull %6, ptr noundef nonnull %6)
  call void @curve25519_square(ptr noundef nonnull %6, ptr noundef nonnull %6)
  call void @curve25519_mul(ptr noundef nonnull %6, ptr noundef nonnull %6, ptr noundef nonnull %5)
  call void @curve25519_mul(ptr noundef nonnull %6, ptr noundef nonnull %6, ptr noundef nonnull %4)
  call void @curve25519_mul(ptr noundef %0, ptr noundef nonnull %6, ptr noundef %1)
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %8) #3
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %7) #3
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %6) #3
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %5) #3
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %4) #3
  ret void
}

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
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 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,LoopRotatePass,SROAPass,SimplifyCFGPass