; LLVM IR from LoupVaillant/Monocypher-Utils :: src (monocypher)

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

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

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

; Function Attrs: nounwind uwtable
define dso_local i32 @crypto_x25519(ptr noundef %0, ptr noundef %1, ptr noundef %2) #0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca [10 x i32], align 16
  %8 = alloca [32 x i8], align 16
  %9 = alloca i64, align 8
  %10 = alloca [10 x i32], align 16
  %11 = alloca [10 x i32], align 16
  %12 = alloca [10 x i32], align 16
  %13 = alloca [10 x i32], align 16
  %14 = alloca [10 x i32], align 16
  %15 = alloca [10 x i32], align 16
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = 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) #2
  %19 = getelementptr inbounds [10 x i32], ptr %7, i64 0, i64 0
  %20 = load ptr, ptr %6, align 8, !tbaa !5
  call void @fe_frombytes(ptr noundef %19, ptr noundef %20)
  call void @llvm.lifetime.start.p0(i64 32, ptr %8) #2
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #2
  store i64 0, ptr %9, align 8, !tbaa !9
  br label %21

21:                                               ; preds = %32, %3
  %22 = load i64, ptr %9, align 8, !tbaa !9
  %23 = icmp ult i64 %22, 32
  br i1 %23, label %25, label %24

24:                                               ; preds = %21
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #2
  br label %35

25:                                               ; preds = %21
  %26 = load ptr, ptr %5, align 8, !tbaa !5
  %27 = load i64, ptr %9, align 8, !tbaa !9
  %28 = getelementptr inbounds i8, ptr %26, i64 %27
  %29 = load i8, ptr %28, align 1, !tbaa !11
  %30 = load i64, ptr %9, align 8, !tbaa !9
  %31 = getelementptr inbounds [32 x i8], ptr %8, i64 0, i64 %30
  store i8 %29, ptr %31, align 1, !tbaa !11
  br label %32

32:                                               ; preds = %25
  %33 = load i64, ptr %9, align 8, !tbaa !9
  %34 = add i64 %33, 1
  store i64 %34, ptr %9, align 8, !tbaa !9
  br label %21, !llvm.loop !12

35:                                               ; preds = %24
  %36 = getelementptr inbounds [32 x i8], ptr %8, i64 0, i64 0
  call void @trim_scalar(ptr noundef %36)
  call void @llvm.lifetime.start.p0(i64 40, ptr %10) #2
  call void @llvm.lifetime.start.p0(i64 40, ptr %11) #2
  call void @llvm.lifetime.start.p0(i64 40, ptr %12) #2
  call void @llvm.lifetime.start.p0(i64 40, ptr %13) #2
  call void @llvm.lifetime.start.p0(i64 40, ptr %14) #2
  call void @llvm.lifetime.start.p0(i64 40, ptr %15) #2
  %37 = getelementptr inbounds [10 x i32], ptr %10, i64 0, i64 0
  call void @fe_1(ptr noundef %37)
  %38 = getelementptr inbounds [10 x i32], ptr %11, i64 0, i64 0
  call void @fe_0(ptr noundef %38)
  %39 = getelementptr inbounds [10 x i32], ptr %12, i64 0, i64 0
  %40 = getelementptr inbounds [10 x i32], ptr %7, i64 0, i64 0
  call void @fe_copy(ptr noundef %39, ptr noundef %40)
  %41 = getelementptr inbounds [10 x i32], ptr %13, i64 0, i64 0
  call void @fe_1(ptr noundef %41)
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #2
  store i32 0, ptr %16, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #2
  store i32 254, ptr %17, align 4, !tbaa !14
  br label %42

42:                                               ; preds = %109, %35
  %43 = load i32, ptr %17, align 4, !tbaa !14
  %44 = icmp sge i32 %43, 0
  br i1 %44, label %46, label %45

45:                                               ; preds = %42
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #2
  br label %112

46:                                               ; preds = %42
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #2
  %47 = getelementptr inbounds [32 x i8], ptr %8, i64 0, i64 0
  %48 = load i32, ptr %17, align 4, !tbaa !14
  %49 = call i32 @scalar_bit(ptr noundef %47, i32 noundef %48)
  store i32 %49, ptr %18, align 4, !tbaa !14
  %50 = load i32, ptr %18, align 4, !tbaa !14
  %51 = load i32, ptr %16, align 4, !tbaa !14
  %52 = xor i32 %51, %50
  store i32 %52, ptr %16, align 4, !tbaa !14
  %53 = getelementptr inbounds [10 x i32], ptr %10, i64 0, i64 0
  %54 = getelementptr inbounds [10 x i32], ptr %12, i64 0, i64 0
  %55 = load i32, ptr %16, align 4, !tbaa !14
  call void @fe_cswap(ptr noundef %53, ptr noundef %54, i32 noundef %55)
  %56 = getelementptr inbounds [10 x i32], ptr %11, i64 0, i64 0
  %57 = getelementptr inbounds [10 x i32], ptr %13, i64 0, i64 0
  %58 = load i32, ptr %16, align 4, !tbaa !14
  call void @fe_cswap(ptr noundef %56, ptr noundef %57, i32 noundef %58)
  %59 = load i32, ptr %18, align 4, !tbaa !14
  store i32 %59, ptr %16, align 4, !tbaa !14
  %60 = getelementptr inbounds [10 x i32], ptr %14, i64 0, i64 0
  %61 = getelementptr inbounds [10 x i32], ptr %12, i64 0, i64 0
  %62 = getelementptr inbounds [10 x i32], ptr %13, i64 0, i64 0
  call void @fe_sub(ptr noundef %60, ptr noundef %61, ptr noundef %62)
  %63 = getelementptr inbounds [10 x i32], ptr %15, i64 0, i64 0
  %64 = getelementptr inbounds [10 x i32], ptr %10, i64 0, i64 0
  %65 = getelementptr inbounds [10 x i32], ptr %11, i64 0, i64 0
  call void @fe_sub(ptr noundef %63, ptr noundef %64, ptr noundef %65)
  %66 = getelementptr inbounds [10 x i32], ptr %10, i64 0, i64 0
  %67 = getelementptr inbounds [10 x i32], ptr %10, i64 0, i64 0
  %68 = getelementptr inbounds [10 x i32], ptr %11, i64 0, i64 0
  call void @fe_add(ptr noundef %66, ptr noundef %67, ptr noundef %68)
  %69 = getelementptr inbounds [10 x i32], ptr %11, i64 0, i64 0
  %70 = getelementptr inbounds [10 x i32], ptr %12, i64 0, i64 0
  %71 = getelementptr inbounds [10 x i32], ptr %13, i64 0, i64 0
  call void @fe_add(ptr noundef %69, ptr noundef %70, ptr noundef %71)
  %72 = getelementptr inbounds [10 x i32], ptr %13, i64 0, i64 0
  %73 = getelementptr inbounds [10 x i32], ptr %14, i64 0, i64 0
  %74 = getelementptr inbounds [10 x i32], ptr %10, i64 0, i64 0
  call void @fe_mul(ptr noundef %72, ptr noundef %73, ptr noundef %74)
  %75 = getelementptr inbounds [10 x i32], ptr %11, i64 0, i64 0
  %76 = getelementptr inbounds [10 x i32], ptr %11, i64 0, i64 0
  %77 = getelementptr inbounds [10 x i32], ptr %15, i64 0, i64 0
  call void @fe_mul(ptr noundef %75, ptr noundef %76, ptr noundef %77)
  %78 = getelementptr inbounds [10 x i32], ptr %14, i64 0, i64 0
  %79 = getelementptr inbounds [10 x i32], ptr %15, i64 0, i64 0
  call void @fe_sq(ptr noundef %78, ptr noundef %79)
  %80 = getelementptr inbounds [10 x i32], ptr %15, i64 0, i64 0
  %81 = getelementptr inbounds [10 x i32], ptr %10, i64 0, i64 0
  call void @fe_sq(ptr noundef %80, ptr noundef %81)
  %82 = getelementptr inbounds [10 x i32], ptr %12, i64 0, i64 0
  %83 = getelementptr inbounds [10 x i32], ptr %13, i64 0, i64 0
  %84 = getelementptr inbounds [10 x i32], ptr %11, i64 0, i64 0
  call void @fe_add(ptr noundef %82, ptr noundef %83, ptr noundef %84)
  %85 = getelementptr inbounds [10 x i32], ptr %11, i64 0, i64 0
  %86 = getelementptr inbounds [10 x i32], ptr %13, i64 0, i64 0
  %87 = getelementptr inbounds [10 x i32], ptr %11, i64 0, i64 0
  call void @fe_sub(ptr noundef %85, ptr noundef %86, ptr noundef %87)
  %88 = getelementptr inbounds [10 x i32], ptr %10, i64 0, i64 0
  %89 = getelementptr inbounds [10 x i32], ptr %15, i64 0, i64 0
  %90 = getelementptr inbounds [10 x i32], ptr %14, i64 0, i64 0
  call void @fe_mul(ptr noundef %88, ptr noundef %89, ptr noundef %90)
  %91 = getelementptr inbounds [10 x i32], ptr %15, i64 0, i64 0
  %92 = getelementptr inbounds [10 x i32], ptr %15, i64 0, i64 0
  %93 = getelementptr inbounds [10 x i32], ptr %14, i64 0, i64 0
  call void @fe_sub(ptr noundef %91, ptr noundef %92, ptr noundef %93)
  %94 = getelementptr inbounds [10 x i32], ptr %11, i64 0, i64 0
  %95 = getelementptr inbounds [10 x i32], ptr %11, i64 0, i64 0
  call void @fe_sq(ptr noundef %94, ptr noundef %95)
  %96 = getelementptr inbounds [10 x i32], ptr %13, i64 0, i64 0
  %97 = getelementptr inbounds [10 x i32], ptr %15, i64 0, i64 0
  call void @fe_mul121666(ptr noundef %96, ptr noundef %97)
  %98 = getelementptr inbounds [10 x i32], ptr %12, i64 0, i64 0
  %99 = getelementptr inbounds [10 x i32], ptr %12, i64 0, i64 0
  call void @fe_sq(ptr noundef %98, ptr noundef %99)
  %100 = getelementptr inbounds [10 x i32], ptr %14, i64 0, i64 0
  %101 = getelementptr inbounds [10 x i32], ptr %14, i64 0, i64 0
  %102 = getelementptr inbounds [10 x i32], ptr %13, i64 0, i64 0
  call void @fe_add(ptr noundef %100, ptr noundef %101, ptr noundef %102)
  %103 = getelementptr inbounds [10 x i32], ptr %13, i64 0, i64 0
  %104 = getelementptr inbounds [10 x i32], ptr %7, i64 0, i64 0
  %105 = getelementptr inbounds [10 x i32], ptr %11, i64 0, i64 0
  call void @fe_mul(ptr noundef %103, ptr noundef %104, ptr noundef %105)
  %106 = getelementptr inbounds [10 x i32], ptr %11, i64 0, i64 0
  %107 = getelementptr inbounds [10 x i32], ptr %15, i64 0, i64 0
  %108 = getelementptr inbounds [10 x i32], ptr %14, i64 0, i64 0
  call void @fe_mul(ptr noundef %106, ptr noundef %107, ptr noundef %108)
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #2
  br label %109

109:                                              ; preds = %46
  %110 = load i32, ptr %17, align 4, !tbaa !14
  %111 = add nsw i32 %110, -1
  store i32 %111, ptr %17, align 4, !tbaa !14
  br label %42, !llvm.loop !16

112:                                              ; preds = %45
  %113 = getelementptr inbounds [10 x i32], ptr %10, i64 0, i64 0
  %114 = getelementptr inbounds [10 x i32], ptr %12, i64 0, i64 0
  %115 = load i32, ptr %16, align 4, !tbaa !14
  call void @fe_cswap(ptr noundef %113, ptr noundef %114, i32 noundef %115)
  %116 = getelementptr inbounds [10 x i32], ptr %11, i64 0, i64 0
  %117 = getelementptr inbounds [10 x i32], ptr %13, i64 0, i64 0
  %118 = load i32, ptr %16, align 4, !tbaa !14
  call void @fe_cswap(ptr noundef %116, ptr noundef %117, i32 noundef %118)
  %119 = getelementptr inbounds [10 x i32], ptr %11, i64 0, i64 0
  %120 = getelementptr inbounds [10 x i32], ptr %11, i64 0, i64 0
  call void @fe_invert(ptr noundef %119, ptr noundef %120)
  %121 = getelementptr inbounds [10 x i32], ptr %10, i64 0, i64 0
  %122 = getelementptr inbounds [10 x i32], ptr %10, i64 0, i64 0
  %123 = getelementptr inbounds [10 x i32], ptr %11, i64 0, i64 0
  call void @fe_mul(ptr noundef %121, ptr noundef %122, ptr noundef %123)
  %124 = load ptr, ptr %4, align 8, !tbaa !5
  %125 = getelementptr inbounds [10 x i32], ptr %10, i64 0, i64 0
  call void @fe_tobytes(ptr noundef %124, ptr noundef %125)
  %126 = getelementptr inbounds [10 x i32], ptr %7, i64 0, i64 0
  call void @crypto_wipe(ptr noundef %126, i64 noundef 40)
  %127 = getelementptr inbounds [32 x i8], ptr %8, i64 0, i64 0
  call void @crypto_wipe(ptr noundef %127, i64 noundef 32)
  %128 = getelementptr inbounds [10 x i32], ptr %10, i64 0, i64 0
  call void @crypto_wipe(ptr noundef %128, i64 noundef 40)
  %129 = getelementptr inbounds [10 x i32], ptr %11, i64 0, i64 0
  call void @crypto_wipe(ptr noundef %129, i64 noundef 40)
  %130 = getelementptr inbounds [10 x i32], ptr %12, i64 0, i64 0
  call void @crypto_wipe(ptr noundef %130, i64 noundef 40)
  %131 = getelementptr inbounds [10 x i32], ptr %13, i64 0, i64 0
  call void @crypto_wipe(ptr noundef %131, i64 noundef 40)
  %132 = getelementptr inbounds [10 x i32], ptr %14, i64 0, i64 0
  call void @crypto_wipe(ptr noundef %132, i64 noundef 40)
  %133 = getelementptr inbounds [10 x i32], ptr %15, i64 0, i64 0
  call void @crypto_wipe(ptr noundef %133, i64 noundef 40)
  %134 = load ptr, ptr %4, align 8, !tbaa !5
  %135 = call i32 @zerocmp32(ptr noundef %134)
  %136 = sub nsw i32 -1, %135
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #2
  call void @llvm.lifetime.end.p0(i64 40, ptr %15) #2
  call void @llvm.lifetime.end.p0(i64 40, ptr %14) #2
  call void @llvm.lifetime.end.p0(i64 40, ptr %13) #2
  call void @llvm.lifetime.end.p0(i64 40, ptr %12) #2
  call void @llvm.lifetime.end.p0(i64 40, ptr %11) #2
  call void @llvm.lifetime.end.p0(i64 40, ptr %10) #2
  call void @llvm.lifetime.end.p0(i64 32, ptr %8) #2
  call void @llvm.lifetime.end.p0(i64 40, ptr %7) #2
  ret i32 %136
}

; Function Attrs: nounwind uwtable
declare hidden void @fe_frombytes(ptr noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden void @trim_scalar(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden void @fe_1(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden void @fe_0(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden void @fe_copy(ptr noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @scalar_bit(ptr noundef, i32 noundef) #0

; Function Attrs: nounwind uwtable
declare hidden void @fe_cswap(ptr noundef, ptr noundef, i32 noundef) #0

; Function Attrs: nounwind uwtable
declare hidden void @fe_sub(ptr noundef, ptr noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden void @fe_add(ptr noundef, ptr noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden void @fe_mul(ptr noundef, ptr noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden void @fe_sq(ptr noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden void @fe_mul121666(ptr noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden void @fe_invert(ptr noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden void @fe_tobytes(ptr noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @zerocmp32(ptr 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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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, !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 = !{!"long", !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = !{!15, !15, i64 0}
!15 = !{!"int", !7, i64 0}
!16 = distinct !{!16, !13}


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

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

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

; Function Attrs: nounwind uwtable
define dso_local i32 @crypto_x25519(ptr noundef %0, ptr nocapture noundef readonly %1, ptr noundef %2) local_unnamed_addr #0 {
  %4 = alloca [10 x i32], align 16
  %5 = alloca [32 x i8], align 16
  %6 = alloca [10 x i32], align 16
  %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
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %4) #3
  call void @fe_frombytes(ptr noundef nonnull %4, ptr noundef %2)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #3
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(32) %5, ptr noundef nonnull align 1 dereferenceable(32) %1, i64 32, i1 false), !tbaa !5
  call void @trim_scalar(ptr noundef nonnull %5)
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %6) #3
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %7) #3
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %8) #3
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %9) #3
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %10) #3
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %11) #3
  call void @fe_1(ptr noundef nonnull %6)
  call void @fe_0(ptr noundef nonnull %7)
  call void @fe_copy(ptr noundef nonnull %8, ptr noundef nonnull %4)
  call void @fe_1(ptr noundef nonnull %9)
  br label %15

12:                                               ; preds = %15
  call void @fe_cswap(ptr noundef nonnull %6, ptr noundef nonnull %8, i32 noundef %16)
  call void @fe_cswap(ptr noundef nonnull %7, ptr noundef nonnull %9, i32 noundef %16)
  call void @fe_invert(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @fe_mul(ptr noundef nonnull %6, ptr noundef nonnull %6, ptr noundef nonnull %7)
  call void @fe_tobytes(ptr noundef %0, ptr noundef nonnull %6)
  call void @crypto_wipe(ptr noundef nonnull %4, i64 noundef 40)
  call void @crypto_wipe(ptr noundef nonnull %5, i64 noundef 32)
  call void @crypto_wipe(ptr noundef nonnull %6, i64 noundef 40)
  call void @crypto_wipe(ptr noundef nonnull %7, i64 noundef 40)
  call void @crypto_wipe(ptr noundef nonnull %8, i64 noundef 40)
  call void @crypto_wipe(ptr noundef nonnull %9, i64 noundef 40)
  call void @crypto_wipe(ptr noundef nonnull %10, i64 noundef 40)
  call void @crypto_wipe(ptr noundef nonnull %11, i64 noundef 40)
  %13 = call i32 @zerocmp32(ptr noundef %0)
  %14 = xor i32 %13, -1
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %11) #3
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %10) #3
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %9) #3
  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 32, ptr nonnull %5) #3
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %4) #3
  ret i32 %14

15:                                               ; preds = %3, %15
  %.01721 = phi i32 [ 254, %3 ], [ %18, %15 ]
  %.01820 = phi i32 [ 0, %3 ], [ %16, %15 ]
  %16 = call i32 @scalar_bit(ptr noundef nonnull %5, i32 noundef %.01721)
  %17 = xor i32 %16, %.01820
  call void @fe_cswap(ptr noundef nonnull %6, ptr noundef nonnull %8, i32 noundef %17)
  call void @fe_cswap(ptr noundef nonnull %7, ptr noundef nonnull %9, i32 noundef %17)
  call void @fe_sub(ptr noundef nonnull %10, ptr noundef nonnull %8, ptr noundef nonnull %9)
  call void @fe_sub(ptr noundef nonnull %11, ptr noundef nonnull %6, ptr noundef nonnull %7)
  call void @fe_add(ptr noundef nonnull %6, ptr noundef nonnull %6, ptr noundef nonnull %7)
  call void @fe_add(ptr noundef nonnull %7, ptr noundef nonnull %8, ptr noundef nonnull %9)
  call void @fe_mul(ptr noundef nonnull %9, ptr noundef nonnull %10, ptr noundef nonnull %6)
  call void @fe_mul(ptr noundef nonnull %7, ptr noundef nonnull %7, ptr noundef nonnull %11)
  call void @fe_sq(ptr noundef nonnull %10, ptr noundef nonnull %11)
  call void @fe_sq(ptr noundef nonnull %11, ptr noundef nonnull %6)
  call void @fe_add(ptr noundef nonnull %8, ptr noundef nonnull %9, ptr noundef nonnull %7)
  call void @fe_sub(ptr noundef nonnull %7, ptr noundef nonnull %9, ptr noundef nonnull %7)
  call void @fe_mul(ptr noundef nonnull %6, ptr noundef nonnull %11, ptr noundef nonnull %10)
  call void @fe_sub(ptr noundef nonnull %11, ptr noundef nonnull %11, ptr noundef nonnull %10)
  call void @fe_sq(ptr noundef nonnull %7, ptr noundef nonnull %7)
  call void @fe_mul121666(ptr noundef nonnull %9, ptr noundef nonnull %11)
  call void @fe_sq(ptr noundef nonnull %8, ptr noundef nonnull %8)
  call void @fe_add(ptr noundef nonnull %10, ptr noundef nonnull %10, ptr noundef nonnull %9)
  call void @fe_mul(ptr noundef nonnull %9, ptr noundef nonnull %4, ptr noundef nonnull %7)
  call void @fe_mul(ptr noundef nonnull %7, ptr noundef nonnull %11, ptr noundef nonnull %10)
  %18 = add nsw i32 %.01721, -1
  %.not = icmp eq i32 %.01721, 0
  br i1 %.not, label %12, label %15, !llvm.loop !8
}

; Function Attrs: nounwind uwtable
declare hidden void @fe_frombytes(ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden void @trim_scalar(ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden void @fe_1(ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden void @fe_0(ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden void @fe_copy(ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden i32 @scalar_bit(ptr noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden void @fe_cswap(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden void @fe_sub(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden void @fe_add(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden void @fe_mul(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden void @fe_sq(ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden void @fe_mul121666(ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden void @fe_invert(ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden void @fe_tobytes(ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden i32 @zerocmp32(ptr noundef) local_unnamed_addr #0

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nocallback nofree 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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C/C++ TBAA"}
!8 = distinct !{!8, !9}
!9 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,LCSSAPass,LoopIdiomRecognizePass,LoopRotatePass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass