; LLVM IR from sca-secure-library-sca25519/sca25519 :: STM32F407-static (test)

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

@__const.test_curve25519_static.correct_res = external hidden unnamed_addr constant [32 x i8], align 16

; Function Attrs: nounwind uwtable
define dso_local i32 @test_curve25519_static() #0 {
  %1 = alloca [32 x i8], align 16
  %2 = alloca [32 x i8], align 16
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 32, ptr %1) #4
  call void @llvm.lifetime.start.p0(i64 32, ptr %2) #4
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %2, ptr align 16 @__const.test_curve25519_static.correct_res, i64 32, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #4
  store volatile i32 0, ptr %4, align 4, !tbaa !5
  %5 = getelementptr inbounds [32 x i8], ptr %1, i64 0, i64 0
  %6 = call i32 @crypto_scalarmult_base_curve25519(ptr noundef %5)
  %7 = load volatile i32, ptr %4, align 4, !tbaa !5
  %8 = or i32 %7, %6
  store volatile i32 %8, ptr %4, align 4, !tbaa !5
  store i32 0, ptr %3, align 4, !tbaa !5
  br label %9

9:                                                ; preds = %28, %0
  %10 = load i32, ptr %3, align 4, !tbaa !5
  %11 = icmp slt i32 %10, 32
  br i1 %11, label %12, label %31

12:                                               ; preds = %9
  %13 = load i32, ptr %3, align 4, !tbaa !5
  %14 = sext i32 %13 to i64
  %15 = getelementptr inbounds [32 x i8], ptr %1, i64 0, i64 %14
  %16 = load i8, ptr %15, align 1, !tbaa !9
  %17 = zext i8 %16 to i32
  %18 = load i32, ptr %3, align 4, !tbaa !5
  %19 = sext i32 %18 to i64
  %20 = getelementptr inbounds [32 x i8], ptr %2, i64 0, i64 %19
  %21 = load i8, ptr %20, align 1, !tbaa !9
  %22 = zext i8 %21 to i32
  %23 = icmp ne i32 %17, %22
  br i1 %23, label %24, label %27

24:                                               ; preds = %12
  %25 = load volatile i32, ptr %4, align 4, !tbaa !5
  %26 = or i32 %25, 1
  store volatile i32 %26, ptr %4, align 4, !tbaa !5
  br label %31

27:                                               ; preds = %12
  br label %28

28:                                               ; preds = %27
  %29 = load i32, ptr %3, align 4, !tbaa !5
  %30 = add nsw i32 %29, 1
  store i32 %30, ptr %3, align 4, !tbaa !5
  br label %9, !llvm.loop !10

31:                                               ; preds = %24, %9
  %32 = getelementptr inbounds [32 x i8], ptr %1, i64 0, i64 0
  %33 = call i32 @crypto_scalarmult_base_curve25519(ptr noundef %32)
  %34 = load volatile i32, ptr %4, align 4, !tbaa !5
  %35 = or i32 %34, %33
  store volatile i32 %35, ptr %4, align 4, !tbaa !5
  store i32 0, ptr %3, align 4, !tbaa !5
  br label %36

36:                                               ; preds = %55, %31
  %37 = load i32, ptr %3, align 4, !tbaa !5
  %38 = icmp slt i32 %37, 32
  br i1 %38, label %39, label %58

39:                                               ; preds = %36
  %40 = load i32, ptr %3, align 4, !tbaa !5
  %41 = sext i32 %40 to i64
  %42 = getelementptr inbounds [32 x i8], ptr %1, i64 0, i64 %41
  %43 = load i8, ptr %42, align 1, !tbaa !9
  %44 = zext i8 %43 to i32
  %45 = load i32, ptr %3, align 4, !tbaa !5
  %46 = sext i32 %45 to i64
  %47 = getelementptr inbounds [32 x i8], ptr %2, i64 0, i64 %46
  %48 = load i8, ptr %47, align 1, !tbaa !9
  %49 = zext i8 %48 to i32
  %50 = icmp ne i32 %44, %49
  br i1 %50, label %51, label %54

51:                                               ; preds = %39
  %52 = load volatile i32, ptr %4, align 4, !tbaa !5
  %53 = or i32 %52, 2
  store volatile i32 %53, ptr %4, align 4, !tbaa !5
  br label %58

54:                                               ; preds = %39
  br label %55

55:                                               ; preds = %54
  %56 = load i32, ptr %3, align 4, !tbaa !5
  %57 = add nsw i32 %56, 1
  store i32 %57, ptr %3, align 4, !tbaa !5
  br label %36, !llvm.loop !12

58:                                               ; preds = %51, %36
  %59 = load volatile i32, ptr %4, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %2) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %1) #4
  ret i32 %59
}

; 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 nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

declare i32 @crypto_scalarmult_base_curve25519(ptr noundef) #3

; 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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { "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 #4 = { 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 = !{!7, !7, i64 0}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}
!12 = distinct !{!12, !11}


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

@__const.test_curve25519_static.correct_res = external hidden unnamed_addr constant [32 x i8], align 16

; Function Attrs: nounwind uwtable
define dso_local i32 @test_curve25519_static() local_unnamed_addr #0 {
  %1 = alloca [32 x i8], align 16
  %2 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %1) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2)
  store volatile i32 0, ptr %2, align 4, !tbaa !5
  %3 = call i32 @crypto_scalarmult_base_curve25519(ptr noundef nonnull %1) #3
  %.0..0..0..0. = load volatile i32, ptr %2, align 4, !tbaa !5
  %4 = or i32 %.0..0..0..0., %3
  store volatile i32 %4, ptr %2, align 4, !tbaa !5
  %5 = load i8, ptr %1, align 16, !tbaa !9
  %6 = load i8, ptr @__const.test_curve25519_static.correct_res, align 16, !tbaa !9
  %.not = icmp eq i8 %5, %6
  br i1 %.not, label %7, label %131

7:                                                ; preds = %0
  %8 = getelementptr inbounds i8, ptr %1, i64 1
  %9 = load i8, ptr %8, align 1, !tbaa !9
  %10 = load i8, ptr getelementptr inbounds (i8, ptr @__const.test_curve25519_static.correct_res, i64 1), align 1, !tbaa !9
  %.not.1 = icmp eq i8 %9, %10
  br i1 %.not.1, label %11, label %131

11:                                               ; preds = %7
  %12 = getelementptr inbounds i8, ptr %1, i64 2
  %13 = load i8, ptr %12, align 2, !tbaa !9
  %14 = load i8, ptr getelementptr inbounds (i8, ptr @__const.test_curve25519_static.correct_res, i64 2), align 2, !tbaa !9
  %.not.2 = icmp eq i8 %13, %14
  br i1 %.not.2, label %15, label %131

15:                                               ; preds = %11
  %16 = getelementptr inbounds i8, ptr %1, i64 3
  %17 = load i8, ptr %16, align 1, !tbaa !9
  %18 = load i8, ptr getelementptr inbounds (i8, ptr @__const.test_curve25519_static.correct_res, i64 3), align 1, !tbaa !9
  %.not.3 = icmp eq i8 %17, %18
  br i1 %.not.3, label %19, label %131

19:                                               ; preds = %15
  %20 = getelementptr inbounds i8, ptr %1, i64 4
  %21 = load i8, ptr %20, align 4, !tbaa !9
  %22 = load i8, ptr getelementptr inbounds (i8, ptr @__const.test_curve25519_static.correct_res, i64 4), align 4, !tbaa !9
  %.not.4 = icmp eq i8 %21, %22
  br i1 %.not.4, label %23, label %131

23:                                               ; preds = %19
  %24 = getelementptr inbounds i8, ptr %1, i64 5
  %25 = load i8, ptr %24, align 1, !tbaa !9
  %26 = load i8, ptr getelementptr inbounds (i8, ptr @__const.test_curve25519_static.correct_res, i64 5), align 1, !tbaa !9
  %.not.5 = icmp eq i8 %25, %26
  br i1 %.not.5, label %27, label %131

27:                                               ; preds = %23
  %28 = getelementptr inbounds i8, ptr %1, i64 6
  %29 = load i8, ptr %28, align 2, !tbaa !9
  %30 = load i8, ptr getelementptr inbounds (i8, ptr @__const.test_curve25519_static.correct_res, i64 6), align 2, !tbaa !9
  %.not.6 = icmp eq i8 %29, %30
  br i1 %.not.6, label %31, label %131

31:                                               ; preds = %27
  %32 = getelementptr inbounds i8, ptr %1, i64 7
  %33 = load i8, ptr %32, align 1, !tbaa !9
  %34 = load i8, ptr getelementptr inbounds (i8, ptr @__const.test_curve25519_static.correct_res, i64 7), align 1, !tbaa !9
  %.not.7 = icmp eq i8 %33, %34
  br i1 %.not.7, label %35, label %131

35:                                               ; preds = %31
  %36 = getelementptr inbounds i8, ptr %1, i64 8
  %37 = load i8, ptr %36, align 8, !tbaa !9
  %38 = load i8, ptr getelementptr inbounds (i8, ptr @__const.test_curve25519_static.correct_res, i64 8), align 8, !tbaa !9
  %.not.8 = icmp eq i8 %37, %38
  br i1 %.not.8, label %39, label %131

39:                                               ; preds = %35
  %40 = getelementptr inbounds i8, ptr %1, i64 9
  %41 = load i8, ptr %40, align 1, !tbaa !9
  %42 = load i8, ptr getelementptr inbounds (i8, ptr @__const.test_curve25519_static.correct_res, i64 9), align 1, !tbaa !9
  %.not.9 = icmp eq i8 %41, %42
  br i1 %.not.9, label %43, label %131

43:                                               ; preds = %39
  %44 = getelementptr inbounds i8, ptr %1, i64 10
  %45 = load i8, ptr %44, align 2, !tbaa !9
  %46 = load i8, ptr getelementptr inbounds (i8, ptr @__const.test_curve25519_static.correct_res, i64 10), align 2, !tbaa !9
  %.not.10 = icmp eq i8 %45, %46
  br i1 %.not.10, label %47, label %131

47:                                               ; preds = %43
  %48 = getelementptr inbounds i8, ptr %1, i64 11
  %49 = load i8, ptr %48, align 1, !tbaa !9
  %50 = load i8, ptr getelementptr inbounds (i8, ptr @__const.test_curve25519_static.correct_res, i64 11), align 1, !tbaa !9
  %.not.11 = icmp eq i8 %49, %50
  br i1 %.not.11, label %51, label %131

51:                                               ; preds = %47
  %52 = getelementptr inbounds i8, ptr %1, i64 12
  %53 = load i8, ptr %52, align 4, !tbaa !9
  %54 = load i8, ptr getelementptr inbounds (i8, ptr @__const.test_curve25519_static.correct_res, i64 12), align 4, !tbaa !9
  %.not.12 = icmp eq i8 %53, %54
  br i1 %.not.12, label %55, label %131

55:                                               ; preds = %51
  %56 = getelementptr inbounds i8, ptr %1, i64 13
  %57 = load i8, ptr %56, align 1, !tbaa !9
  %58 = load i8, ptr getelementptr inbounds (i8, ptr @__const.test_curve25519_static.correct_res, i64 13), align 1, !tbaa !9
  %.not.13 = icmp eq i8 %57, %58
  br i1 %.not.13, label %59, label %131

59:                                               ; preds = %55
  %60 = getelementptr inbounds i8, ptr %1, i64 14
  %61 = load i8, ptr %60, align 2, !tbaa !9
  %62 = load i8, ptr getelementptr inbounds (i8, ptr @__const.test_curve25519_static.correct_res, i64 14), align 2, !tbaa !9
  %.not.14 = icmp eq i8 %61, %62
  br i1 %.not.14, label %63, label %131

63:                                               ; preds = %59
  %64 = getelementptr inbounds i8, ptr %1, i64 15
  %65 = load i8, ptr %64, align 1, !tbaa !9
  %66 = load i8, ptr getelementptr inbounds (i8, ptr @__const.test_curve25519_static.correct_res, i64 15), align 1, !tbaa !9
  %.not.15 = icmp eq i8 %65, %66
  br i1 %.not.15, label %67, label %131

67:                                               ; preds = %63
  %68 = getelementptr inbounds i8, ptr %1, i64 16
  %69 = load i8, ptr %68, align 16, !tbaa !9
  %70 = load i8, ptr getelementptr inbounds (i8, ptr @__const.test_curve25519_static.correct_res, i64 16), align 16, !tbaa !9
  %.not.16 = icmp eq i8 %69, %70
  br i1 %.not.16, label %71, label %131

71:                                               ; preds = %67
  %72 = getelementptr inbounds i8, ptr %1, i64 17
  %73 = load i8, ptr %72, align 1, !tbaa !9
  %74 = load i8, ptr getelementptr inbounds (i8, ptr @__const.test_curve25519_static.correct_res, i64 17), align 1, !tbaa !9
  %.not.17 = icmp eq i8 %73, %74
  br i1 %.not.17, label %75, label %131

75:                                               ; preds = %71
  %76 = getelementptr inbounds i8, ptr %1, i64 18
  %77 = load i8, ptr %76, align 2, !tbaa !9
  %78 = load i8, ptr getelementptr inbounds (i8, ptr @__const.test_curve25519_static.correct_res, i64 18), align 2, !tbaa !9
  %.not.18 = icmp eq i8 %77, %78
  br i1 %.not.18, label %79, label %131

79:                                               ; preds = %75
  %80 = getelementptr inbounds i8, ptr %1, i64 19
  %81 = load i8, ptr %80, align 1, !tbaa !9
  %82 = load i8, ptr getelementptr inbounds (i8, ptr @__const.test_curve25519_static.correct_res, i64 19), align 1, !tbaa !9
  %.not.19 = icmp eq i8 %81, %82
  br i1 %.not.19, label %83, label %131

83:                                               ; preds = %79
  %84 = getelementptr inbounds i8, ptr %1, i64 20
  %85 = load i8, ptr %84, align 4, !tbaa !9
  %86 = load i8, ptr getelementptr inbounds (i8, ptr @__const.test_curve25519_static.correct_res, i64 20), align 4, !tbaa !9
  %.not.20 = icmp eq i8 %85, %86
  br i1 %.not.20, label %87, label %131

87:                                               ; preds = %83
  %88 = getelementptr inbounds i8, ptr %1, i64 21
  %89 = load i8, ptr %88, align 1, !tbaa !9
  %90 = load i8, ptr getelementptr inbounds (i8, ptr @__const.test_curve25519_static.correct_res, i64 21), align 1, !tbaa !9
  %.not.21 = icmp eq i8 %89, %90
  br i1 %.not.21, label %91, label %131

91:                                               ; preds = %87
  %92 = getelementptr inbounds i8, ptr %1, i64 22
  %93 = load i8, ptr %92, align 2, !tbaa !9
  %94 = load i8, ptr getelementptr inbounds (i8, ptr @__const.test_curve25519_static.correct_res, i64 22), align 2, !tbaa !9
  %.not.22 = icmp eq i8 %93, %94
  br i1 %.not.22, label %95, label %131

95:                                               ; preds = %91
  %96 = getelementptr inbounds i8, ptr %1, i64 23
  %97 = load i8, ptr %96, align 1, !tbaa !9
  %98 = load i8, ptr getelementptr inbounds (i8, ptr @__const.test_curve25519_static.correct_res, i64 23), align 1, !tbaa !9
  %.not.23 = icmp eq i8 %97, %98
  br i1 %.not.23, label %99, label %131

99:                                               ; preds = %95
  %100 = getelementptr inbounds i8, ptr %1, i64 24
  %101 = load i8, ptr %100, align 8, !tbaa !9
  %102 = load i8, ptr getelementptr inbounds (i8, ptr @__const.test_curve25519_static.correct_res, i64 24), align 8, !tbaa !9
  %.not.24 = icmp eq i8 %101, %102
  br i1 %.not.24, label %103, label %131

103:                                              ; preds = %99
  %104 = getelementptr inbounds i8, ptr %1, i64 25
  %105 = load i8, ptr %104, align 1, !tbaa !9
  %106 = load i8, ptr getelementptr inbounds (i8, ptr @__const.test_curve25519_static.correct_res, i64 25), align 1, !tbaa !9
  %.not.25 = icmp eq i8 %105, %106
  br i1 %.not.25, label %107, label %131

107:                                              ; preds = %103
  %108 = getelementptr inbounds i8, ptr %1, i64 26
  %109 = load i8, ptr %108, align 2, !tbaa !9
  %110 = load i8, ptr getelementptr inbounds (i8, ptr @__const.test_curve25519_static.correct_res, i64 26), align 2, !tbaa !9
  %.not.26 = icmp eq i8 %109, %110
  br i1 %.not.26, label %111, label %131

111:                                              ; preds = %107
  %112 = getelementptr inbounds i8, ptr %1, i64 27
  %113 = load i8, ptr %112, align 1, !tbaa !9
  %114 = load i8, ptr getelementptr inbounds (i8, ptr @__const.test_curve25519_static.correct_res, i64 27), align 1, !tbaa !9
  %.not.27 = icmp eq i8 %113, %114
  br i1 %.not.27, label %115, label %131

115:                                              ; preds = %111
  %116 = getelementptr inbounds i8, ptr %1, i64 28
  %117 = load i8, ptr %116, align 4, !tbaa !9
  %118 = load i8, ptr getelementptr inbounds (i8, ptr @__const.test_curve25519_static.correct_res, i64 28), align 4, !tbaa !9
  %.not.28 = icmp eq i8 %117, %118
  br i1 %.not.28, label %119, label %131

119:                                              ; preds = %115
  %120 = getelementptr inbounds i8, ptr %1, i64 29
  %121 = load i8, ptr %120, align 1, !tbaa !9
  %122 = load i8, ptr getelementptr inbounds (i8, ptr @__const.test_curve25519_static.correct_res, i64 29), align 1, !tbaa !9
  %.not.29 = icmp eq i8 %121, %122
  br i1 %.not.29, label %123, label %131

123:                                              ; preds = %119
  %124 = getelementptr inbounds i8, ptr %1, i64 30
  %125 = load i8, ptr %124, align 2, !tbaa !9
  %126 = load i8, ptr getelementptr inbounds (i8, ptr @__const.test_curve25519_static.correct_res, i64 30), align 2, !tbaa !9
  %.not.30 = icmp eq i8 %125, %126
  br i1 %.not.30, label %127, label %131

127:                                              ; preds = %123
  %128 = getelementptr inbounds i8, ptr %1, i64 31
  %129 = load i8, ptr %128, align 1, !tbaa !9
  %130 = load i8, ptr getelementptr inbounds (i8, ptr @__const.test_curve25519_static.correct_res, i64 31), align 1, !tbaa !9
  %.not.31 = icmp eq i8 %129, %130
  br i1 %.not.31, label %.loopexit13, label %131

131:                                              ; preds = %127, %123, %119, %115, %111, %107, %103, %99, %95, %91, %87, %83, %79, %75, %71, %67, %63, %59, %55, %51, %47, %43, %39, %35, %31, %27, %23, %19, %15, %11, %7, %0
  %.0..0..0..0.1 = load volatile i32, ptr %2, align 4, !tbaa !5
  %132 = or i32 %.0..0..0..0.1, 1
  store volatile i32 %132, ptr %2, align 4, !tbaa !5
  br label %.loopexit13

.loopexit13:                                      ; preds = %127, %131
  %133 = call i32 @crypto_scalarmult_base_curve25519(ptr noundef nonnull %1) #3
  %.0..0..0..0.2 = load volatile i32, ptr %2, align 4, !tbaa !5
  %134 = or i32 %.0..0..0..0.2, %133
  store volatile i32 %134, ptr %2, align 4, !tbaa !5
  %135 = load i8, ptr %1, align 16, !tbaa !9
  %.not12 = icmp eq i8 %135, %6
  br i1 %.not12, label %136, label %260

136:                                              ; preds = %.loopexit13
  %137 = getelementptr inbounds i8, ptr %1, i64 1
  %138 = load i8, ptr %137, align 1, !tbaa !9
  %139 = load i8, ptr getelementptr inbounds (i8, ptr @__const.test_curve25519_static.correct_res, i64 1), align 1, !tbaa !9
  %.not12.1 = icmp eq i8 %138, %139
  br i1 %.not12.1, label %140, label %260

140:                                              ; preds = %136
  %141 = getelementptr inbounds i8, ptr %1, i64 2
  %142 = load i8, ptr %141, align 2, !tbaa !9
  %143 = load i8, ptr getelementptr inbounds (i8, ptr @__const.test_curve25519_static.correct_res, i64 2), align 2, !tbaa !9
  %.not12.2 = icmp eq i8 %142, %143
  br i1 %.not12.2, label %144, label %260

144:                                              ; preds = %140
  %145 = getelementptr inbounds i8, ptr %1, i64 3
  %146 = load i8, ptr %145, align 1, !tbaa !9
  %147 = load i8, ptr getelementptr inbounds (i8, ptr @__const.test_curve25519_static.correct_res, i64 3), align 1, !tbaa !9
  %.not12.3 = icmp eq i8 %146, %147
  br i1 %.not12.3, label %148, label %260

148:                                              ; preds = %144
  %149 = getelementptr inbounds i8, ptr %1, i64 4
  %150 = load i8, ptr %149, align 4, !tbaa !9
  %151 = load i8, ptr getelementptr inbounds (i8, ptr @__const.test_curve25519_static.correct_res, i64 4), align 4, !tbaa !9
  %.not12.4 = icmp eq i8 %150, %151
  br i1 %.not12.4, label %152, label %260

152:                                              ; preds = %148
  %153 = getelementptr inbounds i8, ptr %1, i64 5
  %154 = load i8, ptr %153, align 1, !tbaa !9
  %155 = load i8, ptr getelementptr inbounds (i8, ptr @__const.test_curve25519_static.correct_res, i64 5), align 1, !tbaa !9
  %.not12.5 = icmp eq i8 %154, %155
  br i1 %.not12.5, label %156, label %260

156:                                              ; preds = %152
  %157 = getelementptr inbounds i8, ptr %1, i64 6
  %158 = load i8, ptr %157, align 2, !tbaa !9
  %159 = load i8, ptr getelementptr inbounds (i8, ptr @__const.test_curve25519_static.correct_res, i64 6), align 2, !tbaa !9
  %.not12.6 = icmp eq i8 %158, %159
  br i1 %.not12.6, label %160, label %260

160:                                              ; preds = %156
  %161 = getelementptr inbounds i8, ptr %1, i64 7
  %162 = load i8, ptr %161, align 1, !tbaa !9
  %163 = load i8, ptr getelementptr inbounds (i8, ptr @__const.test_curve25519_static.correct_res, i64 7), align 1, !tbaa !9
  %.not12.7 = icmp eq i8 %162, %163
  br i1 %.not12.7, label %164, label %260

164:                                              ; preds = %160
  %165 = getelementptr inbounds i8, ptr %1, i64 8
  %166 = load i8, ptr %165, align 8, !tbaa !9
  %167 = load i8, ptr getelementptr inbounds (i8, ptr @__const.test_curve25519_static.correct_res, i64 8), align 8, !tbaa !9
  %.not12.8 = icmp eq i8 %166, %167
  br i1 %.not12.8, label %168, label %260

168:                                              ; preds = %164
  %169 = getelementptr inbounds i8, ptr %1, i64 9
  %170 = load i8, ptr %169, align 1, !tbaa !9
  %171 = load i8, ptr getelementptr inbounds (i8, ptr @__const.test_curve25519_static.correct_res, i64 9), align 1, !tbaa !9
  %.not12.9 = icmp eq i8 %170, %171
  br i1 %.not12.9, label %172, label %260

172:                                              ; preds = %168
  %173 = getelementptr inbounds i8, ptr %1, i64 10
  %174 = load i8, ptr %173, align 2, !tbaa !9
  %175 = load i8, ptr getelementptr inbounds (i8, ptr @__const.test_curve25519_static.correct_res, i64 10), align 2, !tbaa !9
  %.not12.10 = icmp eq i8 %174, %175
  br i1 %.not12.10, label %176, label %260

176:                                              ; preds = %172
  %177 = getelementptr inbounds i8, ptr %1, i64 11
  %178 = load i8, ptr %177, align 1, !tbaa !9
  %179 = load i8, ptr getelementptr inbounds (i8, ptr @__const.test_curve25519_static.correct_res, i64 11), align 1, !tbaa !9
  %.not12.11 = icmp eq i8 %178, %179
  br i1 %.not12.11, label %180, label %260

180:                                              ; preds = %176
  %181 = getelementptr inbounds i8, ptr %1, i64 12
  %182 = load i8, ptr %181, align 4, !tbaa !9
  %183 = load i8, ptr getelementptr inbounds (i8, ptr @__const.test_curve25519_static.correct_res, i64 12), align 4, !tbaa !9
  %.not12.12 = icmp eq i8 %182, %183
  br i1 %.not12.12, label %184, label %260

184:                                              ; preds = %180
  %185 = getelementptr inbounds i8, ptr %1, i64 13
  %186 = load i8, ptr %185, align 1, !tbaa !9
  %187 = load i8, ptr getelementptr inbounds (i8, ptr @__const.test_curve25519_static.correct_res, i64 13), align 1, !tbaa !9
  %.not12.13 = icmp eq i8 %186, %187
  br i1 %.not12.13, label %188, label %260

188:                                              ; preds = %184
  %189 = getelementptr inbounds i8, ptr %1, i64 14
  %190 = load i8, ptr %189, align 2, !tbaa !9
  %191 = load i8, ptr getelementptr inbounds (i8, ptr @__const.test_curve25519_static.correct_res, i64 14), align 2, !tbaa !9
  %.not12.14 = icmp eq i8 %190, %191
  br i1 %.not12.14, label %192, label %260

192:                                              ; preds = %188
  %193 = getelementptr inbounds i8, ptr %1, i64 15
  %194 = load i8, ptr %193, align 1, !tbaa !9
  %195 = load i8, ptr getelementptr inbounds (i8, ptr @__const.test_curve25519_static.correct_res, i64 15), align 1, !tbaa !9
  %.not12.15 = icmp eq i8 %194, %195
  br i1 %.not12.15, label %196, label %260

196:                                              ; preds = %192
  %197 = getelementptr inbounds i8, ptr %1, i64 16
  %198 = load i8, ptr %197, align 16, !tbaa !9
  %199 = load i8, ptr getelementptr inbounds (i8, ptr @__const.test_curve25519_static.correct_res, i64 16), align 16, !tbaa !9
  %.not12.16 = icmp eq i8 %198, %199
  br i1 %.not12.16, label %200, label %260

200:                                              ; preds = %196
  %201 = getelementptr inbounds i8, ptr %1, i64 17
  %202 = load i8, ptr %201, align 1, !tbaa !9
  %203 = load i8, ptr getelementptr inbounds (i8, ptr @__const.test_curve25519_static.correct_res, i64 17), align 1, !tbaa !9
  %.not12.17 = icmp eq i8 %202, %203
  br i1 %.not12.17, label %204, label %260

204:                                              ; preds = %200
  %205 = getelementptr inbounds i8, ptr %1, i64 18
  %206 = load i8, ptr %205, align 2, !tbaa !9
  %207 = load i8, ptr getelementptr inbounds (i8, ptr @__const.test_curve25519_static.correct_res, i64 18), align 2, !tbaa !9
  %.not12.18 = icmp eq i8 %206, %207
  br i1 %.not12.18, label %208, label %260

208:                                              ; preds = %204
  %209 = getelementptr inbounds i8, ptr %1, i64 19
  %210 = load i8, ptr %209, align 1, !tbaa !9
  %211 = load i8, ptr getelementptr inbounds (i8, ptr @__const.test_curve25519_static.correct_res, i64 19), align 1, !tbaa !9
  %.not12.19 = icmp eq i8 %210, %211
  br i1 %.not12.19, label %212, label %260

212:                                              ; preds = %208
  %213 = getelementptr inbounds i8, ptr %1, i64 20
  %214 = load i8, ptr %213, align 4, !tbaa !9
  %215 = load i8, ptr getelementptr inbounds (i8, ptr @__const.test_curve25519_static.correct_res, i64 20), align 4, !tbaa !9
  %.not12.20 = icmp eq i8 %214, %215
  br i1 %.not12.20, label %216, label %260

216:                                              ; preds = %212
  %217 = getelementptr inbounds i8, ptr %1, i64 21
  %218 = load i8, ptr %217, align 1, !tbaa !9
  %219 = load i8, ptr getelementptr inbounds (i8, ptr @__const.test_curve25519_static.correct_res, i64 21), align 1, !tbaa !9
  %.not12.21 = icmp eq i8 %218, %219
  br i1 %.not12.21, label %220, label %260

220:                                              ; preds = %216
  %221 = getelementptr inbounds i8, ptr %1, i64 22
  %222 = load i8, ptr %221, align 2, !tbaa !9
  %223 = load i8, ptr getelementptr inbounds (i8, ptr @__const.test_curve25519_static.correct_res, i64 22), align 2, !tbaa !9
  %.not12.22 = icmp eq i8 %222, %223
  br i1 %.not12.22, label %224, label %260

224:                                              ; preds = %220
  %225 = getelementptr inbounds i8, ptr %1, i64 23
  %226 = load i8, ptr %225, align 1, !tbaa !9
  %227 = load i8, ptr getelementptr inbounds (i8, ptr @__const.test_curve25519_static.correct_res, i64 23), align 1, !tbaa !9
  %.not12.23 = icmp eq i8 %226, %227
  br i1 %.not12.23, label %228, label %260

228:                                              ; preds = %224
  %229 = getelementptr inbounds i8, ptr %1, i64 24
  %230 = load i8, ptr %229, align 8, !tbaa !9
  %231 = load i8, ptr getelementptr inbounds (i8, ptr @__const.test_curve25519_static.correct_res, i64 24), align 8, !tbaa !9
  %.not12.24 = icmp eq i8 %230, %231
  br i1 %.not12.24, label %232, label %260

232:                                              ; preds = %228
  %233 = getelementptr inbounds i8, ptr %1, i64 25
  %234 = load i8, ptr %233, align 1, !tbaa !9
  %235 = load i8, ptr getelementptr inbounds (i8, ptr @__const.test_curve25519_static.correct_res, i64 25), align 1, !tbaa !9
  %.not12.25 = icmp eq i8 %234, %235
  br i1 %.not12.25, label %236, label %260

236:                                              ; preds = %232
  %237 = getelementptr inbounds i8, ptr %1, i64 26
  %238 = load i8, ptr %237, align 2, !tbaa !9
  %239 = load i8, ptr getelementptr inbounds (i8, ptr @__const.test_curve25519_static.correct_res, i64 26), align 2, !tbaa !9
  %.not12.26 = icmp eq i8 %238, %239
  br i1 %.not12.26, label %240, label %260

240:                                              ; preds = %236
  %241 = getelementptr inbounds i8, ptr %1, i64 27
  %242 = load i8, ptr %241, align 1, !tbaa !9
  %243 = load i8, ptr getelementptr inbounds (i8, ptr @__const.test_curve25519_static.correct_res, i64 27), align 1, !tbaa !9
  %.not12.27 = icmp eq i8 %242, %243
  br i1 %.not12.27, label %244, label %260

244:                                              ; preds = %240
  %245 = getelementptr inbounds i8, ptr %1, i64 28
  %246 = load i8, ptr %245, align 4, !tbaa !9
  %247 = load i8, ptr getelementptr inbounds (i8, ptr @__const.test_curve25519_static.correct_res, i64 28), align 4, !tbaa !9
  %.not12.28 = icmp eq i8 %246, %247
  br i1 %.not12.28, label %248, label %260

248:                                              ; preds = %244
  %249 = getelementptr inbounds i8, ptr %1, i64 29
  %250 = load i8, ptr %249, align 1, !tbaa !9
  %251 = load i8, ptr getelementptr inbounds (i8, ptr @__const.test_curve25519_static.correct_res, i64 29), align 1, !tbaa !9
  %.not12.29 = icmp eq i8 %250, %251
  br i1 %.not12.29, label %252, label %260

252:                                              ; preds = %248
  %253 = getelementptr inbounds i8, ptr %1, i64 30
  %254 = load i8, ptr %253, align 2, !tbaa !9
  %255 = load i8, ptr getelementptr inbounds (i8, ptr @__const.test_curve25519_static.correct_res, i64 30), align 2, !tbaa !9
  %.not12.30 = icmp eq i8 %254, %255
  br i1 %.not12.30, label %256, label %260

256:                                              ; preds = %252
  %257 = getelementptr inbounds i8, ptr %1, i64 31
  %258 = load i8, ptr %257, align 1, !tbaa !9
  %259 = load i8, ptr getelementptr inbounds (i8, ptr @__const.test_curve25519_static.correct_res, i64 31), align 1, !tbaa !9
  %.not12.31 = icmp eq i8 %258, %259
  br i1 %.not12.31, label %.loopexit, label %260

260:                                              ; preds = %256, %252, %248, %244, %240, %236, %232, %228, %224, %220, %216, %212, %208, %204, %200, %196, %192, %188, %184, %180, %176, %172, %168, %164, %160, %156, %152, %148, %144, %140, %136, %.loopexit13
  %.0..0..0..0.3 = load volatile i32, ptr %2, align 4, !tbaa !5
  %261 = or i32 %.0..0..0..0.3, 2
  store volatile i32 %261, ptr %2, align 4, !tbaa !5
  br label %.loopexit

.loopexit:                                        ; preds = %256, %260
  %.0..0..0..0.4 = load volatile i32, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2)
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %1) #3
  ret i32 %.0..0..0..0.4
}

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

declare i32 @crypto_scalarmult_base_curve25519(ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress 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 = { mustprogress 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 = !{!7, !7, i64 0}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,SROAPass,SimplifyCFGPass