; LLVM IR from trustwallet/wallet-core :: trezor-crypto/crypto/sodium/private (ed25519_ref10)

; 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.ge25519_has_small_order.blacklist = external hidden unnamed_addr constant <{ [32 x i8], <{ i8, [31 x i8] }>, [32 x i8], [32 x i8], [32 x i8], [32 x i8], [32 x i8] }>, align 16

; 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: 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) #1

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

8:                                                ; preds = %38, %1
  %9 = load i64, ptr %7, align 8, !tbaa !9
  %10 = icmp ult i64 %9, 31
  br i1 %10, label %11, label %41

11:                                               ; preds = %8
  store i64 0, ptr %6, align 8, !tbaa !9
  br label %12

12:                                               ; preds = %34, %11
  %13 = load i64, ptr %6, align 8, !tbaa !9
  %14 = icmp ult i64 %13, 7
  br i1 %14, label %15, label %37

15:                                               ; preds = %12
  %16 = load ptr, ptr %2, align 8, !tbaa !5
  %17 = load i64, ptr %7, align 8, !tbaa !9
  %18 = getelementptr inbounds i8, ptr %16, i64 %17
  %19 = load i8, ptr %18, align 1, !tbaa !11
  %20 = zext i8 %19 to i32
  %21 = load i64, ptr %6, align 8, !tbaa !9
  %22 = getelementptr inbounds [7 x [32 x i8]], ptr %3, i64 0, i64 %21
  %23 = load i64, ptr %7, align 8, !tbaa !9
  %24 = getelementptr inbounds [32 x i8], ptr %22, i64 0, i64 %23
  %25 = load i8, ptr %24, align 1, !tbaa !11
  %26 = zext i8 %25 to i32
  %27 = xor i32 %20, %26
  %28 = load i64, ptr %6, align 8, !tbaa !9
  %29 = getelementptr inbounds [7 x i8], ptr %4, i64 0, i64 %28
  %30 = load i8, ptr %29, align 1, !tbaa !11
  %31 = zext i8 %30 to i32
  %32 = or i32 %31, %27
  %33 = trunc i32 %32 to i8
  store i8 %33, ptr %29, align 1, !tbaa !11
  br label %34

34:                                               ; preds = %15
  %35 = load i64, ptr %6, align 8, !tbaa !9
  %36 = add i64 %35, 1
  store i64 %36, ptr %6, align 8, !tbaa !9
  br label %12, !llvm.loop !12

37:                                               ; preds = %12
  br label %38

38:                                               ; preds = %37
  %39 = load i64, ptr %7, align 8, !tbaa !9
  %40 = add i64 %39, 1
  store i64 %40, ptr %7, align 8, !tbaa !9
  br label %8, !llvm.loop !14

41:                                               ; preds = %8
  store i64 0, ptr %6, align 8, !tbaa !9
  br label %42

42:                                               ; preds = %65, %41
  %43 = load i64, ptr %6, align 8, !tbaa !9
  %44 = icmp ult i64 %43, 7
  br i1 %44, label %45, label %68

45:                                               ; preds = %42
  %46 = load ptr, ptr %2, align 8, !tbaa !5
  %47 = load i64, ptr %7, align 8, !tbaa !9
  %48 = getelementptr inbounds i8, ptr %46, i64 %47
  %49 = load i8, ptr %48, align 1, !tbaa !11
  %50 = zext i8 %49 to i32
  %51 = and i32 %50, 127
  %52 = load i64, ptr %6, align 8, !tbaa !9
  %53 = getelementptr inbounds [7 x [32 x i8]], ptr %3, i64 0, i64 %52
  %54 = load i64, ptr %7, align 8, !tbaa !9
  %55 = getelementptr inbounds [32 x i8], ptr %53, i64 0, i64 %54
  %56 = load i8, ptr %55, align 1, !tbaa !11
  %57 = zext i8 %56 to i32
  %58 = xor i32 %51, %57
  %59 = load i64, ptr %6, align 8, !tbaa !9
  %60 = getelementptr inbounds [7 x i8], ptr %4, i64 0, i64 %59
  %61 = load i8, ptr %60, align 1, !tbaa !11
  %62 = zext i8 %61 to i32
  %63 = or i32 %62, %58
  %64 = trunc i32 %63 to i8
  store i8 %64, ptr %60, align 1, !tbaa !11
  br label %65

65:                                               ; preds = %45
  %66 = load i64, ptr %6, align 8, !tbaa !9
  %67 = add i64 %66, 1
  store i64 %67, ptr %6, align 8, !tbaa !9
  br label %42, !llvm.loop !15

68:                                               ; preds = %42
  store i32 0, ptr %5, align 4, !tbaa !16
  store i64 0, ptr %6, align 8, !tbaa !9
  br label %69

69:                                               ; preds = %80, %68
  %70 = load i64, ptr %6, align 8, !tbaa !9
  %71 = icmp ult i64 %70, 7
  br i1 %71, label %72, label %83

72:                                               ; preds = %69
  %73 = load i64, ptr %6, align 8, !tbaa !9
  %74 = getelementptr inbounds [7 x i8], ptr %4, i64 0, i64 %73
  %75 = load i8, ptr %74, align 1, !tbaa !11
  %76 = zext i8 %75 to i32
  %77 = sub nsw i32 %76, 1
  %78 = load i32, ptr %5, align 4, !tbaa !16
  %79 = or i32 %78, %77
  store i32 %79, ptr %5, align 4, !tbaa !16
  br label %80

80:                                               ; preds = %72
  %81 = load i64, ptr %6, align 8, !tbaa !9
  %82 = add i64 %81, 1
  store i64 %82, ptr %6, align 8, !tbaa !9
  br label %69, !llvm.loop !18

83:                                               ; preds = %69
  %84 = load i32, ptr %5, align 4, !tbaa !16
  %85 = lshr i32 %84, 8
  %86 = and i32 %85, 1
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 7, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 224, ptr %3) #4
  ret i32 %86
}

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

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

@__const.ge25519_has_small_order.blacklist = external hidden unnamed_addr constant <{ [32 x i8], <{ i8, [31 x i8] }>, [32 x i8], [32 x i8], [32 x i8], [32 x i8], [32 x i8] }>, align 16

; Function Attrs: nofree norecurse nosync nounwind memory(argmem: read) uwtable
define dso_local range(i32 0, 2) i32 @ge25519_has_small_order(ptr nocapture noundef readonly %0) local_unnamed_addr #0 {
vector.ph:
  %wide.load82 = load <4 x i8>, ptr getelementptr inbounds (i8, ptr @__const.ge25519_has_small_order.blacklist, i64 192), align 16, !tbaa !5
  %wide.load = load <4 x i8>, ptr %0, align 1, !tbaa !5
  %1 = xor <4 x i8> %wide.load82, %wide.load
  %wide.load82.1 = load <4 x i8>, ptr getelementptr inbounds (i8, ptr @__const.ge25519_has_small_order.blacklist, i64 196), align 4, !tbaa !5
  %2 = getelementptr inbounds i8, ptr %0, i64 4
  %wide.load.1 = load <4 x i8>, ptr %2, align 1, !tbaa !5
  %3 = xor <4 x i8> %wide.load82.1, %wide.load.1
  %4 = or <4 x i8> %1, %3
  %wide.load82.2 = load <4 x i8>, ptr getelementptr inbounds (i8, ptr @__const.ge25519_has_small_order.blacklist, i64 200), align 8, !tbaa !5
  %5 = getelementptr inbounds i8, ptr %0, i64 8
  %wide.load.2 = load <4 x i8>, ptr %5, align 1, !tbaa !5
  %6 = xor <4 x i8> %wide.load82.2, %wide.load.2
  %7 = or <4 x i8> %4, %6
  %wide.load82.3 = load <4 x i8>, ptr getelementptr inbounds (i8, ptr @__const.ge25519_has_small_order.blacklist, i64 204), align 4, !tbaa !5
  %8 = getelementptr inbounds i8, ptr %0, i64 12
  %wide.load.3 = load <4 x i8>, ptr %8, align 1, !tbaa !5
  %9 = xor <4 x i8> %wide.load82.3, %wide.load.3
  %10 = or <4 x i8> %7, %9
  %wide.load82.4 = load <4 x i8>, ptr getelementptr inbounds (i8, ptr @__const.ge25519_has_small_order.blacklist, i64 208), align 16, !tbaa !5
  %11 = getelementptr inbounds i8, ptr %0, i64 16
  %wide.load.4 = load <4 x i8>, ptr %11, align 1, !tbaa !5
  %12 = xor <4 x i8> %wide.load82.4, %wide.load.4
  %13 = or <4 x i8> %10, %12
  %wide.load82.5 = load <4 x i8>, ptr getelementptr inbounds (i8, ptr @__const.ge25519_has_small_order.blacklist, i64 212), align 4, !tbaa !5
  %14 = getelementptr inbounds i8, ptr %0, i64 20
  %wide.load.5 = load <4 x i8>, ptr %14, align 1, !tbaa !5
  %15 = xor <4 x i8> %wide.load82.5, %wide.load.5
  %16 = or <4 x i8> %13, %15
  %wide.load82.6 = load <4 x i8>, ptr getelementptr inbounds (i8, ptr @__const.ge25519_has_small_order.blacklist, i64 216), align 8, !tbaa !5
  %17 = getelementptr inbounds i8, ptr %0, i64 24
  %wide.load.6 = load <4 x i8>, ptr %17, align 1, !tbaa !5
  %18 = xor <4 x i8> %wide.load82.6, %wide.load.6
  %19 = or <4 x i8> %16, %18
  %20 = tail call i8 @llvm.vector.reduce.or.v4i8(<4 x i8> %19)
  %wide.load81 = load <4 x i8>, ptr getelementptr inbounds (i8, ptr @__const.ge25519_has_small_order.blacklist, i64 160), align 16, !tbaa !5
  %21 = xor <4 x i8> %wide.load81, %wide.load
  %wide.load81.1 = load <4 x i8>, ptr getelementptr inbounds (i8, ptr @__const.ge25519_has_small_order.blacklist, i64 164), align 4, !tbaa !5
  %22 = xor <4 x i8> %wide.load81.1, %wide.load.1
  %23 = or <4 x i8> %21, %22
  %wide.load81.2 = load <4 x i8>, ptr getelementptr inbounds (i8, ptr @__const.ge25519_has_small_order.blacklist, i64 168), align 8, !tbaa !5
  %24 = xor <4 x i8> %wide.load81.2, %wide.load.2
  %25 = or <4 x i8> %23, %24
  %wide.load81.3 = load <4 x i8>, ptr getelementptr inbounds (i8, ptr @__const.ge25519_has_small_order.blacklist, i64 172), align 4, !tbaa !5
  %26 = xor <4 x i8> %wide.load81.3, %wide.load.3
  %27 = or <4 x i8> %25, %26
  %wide.load81.4 = load <4 x i8>, ptr getelementptr inbounds (i8, ptr @__const.ge25519_has_small_order.blacklist, i64 176), align 16, !tbaa !5
  %28 = xor <4 x i8> %wide.load81.4, %wide.load.4
  %29 = or <4 x i8> %27, %28
  %wide.load81.5 = load <4 x i8>, ptr getelementptr inbounds (i8, ptr @__const.ge25519_has_small_order.blacklist, i64 180), align 4, !tbaa !5
  %30 = xor <4 x i8> %wide.load81.5, %wide.load.5
  %31 = or <4 x i8> %29, %30
  %wide.load81.6 = load <4 x i8>, ptr getelementptr inbounds (i8, ptr @__const.ge25519_has_small_order.blacklist, i64 184), align 8, !tbaa !5
  %32 = xor <4 x i8> %wide.load81.6, %wide.load.6
  %33 = or <4 x i8> %31, %32
  %34 = tail call i8 @llvm.vector.reduce.or.v4i8(<4 x i8> %33)
  %wide.load80 = load <4 x i8>, ptr getelementptr inbounds (i8, ptr @__const.ge25519_has_small_order.blacklist, i64 128), align 16, !tbaa !5
  %35 = xor <4 x i8> %wide.load80, %wide.load
  %wide.load80.1 = load <4 x i8>, ptr getelementptr inbounds (i8, ptr @__const.ge25519_has_small_order.blacklist, i64 132), align 4, !tbaa !5
  %36 = xor <4 x i8> %wide.load80.1, %wide.load.1
  %37 = or <4 x i8> %35, %36
  %wide.load80.2 = load <4 x i8>, ptr getelementptr inbounds (i8, ptr @__const.ge25519_has_small_order.blacklist, i64 136), align 8, !tbaa !5
  %38 = xor <4 x i8> %wide.load80.2, %wide.load.2
  %39 = or <4 x i8> %37, %38
  %wide.load80.3 = load <4 x i8>, ptr getelementptr inbounds (i8, ptr @__const.ge25519_has_small_order.blacklist, i64 140), align 4, !tbaa !5
  %40 = xor <4 x i8> %wide.load80.3, %wide.load.3
  %41 = or <4 x i8> %39, %40
  %wide.load80.4 = load <4 x i8>, ptr getelementptr inbounds (i8, ptr @__const.ge25519_has_small_order.blacklist, i64 144), align 16, !tbaa !5
  %42 = xor <4 x i8> %wide.load80.4, %wide.load.4
  %43 = or <4 x i8> %41, %42
  %wide.load80.5 = load <4 x i8>, ptr getelementptr inbounds (i8, ptr @__const.ge25519_has_small_order.blacklist, i64 148), align 4, !tbaa !5
  %44 = xor <4 x i8> %wide.load80.5, %wide.load.5
  %45 = or <4 x i8> %43, %44
  %wide.load80.6 = load <4 x i8>, ptr getelementptr inbounds (i8, ptr @__const.ge25519_has_small_order.blacklist, i64 152), align 8, !tbaa !5
  %46 = xor <4 x i8> %wide.load80.6, %wide.load.6
  %47 = or <4 x i8> %45, %46
  %48 = tail call i8 @llvm.vector.reduce.or.v4i8(<4 x i8> %47)
  %wide.load79 = load <4 x i8>, ptr getelementptr inbounds (i8, ptr @__const.ge25519_has_small_order.blacklist, i64 96), align 16, !tbaa !5
  %49 = xor <4 x i8> %wide.load79, %wide.load
  %wide.load79.1 = load <4 x i8>, ptr getelementptr inbounds (i8, ptr @__const.ge25519_has_small_order.blacklist, i64 100), align 4, !tbaa !5
  %50 = xor <4 x i8> %wide.load79.1, %wide.load.1
  %51 = or <4 x i8> %49, %50
  %wide.load79.2 = load <4 x i8>, ptr getelementptr inbounds (i8, ptr @__const.ge25519_has_small_order.blacklist, i64 104), align 8, !tbaa !5
  %52 = xor <4 x i8> %wide.load79.2, %wide.load.2
  %53 = or <4 x i8> %51, %52
  %wide.load79.3 = load <4 x i8>, ptr getelementptr inbounds (i8, ptr @__const.ge25519_has_small_order.blacklist, i64 108), align 4, !tbaa !5
  %54 = xor <4 x i8> %wide.load79.3, %wide.load.3
  %55 = or <4 x i8> %53, %54
  %wide.load79.4 = load <4 x i8>, ptr getelementptr inbounds (i8, ptr @__const.ge25519_has_small_order.blacklist, i64 112), align 16, !tbaa !5
  %56 = xor <4 x i8> %wide.load79.4, %wide.load.4
  %57 = or <4 x i8> %55, %56
  %wide.load79.5 = load <4 x i8>, ptr getelementptr inbounds (i8, ptr @__const.ge25519_has_small_order.blacklist, i64 116), align 4, !tbaa !5
  %58 = xor <4 x i8> %wide.load79.5, %wide.load.5
  %59 = or <4 x i8> %57, %58
  %wide.load79.6 = load <4 x i8>, ptr getelementptr inbounds (i8, ptr @__const.ge25519_has_small_order.blacklist, i64 120), align 8, !tbaa !5
  %60 = xor <4 x i8> %wide.load79.6, %wide.load.6
  %61 = or <4 x i8> %59, %60
  %62 = tail call i8 @llvm.vector.reduce.or.v4i8(<4 x i8> %61)
  %wide.load78 = load <4 x i8>, ptr getelementptr inbounds (i8, ptr @__const.ge25519_has_small_order.blacklist, i64 64), align 16, !tbaa !5
  %63 = xor <4 x i8> %wide.load78, %wide.load
  %wide.load78.1 = load <4 x i8>, ptr getelementptr inbounds (i8, ptr @__const.ge25519_has_small_order.blacklist, i64 68), align 4, !tbaa !5
  %64 = xor <4 x i8> %wide.load78.1, %wide.load.1
  %65 = or <4 x i8> %63, %64
  %wide.load78.2 = load <4 x i8>, ptr getelementptr inbounds (i8, ptr @__const.ge25519_has_small_order.blacklist, i64 72), align 8, !tbaa !5
  %66 = xor <4 x i8> %wide.load78.2, %wide.load.2
  %67 = or <4 x i8> %65, %66
  %wide.load78.3 = load <4 x i8>, ptr getelementptr inbounds (i8, ptr @__const.ge25519_has_small_order.blacklist, i64 76), align 4, !tbaa !5
  %68 = xor <4 x i8> %wide.load78.3, %wide.load.3
  %69 = or <4 x i8> %67, %68
  %wide.load78.4 = load <4 x i8>, ptr getelementptr inbounds (i8, ptr @__const.ge25519_has_small_order.blacklist, i64 80), align 16, !tbaa !5
  %70 = xor <4 x i8> %wide.load78.4, %wide.load.4
  %71 = or <4 x i8> %69, %70
  %wide.load78.5 = load <4 x i8>, ptr getelementptr inbounds (i8, ptr @__const.ge25519_has_small_order.blacklist, i64 84), align 4, !tbaa !5
  %72 = xor <4 x i8> %wide.load78.5, %wide.load.5
  %73 = or <4 x i8> %71, %72
  %wide.load78.6 = load <4 x i8>, ptr getelementptr inbounds (i8, ptr @__const.ge25519_has_small_order.blacklist, i64 88), align 8, !tbaa !5
  %74 = xor <4 x i8> %wide.load78.6, %wide.load.6
  %75 = or <4 x i8> %73, %74
  %76 = tail call i8 @llvm.vector.reduce.or.v4i8(<4 x i8> %75)
  %wide.load77 = load <4 x i8>, ptr getelementptr inbounds (i8, ptr @__const.ge25519_has_small_order.blacklist, i64 32), align 16, !tbaa !5
  %77 = xor <4 x i8> %wide.load77, %wide.load
  %wide.load77.1 = load <4 x i8>, ptr getelementptr inbounds (i8, ptr @__const.ge25519_has_small_order.blacklist, i64 36), align 4, !tbaa !5
  %78 = xor <4 x i8> %wide.load77.1, %wide.load.1
  %79 = or <4 x i8> %77, %78
  %wide.load77.2 = load <4 x i8>, ptr getelementptr inbounds (i8, ptr @__const.ge25519_has_small_order.blacklist, i64 40), align 8, !tbaa !5
  %80 = xor <4 x i8> %wide.load77.2, %wide.load.2
  %81 = or <4 x i8> %79, %80
  %wide.load77.3 = load <4 x i8>, ptr getelementptr inbounds (i8, ptr @__const.ge25519_has_small_order.blacklist, i64 44), align 4, !tbaa !5
  %82 = xor <4 x i8> %wide.load77.3, %wide.load.3
  %83 = or <4 x i8> %81, %82
  %wide.load77.4 = load <4 x i8>, ptr getelementptr inbounds (i8, ptr @__const.ge25519_has_small_order.blacklist, i64 48), align 16, !tbaa !5
  %84 = xor <4 x i8> %wide.load77.4, %wide.load.4
  %85 = or <4 x i8> %83, %84
  %wide.load77.5 = load <4 x i8>, ptr getelementptr inbounds (i8, ptr @__const.ge25519_has_small_order.blacklist, i64 52), align 4, !tbaa !5
  %86 = xor <4 x i8> %wide.load77.5, %wide.load.5
  %87 = or <4 x i8> %85, %86
  %wide.load77.6 = load <4 x i8>, ptr getelementptr inbounds (i8, ptr @__const.ge25519_has_small_order.blacklist, i64 56), align 8, !tbaa !5
  %88 = xor <4 x i8> %wide.load77.6, %wide.load.6
  %89 = or <4 x i8> %87, %88
  %90 = tail call i8 @llvm.vector.reduce.or.v4i8(<4 x i8> %89)
  %wide.load76 = load <4 x i8>, ptr @__const.ge25519_has_small_order.blacklist, align 16, !tbaa !5
  %91 = xor <4 x i8> %wide.load76, %wide.load
  %wide.load76.1 = load <4 x i8>, ptr getelementptr inbounds (i8, ptr @__const.ge25519_has_small_order.blacklist, i64 4), align 4, !tbaa !5
  %92 = xor <4 x i8> %wide.load76.1, %wide.load.1
  %93 = or <4 x i8> %91, %92
  %wide.load76.2 = load <4 x i8>, ptr getelementptr inbounds (i8, ptr @__const.ge25519_has_small_order.blacklist, i64 8), align 8, !tbaa !5
  %94 = xor <4 x i8> %wide.load76.2, %wide.load.2
  %95 = or <4 x i8> %93, %94
  %wide.load76.3 = load <4 x i8>, ptr getelementptr inbounds (i8, ptr @__const.ge25519_has_small_order.blacklist, i64 12), align 4, !tbaa !5
  %96 = xor <4 x i8> %wide.load76.3, %wide.load.3
  %97 = or <4 x i8> %95, %96
  %wide.load76.4 = load <4 x i8>, ptr getelementptr inbounds (i8, ptr @__const.ge25519_has_small_order.blacklist, i64 16), align 16, !tbaa !5
  %98 = xor <4 x i8> %wide.load76.4, %wide.load.4
  %99 = or <4 x i8> %97, %98
  %wide.load76.5 = load <4 x i8>, ptr getelementptr inbounds (i8, ptr @__const.ge25519_has_small_order.blacklist, i64 20), align 4, !tbaa !5
  %100 = xor <4 x i8> %wide.load76.5, %wide.load.5
  %101 = or <4 x i8> %99, %100
  %wide.load76.6 = load <4 x i8>, ptr getelementptr inbounds (i8, ptr @__const.ge25519_has_small_order.blacklist, i64 24), align 8, !tbaa !5
  %102 = xor <4 x i8> %wide.load76.6, %wide.load.6
  %103 = or <4 x i8> %101, %102
  %104 = tail call i8 @llvm.vector.reduce.or.v4i8(<4 x i8> %103)
  %105 = getelementptr inbounds i8, ptr %0, i64 28
  %106 = load i8, ptr %105, align 1, !tbaa !5
  %107 = load i8, ptr getelementptr inbounds (i8, ptr @__const.ge25519_has_small_order.blacklist, i64 28), align 4, !tbaa !5
  %108 = xor i8 %107, %106
  %109 = or i8 %104, %108
  %110 = load i8, ptr getelementptr inbounds (i8, ptr @__const.ge25519_has_small_order.blacklist, i64 60), align 4, !tbaa !5
  %111 = xor i8 %110, %106
  %112 = or i8 %90, %111
  %113 = load i8, ptr getelementptr inbounds (i8, ptr @__const.ge25519_has_small_order.blacklist, i64 92), align 4, !tbaa !5
  %114 = xor i8 %113, %106
  %115 = or i8 %76, %114
  %116 = load i8, ptr getelementptr inbounds (i8, ptr @__const.ge25519_has_small_order.blacklist, i64 124), align 4, !tbaa !5
  %117 = xor i8 %116, %106
  %118 = or i8 %62, %117
  %119 = load i8, ptr getelementptr inbounds (i8, ptr @__const.ge25519_has_small_order.blacklist, i64 156), align 4, !tbaa !5
  %120 = xor i8 %119, %106
  %121 = or i8 %48, %120
  %122 = load i8, ptr getelementptr inbounds (i8, ptr @__const.ge25519_has_small_order.blacklist, i64 188), align 4, !tbaa !5
  %123 = xor i8 %122, %106
  %124 = or i8 %34, %123
  %125 = load i8, ptr getelementptr inbounds (i8, ptr @__const.ge25519_has_small_order.blacklist, i64 220), align 4, !tbaa !5
  %126 = xor i8 %125, %106
  %127 = or i8 %20, %126
  %128 = getelementptr inbounds i8, ptr %0, i64 29
  %129 = load i8, ptr %128, align 1, !tbaa !5
  %130 = load i8, ptr getelementptr inbounds (i8, ptr @__const.ge25519_has_small_order.blacklist, i64 29), align 1, !tbaa !5
  %131 = xor i8 %130, %129
  %132 = or i8 %109, %131
  %133 = load i8, ptr getelementptr inbounds (i8, ptr @__const.ge25519_has_small_order.blacklist, i64 61), align 1, !tbaa !5
  %134 = xor i8 %133, %129
  %135 = or i8 %112, %134
  %136 = load i8, ptr getelementptr inbounds (i8, ptr @__const.ge25519_has_small_order.blacklist, i64 93), align 1, !tbaa !5
  %137 = xor i8 %136, %129
  %138 = or i8 %115, %137
  %139 = load i8, ptr getelementptr inbounds (i8, ptr @__const.ge25519_has_small_order.blacklist, i64 125), align 1, !tbaa !5
  %140 = xor i8 %139, %129
  %141 = or i8 %118, %140
  %142 = load i8, ptr getelementptr inbounds (i8, ptr @__const.ge25519_has_small_order.blacklist, i64 157), align 1, !tbaa !5
  %143 = xor i8 %142, %129
  %144 = or i8 %121, %143
  %145 = load i8, ptr getelementptr inbounds (i8, ptr @__const.ge25519_has_small_order.blacklist, i64 189), align 1, !tbaa !5
  %146 = xor i8 %145, %129
  %147 = or i8 %124, %146
  %148 = load i8, ptr getelementptr inbounds (i8, ptr @__const.ge25519_has_small_order.blacklist, i64 221), align 1, !tbaa !5
  %149 = xor i8 %148, %129
  %150 = or i8 %127, %149
  %151 = getelementptr inbounds i8, ptr %0, i64 30
  %152 = load i8, ptr %151, align 1, !tbaa !5
  %153 = load i8, ptr getelementptr inbounds (i8, ptr @__const.ge25519_has_small_order.blacklist, i64 30), align 2, !tbaa !5
  %154 = xor i8 %153, %152
  %155 = or i8 %132, %154
  %156 = load i8, ptr getelementptr inbounds (i8, ptr @__const.ge25519_has_small_order.blacklist, i64 62), align 2, !tbaa !5
  %157 = xor i8 %156, %152
  %158 = or i8 %135, %157
  %159 = load i8, ptr getelementptr inbounds (i8, ptr @__const.ge25519_has_small_order.blacklist, i64 94), align 2, !tbaa !5
  %160 = xor i8 %159, %152
  %161 = or i8 %138, %160
  %162 = load i8, ptr getelementptr inbounds (i8, ptr @__const.ge25519_has_small_order.blacklist, i64 126), align 2, !tbaa !5
  %163 = xor i8 %162, %152
  %164 = or i8 %141, %163
  %165 = load i8, ptr getelementptr inbounds (i8, ptr @__const.ge25519_has_small_order.blacklist, i64 158), align 2, !tbaa !5
  %166 = xor i8 %165, %152
  %167 = or i8 %144, %166
  %168 = load i8, ptr getelementptr inbounds (i8, ptr @__const.ge25519_has_small_order.blacklist, i64 190), align 2, !tbaa !5
  %169 = xor i8 %168, %152
  %170 = or i8 %147, %169
  %171 = load i8, ptr getelementptr inbounds (i8, ptr @__const.ge25519_has_small_order.blacklist, i64 222), align 2, !tbaa !5
  %172 = xor i8 %171, %152
  %173 = or i8 %150, %172
  %174 = getelementptr inbounds i8, ptr %0, i64 31
  %175 = load i8, ptr %174, align 1, !tbaa !5
  %176 = and i8 %175, 127
  %177 = load i8, ptr getelementptr inbounds (i8, ptr @__const.ge25519_has_small_order.blacklist, i64 31), align 1, !tbaa !5
  %178 = xor i8 %176, %177
  %179 = or i8 %155, %178
  %180 = load i8, ptr getelementptr inbounds (i8, ptr @__const.ge25519_has_small_order.blacklist, i64 63), align 1, !tbaa !5
  %181 = xor i8 %176, %180
  %182 = or i8 %158, %181
  %183 = load i8, ptr getelementptr inbounds (i8, ptr @__const.ge25519_has_small_order.blacklist, i64 95), align 1, !tbaa !5
  %184 = xor i8 %176, %183
  %185 = or i8 %161, %184
  %186 = load i8, ptr getelementptr inbounds (i8, ptr @__const.ge25519_has_small_order.blacklist, i64 127), align 1, !tbaa !5
  %187 = xor i8 %176, %186
  %188 = or i8 %164, %187
  %189 = load i8, ptr getelementptr inbounds (i8, ptr @__const.ge25519_has_small_order.blacklist, i64 159), align 1, !tbaa !5
  %190 = xor i8 %176, %189
  %191 = or i8 %167, %190
  %192 = load i8, ptr getelementptr inbounds (i8, ptr @__const.ge25519_has_small_order.blacklist, i64 191), align 1, !tbaa !5
  %193 = xor i8 %176, %192
  %194 = or i8 %170, %193
  %195 = load i8, ptr getelementptr inbounds (i8, ptr @__const.ge25519_has_small_order.blacklist, i64 223), align 1, !tbaa !5
  %196 = xor i8 %176, %195
  %197 = or i8 %173, %196
  %198 = zext i8 %179 to i32
  %199 = add nsw i32 %198, -1
  %200 = zext i8 %182 to i32
  %201 = add nsw i32 %200, -1
  %202 = or i32 %201, %199
  %203 = zext i8 %185 to i32
  %204 = add nsw i32 %203, -1
  %205 = or i32 %204, %202
  %206 = zext i8 %188 to i32
  %207 = add nsw i32 %206, -1
  %208 = or i32 %207, %205
  %209 = zext i8 %191 to i32
  %210 = add nuw nsw i32 %209, 511
  %211 = or i32 %210, %208
  %212 = zext i8 %194 to i32
  %213 = add nuw nsw i32 %212, 511
  %214 = or i32 %213, %211
  %215 = zext i8 %197 to i32
  %216 = add nuw nsw i32 %215, 511
  %217 = or i32 %216, %214
  %218 = lshr i32 %217, 8
  %219 = and i32 %218, 1
  ret i32 %219
}

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i8 @llvm.vector.reduce.or.v4i8(<4 x i8>) #1

attributes #0 = { nofree norecurse nosync nounwind memory(argmem: read) 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 speculatable willreturn memory(none) }

!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"}


; Effective O3 passes: GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,LCSSAPass,LICMPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass