; LLVM IR from trustwallet/wallet-core :: trezor-crypto/crypto (cardano)

; 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._PBKDF2_HMAC_SHA512_CTX = type { [8 x i64], [8 x i64], [8 x i64], [16 x i64], i8 }

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

declare void @memzero(ptr noundef, i64 noundef) #2

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

; Function Attrs: nounwind uwtable
declare hidden void @cardano_ed25519_tweak_bits(ptr noundef) #3

; Function Attrs: nounwind uwtable
define dso_local i32 @secret_from_entropy_cardano_icarus(ptr noundef %0, i32 noundef %1, ptr noundef %2, i32 noundef %3, ptr noundef %4, ptr noundef %5) #3 {
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca %struct._PBKDF2_HMAC_SHA512_CTX, align 8
  %14 = alloca [64 x i8], align 16
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  store ptr %0, ptr %7, align 8, !tbaa !5
  store i32 %1, ptr %8, align 4, !tbaa !9
  store ptr %2, ptr %9, align 8, !tbaa !5
  store i32 %3, ptr %10, align 4, !tbaa !9
  store ptr %4, ptr %11, align 8, !tbaa !5
  store ptr %5, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 328, ptr %13) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr %14) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #4
  store i32 0, ptr %15, align 4, !tbaa !9
  %18 = load ptr, ptr %7, align 8, !tbaa !5
  %19 = load i32, ptr %8, align 4, !tbaa !9
  %20 = load ptr, ptr %9, align 8, !tbaa !5
  %21 = load i32, ptr %10, align 4, !tbaa !9
  call void @pbkdf2_hmac_sha512_Init(ptr noundef %13, ptr noundef %18, i32 noundef %19, ptr noundef %20, i32 noundef %21, i32 noundef 1)
  %22 = load ptr, ptr %12, align 8, !tbaa !5
  %23 = icmp ne ptr %22, null
  br i1 %23, label %24, label %27

24:                                               ; preds = %6
  %25 = load ptr, ptr %12, align 8, !tbaa !5
  %26 = load i32, ptr %15, align 4, !tbaa !9
  call void %25(i32 noundef %26, i32 noundef 8192)
  br label %27

27:                                               ; preds = %24, %6
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #4
  store i32 0, ptr %16, align 4, !tbaa !9
  br label %28

28:                                               ; preds = %41, %27
  %29 = load i32, ptr %16, align 4, !tbaa !9
  %30 = icmp slt i32 %29, 32
  br i1 %30, label %32, label %31

31:                                               ; preds = %28
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #4
  br label %44

32:                                               ; preds = %28
  call void @pbkdf2_hmac_sha512_Update(ptr noundef %13, i32 noundef 128)
  %33 = load ptr, ptr %12, align 8, !tbaa !5
  %34 = icmp ne ptr %33, null
  br i1 %34, label %35, label %40

35:                                               ; preds = %32
  %36 = load i32, ptr %15, align 4, !tbaa !9
  %37 = add i32 %36, 128
  store i32 %37, ptr %15, align 4, !tbaa !9
  %38 = load ptr, ptr %12, align 8, !tbaa !5
  %39 = load i32, ptr %15, align 4, !tbaa !9
  call void %38(i32 noundef %39, i32 noundef 8192)
  br label %40

40:                                               ; preds = %35, %32
  br label %41

41:                                               ; preds = %40
  %42 = load i32, ptr %16, align 4, !tbaa !9
  %43 = add nsw i32 %42, 1
  store i32 %43, ptr %16, align 4, !tbaa !9
  br label %28, !llvm.loop !11

44:                                               ; preds = %31
  %45 = getelementptr inbounds [64 x i8], ptr %14, i64 0, i64 0
  call void @pbkdf2_hmac_sha512_Final(ptr noundef %13, ptr noundef %45)
  %46 = load ptr, ptr %11, align 8, !tbaa !5
  %47 = getelementptr inbounds [64 x i8], ptr %14, i64 0, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %46, ptr align 16 %47, i64 64, i1 false)
  %48 = load ptr, ptr %7, align 8, !tbaa !5
  %49 = load i32, ptr %8, align 4, !tbaa !9
  %50 = load ptr, ptr %9, align 8, !tbaa !5
  %51 = load i32, ptr %10, align 4, !tbaa !9
  call void @pbkdf2_hmac_sha512_Init(ptr noundef %13, ptr noundef %48, i32 noundef %49, ptr noundef %50, i32 noundef %51, i32 noundef 2)
  %52 = load ptr, ptr %12, align 8, !tbaa !5
  %53 = icmp ne ptr %52, null
  br i1 %53, label %54, label %57

54:                                               ; preds = %44
  %55 = load ptr, ptr %12, align 8, !tbaa !5
  %56 = load i32, ptr %15, align 4, !tbaa !9
  call void %55(i32 noundef %56, i32 noundef 8192)
  br label %57

57:                                               ; preds = %54, %44
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #4
  store i32 0, ptr %17, align 4, !tbaa !9
  br label %58

58:                                               ; preds = %71, %57
  %59 = load i32, ptr %17, align 4, !tbaa !9
  %60 = icmp slt i32 %59, 32
  br i1 %60, label %62, label %61

61:                                               ; preds = %58
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #4
  br label %74

62:                                               ; preds = %58
  call void @pbkdf2_hmac_sha512_Update(ptr noundef %13, i32 noundef 128)
  %63 = load ptr, ptr %12, align 8, !tbaa !5
  %64 = icmp ne ptr %63, null
  br i1 %64, label %65, label %70

65:                                               ; preds = %62
  %66 = load i32, ptr %15, align 4, !tbaa !9
  %67 = add i32 %66, 128
  store i32 %67, ptr %15, align 4, !tbaa !9
  %68 = load ptr, ptr %12, align 8, !tbaa !5
  %69 = load i32, ptr %15, align 4, !tbaa !9
  call void %68(i32 noundef %69, i32 noundef 8192)
  br label %70

70:                                               ; preds = %65, %62
  br label %71

71:                                               ; preds = %70
  %72 = load i32, ptr %17, align 4, !tbaa !9
  %73 = add nsw i32 %72, 1
  store i32 %73, ptr %17, align 4, !tbaa !9
  br label %58, !llvm.loop !13

74:                                               ; preds = %61
  %75 = getelementptr inbounds [64 x i8], ptr %14, i64 0, i64 0
  call void @pbkdf2_hmac_sha512_Final(ptr noundef %13, ptr noundef %75)
  %76 = load ptr, ptr %11, align 8, !tbaa !5
  %77 = getelementptr inbounds i8, ptr %76, i64 64
  %78 = getelementptr inbounds [64 x i8], ptr %14, i64 0, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %77, ptr align 16 %78, i64 32, i1 false)
  %79 = load ptr, ptr %11, align 8, !tbaa !5
  call void @cardano_ed25519_tweak_bits(ptr noundef %79)
  call void @memzero(ptr noundef %13, i64 noundef 328)
  %80 = getelementptr inbounds [64 x i8], ptr %14, i64 0, i64 0
  call void @memzero(ptr noundef %80, i64 noundef 64)
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 328, ptr %13) #4
  ret i32 1
}

declare void @pbkdf2_hmac_sha512_Init(ptr noundef, ptr noundef, i32 noundef, ptr noundef, i32 noundef, i32 noundef) #2

declare void @pbkdf2_hmac_sha512_Update(ptr noundef, i32 noundef) #2

declare void @pbkdf2_hmac_sha512_Final(ptr noundef, ptr noundef) #2

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


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

%struct._PBKDF2_HMAC_SHA512_CTX = type { [8 x i64], [8 x i64], [8 x i64], [16 x i64], i8 }

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #1

declare void @memzero(ptr noundef, i64 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) #0

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

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @secret_from_entropy_cardano_icarus(ptr noundef %0, i32 noundef %1, ptr noundef %2, i32 noundef %3, ptr noundef %4, ptr noundef readonly %5) local_unnamed_addr #3 {
  %7 = alloca %struct._PBKDF2_HMAC_SHA512_CTX, align 8
  %8 = alloca [64 x i8], align 16
  call void @llvm.lifetime.start.p0(i64 328, ptr nonnull %7) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %8) #4
  call void @pbkdf2_hmac_sha512_Init(ptr noundef nonnull %7, ptr noundef %0, i32 noundef %1, ptr noundef %2, i32 noundef %3, i32 noundef 1) #4
  %.not = icmp eq ptr %5, null
  br i1 %.not, label %.split.us.preheader, label %.split

.split.us.preheader:                              ; preds = %6
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  br label %.split37.us

.split:                                           ; preds = %6
  call void %5(i32 noundef 0, i32 noundef 8192) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  call void %5(i32 noundef 128, i32 noundef 8192) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  call void %5(i32 noundef 256, i32 noundef 8192) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  call void %5(i32 noundef 384, i32 noundef 8192) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  call void %5(i32 noundef 512, i32 noundef 8192) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  call void %5(i32 noundef 640, i32 noundef 8192) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  call void %5(i32 noundef 768, i32 noundef 8192) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  call void %5(i32 noundef 896, i32 noundef 8192) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  call void %5(i32 noundef 1024, i32 noundef 8192) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  call void %5(i32 noundef 1152, i32 noundef 8192) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  call void %5(i32 noundef 1280, i32 noundef 8192) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  call void %5(i32 noundef 1408, i32 noundef 8192) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  call void %5(i32 noundef 1536, i32 noundef 8192) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  call void %5(i32 noundef 1664, i32 noundef 8192) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  call void %5(i32 noundef 1792, i32 noundef 8192) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  call void %5(i32 noundef 1920, i32 noundef 8192) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  call void %5(i32 noundef 2048, i32 noundef 8192) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  call void %5(i32 noundef 2176, i32 noundef 8192) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  call void %5(i32 noundef 2304, i32 noundef 8192) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  call void %5(i32 noundef 2432, i32 noundef 8192) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  call void %5(i32 noundef 2560, i32 noundef 8192) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  call void %5(i32 noundef 2688, i32 noundef 8192) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  call void %5(i32 noundef 2816, i32 noundef 8192) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  call void %5(i32 noundef 2944, i32 noundef 8192) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  call void %5(i32 noundef 3072, i32 noundef 8192) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  call void %5(i32 noundef 3200, i32 noundef 8192) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  call void %5(i32 noundef 3328, i32 noundef 8192) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  call void %5(i32 noundef 3456, i32 noundef 8192) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  call void %5(i32 noundef 3584, i32 noundef 8192) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  call void %5(i32 noundef 3712, i32 noundef 8192) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  call void %5(i32 noundef 3840, i32 noundef 8192) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  call void %5(i32 noundef 3968, i32 noundef 8192) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  call void %5(i32 noundef 4096, i32 noundef 8192) #4
  br label %.split37.us

.split37.us:                                      ; preds = %.split, %.split.us.preheader
  %.us-phi = phi i32 [ 0, %.split.us.preheader ], [ 4096, %.split ]
  call void @pbkdf2_hmac_sha512_Final(ptr noundef nonnull %7, ptr noundef nonnull %8) #4
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(64) %4, ptr noundef nonnull align 16 dereferenceable(64) %8, i64 64, i1 false)
  call void @pbkdf2_hmac_sha512_Init(ptr noundef nonnull %7, ptr noundef %0, i32 noundef %1, ptr noundef %2, i32 noundef %3, i32 noundef 2) #4
  br i1 %.not, label %.split40.us.preheader, label %.split40

.split40.us.preheader:                            ; preds = %.split37.us
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  br label %.split42.us

.split40:                                         ; preds = %.split37.us
  call void %5(i32 noundef %.us-phi, i32 noundef 8192) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  %9 = or disjoint i32 %.us-phi, 128
  call void %5(i32 noundef %9, i32 noundef 8192) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  %10 = or disjoint i32 %.us-phi, 256
  call void %5(i32 noundef %10, i32 noundef 8192) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  %11 = or disjoint i32 %.us-phi, 384
  call void %5(i32 noundef %11, i32 noundef 8192) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  %12 = or disjoint i32 %.us-phi, 512
  call void %5(i32 noundef %12, i32 noundef 8192) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  %13 = or disjoint i32 %.us-phi, 640
  call void %5(i32 noundef %13, i32 noundef 8192) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  %14 = or disjoint i32 %.us-phi, 768
  call void %5(i32 noundef %14, i32 noundef 8192) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  %15 = or disjoint i32 %.us-phi, 896
  call void %5(i32 noundef %15, i32 noundef 8192) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  %16 = or disjoint i32 %.us-phi, 1024
  call void %5(i32 noundef %16, i32 noundef 8192) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  %17 = or disjoint i32 %.us-phi, 1152
  call void %5(i32 noundef %17, i32 noundef 8192) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  %18 = or disjoint i32 %.us-phi, 1280
  call void %5(i32 noundef %18, i32 noundef 8192) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  %19 = or disjoint i32 %.us-phi, 1408
  call void %5(i32 noundef %19, i32 noundef 8192) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  %20 = or disjoint i32 %.us-phi, 1536
  call void %5(i32 noundef %20, i32 noundef 8192) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  %21 = or disjoint i32 %.us-phi, 1664
  call void %5(i32 noundef %21, i32 noundef 8192) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  %22 = or disjoint i32 %.us-phi, 1792
  call void %5(i32 noundef %22, i32 noundef 8192) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  %23 = or disjoint i32 %.us-phi, 1920
  call void %5(i32 noundef %23, i32 noundef 8192) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  %24 = or disjoint i32 %.us-phi, 2048
  call void %5(i32 noundef %24, i32 noundef 8192) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  %25 = or disjoint i32 %.us-phi, 2176
  call void %5(i32 noundef %25, i32 noundef 8192) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  %26 = or disjoint i32 %.us-phi, 2304
  call void %5(i32 noundef %26, i32 noundef 8192) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  %27 = or disjoint i32 %.us-phi, 2432
  call void %5(i32 noundef %27, i32 noundef 8192) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  %28 = or disjoint i32 %.us-phi, 2560
  call void %5(i32 noundef %28, i32 noundef 8192) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  %29 = or disjoint i32 %.us-phi, 2688
  call void %5(i32 noundef %29, i32 noundef 8192) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  %30 = or disjoint i32 %.us-phi, 2816
  call void %5(i32 noundef %30, i32 noundef 8192) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  %31 = or disjoint i32 %.us-phi, 2944
  call void %5(i32 noundef %31, i32 noundef 8192) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  %32 = or disjoint i32 %.us-phi, 3072
  call void %5(i32 noundef %32, i32 noundef 8192) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  %33 = or disjoint i32 %.us-phi, 3200
  call void %5(i32 noundef %33, i32 noundef 8192) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  %34 = or disjoint i32 %.us-phi, 3328
  call void %5(i32 noundef %34, i32 noundef 8192) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  %35 = or disjoint i32 %.us-phi, 3456
  call void %5(i32 noundef %35, i32 noundef 8192) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  %36 = or disjoint i32 %.us-phi, 3584
  call void %5(i32 noundef %36, i32 noundef 8192) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  %37 = or disjoint i32 %.us-phi, 3712
  call void %5(i32 noundef %37, i32 noundef 8192) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  %38 = or disjoint i32 %.us-phi, 3840
  call void %5(i32 noundef %38, i32 noundef 8192) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  %39 = or disjoint i32 %.us-phi, 3968
  call void %5(i32 noundef %39, i32 noundef 8192) #4
  call void @pbkdf2_hmac_sha512_Update(ptr noundef nonnull %7, i32 noundef 128) #4
  %40 = add nuw nsw i32 %.us-phi, 4096
  call void %5(i32 noundef %40, i32 noundef 8192) #4
  br label %.split42.us

.split42.us:                                      ; preds = %.split40, %.split40.us.preheader
  call void @pbkdf2_hmac_sha512_Final(ptr noundef nonnull %7, ptr noundef nonnull %8) #4
  %41 = getelementptr inbounds i8, ptr %4, i64 64
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(32) %41, ptr noundef nonnull align 16 dereferenceable(32) %8, i64 32, i1 false)
  call void @cardano_ed25519_tweak_bits(ptr noundef nonnull %4)
  call void @memzero(ptr noundef nonnull %7, i64 noundef 328) #4
  call void @memzero(ptr noundef nonnull %8, i64 noundef 64) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %8) #4
  call void @llvm.lifetime.end.p0(i64 328, ptr nonnull %7) #4
  ret i32 1
}

declare void @pbkdf2_hmac_sha512_Init(ptr noundef, ptr noundef, i32 noundef, ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #2

declare void @pbkdf2_hmac_sha512_Update(ptr noundef, i32 noundef) local_unnamed_addr #2

declare void @pbkdf2_hmac_sha512_Final(ptr noundef, ptr noundef) local_unnamed_addr #2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree 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 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)"}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,LCSSAPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass