; LLVM IR from openssl/openssl :: crypto/ec/curve448 (eddsa)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.curve448_scalar_s = type { [7 x i64] }
%struct.curve448_point_s = type { [1 x %struct.gf_s], [1 x %struct.gf_s], [1 x %struct.gf_s], [1 x %struct.gf_s] }
%struct.gf_s = type { [8 x i64] }

@ossl_c448_ed448_verify.order = external hidden constant [57 x i8], align 16
@ossl_curve448_scalar_zero = external constant [1 x %struct.curve448_scalar_s], align 16

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

declare void @ossl_curve448_scalar_decode_long(ptr noundef, ptr noundef, i64 noundef) #1

declare void @OPENSSL_cleanse(ptr noundef, i64 noundef) #1

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

declare ptr @EVP_MD_CTX_new() #1

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

declare i32 @EVP_DigestUpdate(ptr noundef, ptr noundef, i64 noundef) #1

declare i32 @EVP_DigestFinalXOF(ptr noundef, ptr noundef, i64 noundef) #1

declare void @EVP_MD_CTX_free(ptr noundef) #1

; Function Attrs: nounwind uwtable
define dso_local i32 @ossl_c448_ed448_verify(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, i64 noundef %4, i8 noundef zeroext %5, ptr noundef %6, i8 noundef zeroext %7, ptr noundef %8) #2 {
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca i64, align 8
  %16 = alloca i8, align 1
  %17 = alloca ptr, align 8
  %18 = alloca i8, align 1
  %19 = alloca ptr, align 8
  %20 = alloca [1 x %struct.curve448_point_s], align 16
  %21 = alloca [1 x %struct.curve448_point_s], align 16
  %22 = alloca i32, align 4
  %23 = alloca [1 x %struct.curve448_scalar_s], align 16
  %24 = alloca [1 x %struct.curve448_scalar_s], align 16
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  %27 = alloca ptr, align 8
  %28 = alloca [114 x i8], align 16
  store ptr %0, ptr %11, align 8, !tbaa !5
  store ptr %1, ptr %12, align 8, !tbaa !5
  store ptr %2, ptr %13, align 8, !tbaa !5
  store ptr %3, ptr %14, align 8, !tbaa !5
  store i64 %4, ptr %15, align 8, !tbaa !9
  store i8 %5, ptr %16, align 1, !tbaa !11
  store ptr %6, ptr %17, align 8, !tbaa !5
  store i8 %7, ptr %18, align 1, !tbaa !11
  store ptr %8, ptr %19, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 256, ptr %20) #4
  call void @llvm.lifetime.start.p0(i64 256, ptr %21) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #4
  call void @llvm.lifetime.start.p0(i64 56, ptr %23) #4
  call void @llvm.lifetime.start.p0(i64 56, ptr %24) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #4
  store i32 56, ptr %25, align 4, !tbaa !12
  br label %29

29:                                               ; preds = %63, %9
  %30 = load i32, ptr %25, align 4, !tbaa !12
  %31 = icmp sge i32 %30, 0
  br i1 %31, label %32, label %66

32:                                               ; preds = %29
  %33 = load ptr, ptr %12, align 8, !tbaa !5
  %34 = load i32, ptr %25, align 4, !tbaa !12
  %35 = add nsw i32 %34, 57
  %36 = sext i32 %35 to i64
  %37 = getelementptr inbounds i8, ptr %33, i64 %36
  %38 = load i8, ptr %37, align 1, !tbaa !11
  %39 = zext i8 %38 to i32
  %40 = load i32, ptr %25, align 4, !tbaa !12
  %41 = sext i32 %40 to i64
  %42 = getelementptr inbounds [57 x i8], ptr @ossl_c448_ed448_verify.order, i64 0, i64 %41
  %43 = load i8, ptr %42, align 1, !tbaa !11
  %44 = zext i8 %43 to i32
  %45 = icmp sgt i32 %39, %44
  br i1 %45, label %46, label %47

46:                                               ; preds = %32
  store i32 0, ptr %10, align 4
  store i32 1, ptr %26, align 4
  br label %144

47:                                               ; preds = %32
  %48 = load ptr, ptr %12, align 8, !tbaa !5
  %49 = load i32, ptr %25, align 4, !tbaa !12
  %50 = add nsw i32 %49, 57
  %51 = sext i32 %50 to i64
  %52 = getelementptr inbounds i8, ptr %48, i64 %51
  %53 = load i8, ptr %52, align 1, !tbaa !11
  %54 = zext i8 %53 to i32
  %55 = load i32, ptr %25, align 4, !tbaa !12
  %56 = sext i32 %55 to i64
  %57 = getelementptr inbounds [57 x i8], ptr @ossl_c448_ed448_verify.order, i64 0, i64 %56
  %58 = load i8, ptr %57, align 1, !tbaa !11
  %59 = zext i8 %58 to i32
  %60 = icmp slt i32 %54, %59
  br i1 %60, label %61, label %62

61:                                               ; preds = %47
  br label %66

62:                                               ; preds = %47
  br label %63

63:                                               ; preds = %62
  %64 = load i32, ptr %25, align 4, !tbaa !12
  %65 = add nsw i32 %64, -1
  store i32 %65, ptr %25, align 4, !tbaa !12
  br label %29, !llvm.loop !14

66:                                               ; preds = %61, %29
  %67 = load i32, ptr %25, align 4, !tbaa !12
  %68 = icmp slt i32 %67, 0
  br i1 %68, label %69, label %70

69:                                               ; preds = %66
  store i32 0, ptr %10, align 4
  store i32 1, ptr %26, align 4
  br label %144

70:                                               ; preds = %66
  %71 = getelementptr inbounds [1 x %struct.curve448_point_s], ptr %20, i64 0, i64 0
  %72 = load ptr, ptr %13, align 8, !tbaa !5
  %73 = call i32 @ossl_curve448_point_decode_like_eddsa_and_mul_by_ratio(ptr noundef %71, ptr noundef %72)
  store i32 %73, ptr %22, align 4, !tbaa !12
  %74 = load i32, ptr %22, align 4, !tbaa !12
  %75 = icmp ne i32 -1, %74
  br i1 %75, label %76, label %78

76:                                               ; preds = %70
  %77 = load i32, ptr %22, align 4, !tbaa !12
  store i32 %77, ptr %10, align 4
  store i32 1, ptr %26, align 4
  br label %144

78:                                               ; preds = %70
  %79 = getelementptr inbounds [1 x %struct.curve448_point_s], ptr %21, i64 0, i64 0
  %80 = load ptr, ptr %12, align 8, !tbaa !5
  %81 = call i32 @ossl_curve448_point_decode_like_eddsa_and_mul_by_ratio(ptr noundef %79, ptr noundef %80)
  store i32 %81, ptr %22, align 4, !tbaa !12
  %82 = load i32, ptr %22, align 4, !tbaa !12
  %83 = icmp ne i32 -1, %82
  br i1 %83, label %84, label %86

84:                                               ; preds = %78
  %85 = load i32, ptr %22, align 4, !tbaa !12
  store i32 %85, ptr %10, align 4
  store i32 1, ptr %26, align 4
  br label %144

86:                                               ; preds = %78
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #4
  %87 = call ptr @EVP_MD_CTX_new()
  store ptr %87, ptr %27, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 114, ptr %28) #4
  %88 = load ptr, ptr %27, align 8, !tbaa !5
  %89 = icmp eq ptr %88, null
  br i1 %89, label %121, label %90

90:                                               ; preds = %86
  %91 = load ptr, ptr %11, align 8, !tbaa !5
  %92 = load ptr, ptr %27, align 8, !tbaa !5
  %93 = load i8, ptr %16, align 1, !tbaa !11
  %94 = load ptr, ptr %17, align 8, !tbaa !5
  %95 = load i8, ptr %18, align 1, !tbaa !11
  %96 = zext i8 %95 to i64
  %97 = load ptr, ptr %19, align 8, !tbaa !5
  %98 = call i32 @hash_init_with_dom(ptr noundef %91, ptr noundef %92, i8 noundef zeroext %93, i8 noundef zeroext 0, ptr noundef %94, i64 noundef %96, ptr noundef %97)
  %99 = icmp ne i32 %98, 0
  br i1 %99, label %100, label %121

100:                                              ; preds = %90
  %101 = load ptr, ptr %27, align 8, !tbaa !5
  %102 = load ptr, ptr %12, align 8, !tbaa !5
  %103 = call i32 @EVP_DigestUpdate(ptr noundef %101, ptr noundef %102, i64 noundef 57)
  %104 = icmp ne i32 %103, 0
  br i1 %104, label %105, label %121

105:                                              ; preds = %100
  %106 = load ptr, ptr %27, align 8, !tbaa !5
  %107 = load ptr, ptr %13, align 8, !tbaa !5
  %108 = call i32 @EVP_DigestUpdate(ptr noundef %106, ptr noundef %107, i64 noundef 57)
  %109 = icmp ne i32 %108, 0
  br i1 %109, label %110, label %121

110:                                              ; preds = %105
  %111 = load ptr, ptr %27, align 8, !tbaa !5
  %112 = load ptr, ptr %14, align 8, !tbaa !5
  %113 = load i64, ptr %15, align 8, !tbaa !9
  %114 = call i32 @EVP_DigestUpdate(ptr noundef %111, ptr noundef %112, i64 noundef %113)
  %115 = icmp ne i32 %114, 0
  br i1 %115, label %116, label %121

116:                                              ; preds = %110
  %117 = load ptr, ptr %27, align 8, !tbaa !5
  %118 = getelementptr inbounds [114 x i8], ptr %28, i64 0, i64 0
  %119 = call i32 @EVP_DigestFinalXOF(ptr noundef %117, ptr noundef %118, i64 noundef 114)
  %120 = icmp ne i32 %119, 0
  br i1 %120, label %123, label %121

121:                                              ; preds = %116, %110, %105, %100, %90, %86
  %122 = load ptr, ptr %27, align 8, !tbaa !5
  call void @EVP_MD_CTX_free(ptr noundef %122)
  store i32 0, ptr %10, align 4
  store i32 1, ptr %26, align 4
  br label %128

123:                                              ; preds = %116
  %124 = load ptr, ptr %27, align 8, !tbaa !5
  call void @EVP_MD_CTX_free(ptr noundef %124)
  %125 = getelementptr inbounds [1 x %struct.curve448_scalar_s], ptr %23, i64 0, i64 0
  %126 = getelementptr inbounds [114 x i8], ptr %28, i64 0, i64 0
  call void @ossl_curve448_scalar_decode_long(ptr noundef %125, ptr noundef %126, i64 noundef 114)
  %127 = getelementptr inbounds [114 x i8], ptr %28, i64 0, i64 0
  call void @OPENSSL_cleanse(ptr noundef %127, i64 noundef 114)
  store i32 0, ptr %26, align 4
  br label %128

128:                                              ; preds = %123, %121
  call void @llvm.lifetime.end.p0(i64 114, ptr %28) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #4
  %129 = load i32, ptr %26, align 4
  switch i32 %129, label %144 [
    i32 0, label %130
  ]

130:                                              ; preds = %128
  %131 = getelementptr inbounds [1 x %struct.curve448_scalar_s], ptr %23, i64 0, i64 0
  %132 = getelementptr inbounds [1 x %struct.curve448_scalar_s], ptr %23, i64 0, i64 0
  call void @ossl_curve448_scalar_sub(ptr noundef %131, ptr noundef @ossl_curve448_scalar_zero, ptr noundef %132)
  %133 = getelementptr inbounds [1 x %struct.curve448_scalar_s], ptr %24, i64 0, i64 0
  %134 = load ptr, ptr %12, align 8, !tbaa !5
  %135 = getelementptr inbounds i8, ptr %134, i64 57
  call void @ossl_curve448_scalar_decode_long(ptr noundef %133, ptr noundef %135, i64 noundef 57)
  %136 = getelementptr inbounds [1 x %struct.curve448_point_s], ptr %20, i64 0, i64 0
  %137 = getelementptr inbounds [1 x %struct.curve448_scalar_s], ptr %24, i64 0, i64 0
  %138 = getelementptr inbounds [1 x %struct.curve448_point_s], ptr %20, i64 0, i64 0
  %139 = getelementptr inbounds [1 x %struct.curve448_scalar_s], ptr %23, i64 0, i64 0
  call void @ossl_curve448_base_double_scalarmul_non_secret(ptr noundef %136, ptr noundef %137, ptr noundef %138, ptr noundef %139)
  %140 = getelementptr inbounds [1 x %struct.curve448_point_s], ptr %20, i64 0, i64 0
  %141 = getelementptr inbounds [1 x %struct.curve448_point_s], ptr %21, i64 0, i64 0
  %142 = call i64 @ossl_curve448_point_eq(ptr noundef %140, ptr noundef %141)
  %143 = call i32 @c448_succeed_if(i64 noundef %142)
  store i32 %143, ptr %10, align 4
  store i32 1, ptr %26, align 4
  br label %144

144:                                              ; preds = %130, %128, %84, %76, %69, %46
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #4
  call void @llvm.lifetime.end.p0(i64 56, ptr %24) #4
  call void @llvm.lifetime.end.p0(i64 56, ptr %23) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #4
  call void @llvm.lifetime.end.p0(i64 256, ptr %21) #4
  call void @llvm.lifetime.end.p0(i64 256, ptr %20) #4
  %145 = load i32, ptr %10, align 4
  ret i32 %145
}

declare i32 @ossl_curve448_point_decode_like_eddsa_and_mul_by_ratio(ptr noundef, ptr noundef) #1

declare void @ossl_curve448_scalar_sub(ptr noundef, ptr noundef, ptr noundef) #1

declare void @ossl_curve448_base_double_scalarmul_non_secret(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #1

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @c448_succeed_if(i64 noundef) #3

declare i64 @ossl_curve448_point_eq(ptr noundef, ptr noundef) #1

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { inlinehint 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 #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 = !{!13, !13, i64 0}
!13 = !{!"int", !7, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.curve448_scalar_s = type { [7 x i64] }
%struct.curve448_point_s = type { [1 x %struct.gf_s], [1 x %struct.gf_s], [1 x %struct.gf_s], [1 x %struct.gf_s] }
%struct.gf_s = type { [8 x i64] }

@ossl_c448_ed448_verify.order = external hidden local_unnamed_addr constant [57 x i8], align 16
@ossl_curve448_scalar_zero = external constant [1 x %struct.curve448_scalar_s], align 16

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

declare void @ossl_curve448_scalar_decode_long(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #1

declare void @OPENSSL_cleanse(ptr noundef, i64 noundef) local_unnamed_addr #1

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

declare ptr @EVP_MD_CTX_new() local_unnamed_addr #1

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

declare i32 @EVP_DigestUpdate(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #1

declare i32 @EVP_DigestFinalXOF(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #1

declare void @EVP_MD_CTX_free(ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local i32 @ossl_c448_ed448_verify(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, i64 noundef %4, i8 noundef zeroext %5, ptr noundef %6, i8 noundef zeroext %7, ptr noundef %8) local_unnamed_addr #2 {
  %10 = alloca [1 x %struct.curve448_point_s], align 16
  %11 = alloca [1 x %struct.curve448_point_s], align 16
  %12 = alloca [1 x %struct.curve448_scalar_s], align 16
  %13 = alloca [1 x %struct.curve448_scalar_s], align 16
  %14 = alloca [114 x i8], align 16
  call void @llvm.lifetime.start.p0(i64 256, ptr nonnull %10) #4
  call void @llvm.lifetime.start.p0(i64 256, ptr nonnull %11) #4
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %12) #4
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %13) #4
  %invariant.gep = getelementptr inbounds i8, ptr %1, i64 57
  br label %35

15:                                               ; preds = %41
  %16 = add nsw i32 %.03546, -1
  %17 = zext nneg i32 %16 to i64
  %gep.1 = getelementptr inbounds i8, ptr %invariant.gep, i64 %17
  %18 = load i8, ptr %gep.1, align 1, !tbaa !5
  %19 = getelementptr inbounds [57 x i8], ptr @ossl_c448_ed448_verify.order, i64 0, i64 %17
  %20 = load i8, ptr %19, align 1, !tbaa !5
  %21 = icmp ugt i8 %18, %20
  br i1 %21, label %.thread, label %22

22:                                               ; preds = %15
  %23 = icmp ult i8 %18, %20
  br i1 %23, label %43, label %24

24:                                               ; preds = %22
  %25 = add nsw i32 %.03546, -2
  %26 = zext nneg i32 %25 to i64
  %gep.2 = getelementptr inbounds i8, ptr %invariant.gep, i64 %26
  %27 = load i8, ptr %gep.2, align 1, !tbaa !5
  %28 = getelementptr inbounds [57 x i8], ptr @ossl_c448_ed448_verify.order, i64 0, i64 %26
  %29 = load i8, ptr %28, align 1, !tbaa !5
  %30 = icmp ugt i8 %27, %29
  br i1 %30, label %.thread, label %31

31:                                               ; preds = %24
  %32 = icmp ult i8 %27, %29
  br i1 %32, label %43, label %33

33:                                               ; preds = %31
  %34 = add nsw i32 %.03546, -3
  %.not47.2 = icmp eq i32 %25, 0
  br i1 %.not47.2, label %.thread, label %35, !llvm.loop !8

35:                                               ; preds = %33, %9
  %.03546 = phi i32 [ 56, %9 ], [ %34, %33 ]
  %36 = zext nneg i32 %.03546 to i64
  %gep = getelementptr inbounds i8, ptr %invariant.gep, i64 %36
  %37 = load i8, ptr %gep, align 1, !tbaa !5
  %38 = getelementptr inbounds [57 x i8], ptr @ossl_c448_ed448_verify.order, i64 0, i64 %36
  %39 = load i8, ptr %38, align 1, !tbaa !5
  %40 = icmp ugt i8 %37, %39
  br i1 %40, label %.thread, label %41

41:                                               ; preds = %35
  %42 = icmp ult i8 %37, %39
  br i1 %42, label %43, label %15

43:                                               ; preds = %31, %22, %41
  %44 = call i32 @ossl_curve448_point_decode_like_eddsa_and_mul_by_ratio(ptr noundef nonnull %10, ptr noundef %2) #4
  %.not = icmp eq i32 %44, -1
  br i1 %.not, label %45, label %.thread

45:                                               ; preds = %43
  %46 = call i32 @ossl_curve448_point_decode_like_eddsa_and_mul_by_ratio(ptr noundef nonnull %11, ptr noundef nonnull %1) #4
  %.not40 = icmp eq i32 %46, -1
  br i1 %.not40, label %47, label %.thread

47:                                               ; preds = %45
  %48 = call ptr @EVP_MD_CTX_new() #4
  call void @llvm.lifetime.start.p0(i64 114, ptr nonnull %14) #4
  %49 = icmp eq ptr %48, null
  br i1 %49, label %.critedge, label %50

50:                                               ; preds = %47
  %51 = zext i8 %7 to i64
  %52 = call i32 @hash_init_with_dom(ptr noundef %0, ptr noundef nonnull %48, i8 noundef zeroext %5, i8 noundef zeroext 0, ptr noundef %6, i64 noundef %51, ptr noundef %8)
  %.not41 = icmp eq i32 %52, 0
  br i1 %.not41, label %.critedge, label %53

53:                                               ; preds = %50
  %54 = call i32 @EVP_DigestUpdate(ptr noundef nonnull %48, ptr noundef nonnull %1, i64 noundef 57) #4
  %.not42 = icmp eq i32 %54, 0
  br i1 %.not42, label %.critedge, label %55

55:                                               ; preds = %53
  %56 = call i32 @EVP_DigestUpdate(ptr noundef nonnull %48, ptr noundef %2, i64 noundef 57) #4
  %.not43 = icmp eq i32 %56, 0
  br i1 %.not43, label %.critedge, label %57

57:                                               ; preds = %55
  %58 = call i32 @EVP_DigestUpdate(ptr noundef nonnull %48, ptr noundef %3, i64 noundef %4) #4
  %.not44 = icmp eq i32 %58, 0
  br i1 %.not44, label %.critedge, label %59

59:                                               ; preds = %57
  %60 = call i32 @EVP_DigestFinalXOF(ptr noundef nonnull %48, ptr noundef nonnull %14, i64 noundef 114) #4
  %.not45 = icmp eq i32 %60, 0
  br i1 %.not45, label %.critedge, label %61

.critedge:                                        ; preds = %59, %57, %55, %53, %50, %47
  call void @EVP_MD_CTX_free(ptr noundef %48) #4
  call void @llvm.lifetime.end.p0(i64 114, ptr nonnull %14) #4
  br label %.thread

61:                                               ; preds = %59
  call void @EVP_MD_CTX_free(ptr noundef nonnull %48) #4
  call void @ossl_curve448_scalar_decode_long(ptr noundef nonnull %12, ptr noundef nonnull %14, i64 noundef 114) #4
  call void @OPENSSL_cleanse(ptr noundef nonnull %14, i64 noundef 114) #4
  call void @llvm.lifetime.end.p0(i64 114, ptr nonnull %14) #4
  call void @ossl_curve448_scalar_sub(ptr noundef nonnull %12, ptr noundef nonnull @ossl_curve448_scalar_zero, ptr noundef nonnull %12) #4
  call void @ossl_curve448_scalar_decode_long(ptr noundef nonnull %13, ptr noundef nonnull %invariant.gep, i64 noundef 57) #4
  call void @ossl_curve448_base_double_scalarmul_non_secret(ptr noundef nonnull %10, ptr noundef nonnull %13, ptr noundef nonnull %10, ptr noundef nonnull %12) #4
  %62 = call i64 @ossl_curve448_point_eq(ptr noundef nonnull %10, ptr noundef nonnull %11) #4
  %63 = call i32 @c448_succeed_if(i64 noundef %62)
  br label %.thread

.thread:                                          ; preds = %35, %15, %24, %33, %.critedge, %45, %43, %61
  %.1 = phi i32 [ %63, %61 ], [ %44, %43 ], [ %46, %45 ], [ 0, %.critedge ], [ 0, %33 ], [ 0, %24 ], [ 0, %15 ], [ 0, %35 ]
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %13) #4
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %12) #4
  call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %11) #4
  call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %10) #4
  ret i32 %.1
}

declare i32 @ossl_curve448_point_decode_like_eddsa_and_mul_by_ratio(ptr noundef, ptr noundef) local_unnamed_addr #1

declare void @ossl_curve448_scalar_sub(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

declare void @ossl_curve448_base_double_scalarmul_non_secret(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @c448_succeed_if(i64 noundef) local_unnamed_addr #3

declare i64 @ossl_curve448_point_eq(ptr noundef, ptr noundef) local_unnamed_addr #1

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { inlinehint 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 #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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C/C++ TBAA"}
!8 = distinct !{!8, !9}
!9 = !{!"llvm.loop.mustprogress"}


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