; LLVM IR from cryspen/libcrux :: sys/hacl/c/src/msvc (Hacl_Frodo64)

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

@.str = external hidden unnamed_addr constant [70 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [84 x i8], align 1

; 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: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #1

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

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

; 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) #3

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @Hacl_Impl_Frodo_Sample_frodo_sample_matrix64(i32 noundef, i32 noundef, ptr noundef, ptr noundef) #4

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @Hacl_Impl_Frodo_Params_frodo_gen_matrix(i8 noundef zeroext, i32 noundef, ptr noundef, ptr noundef) #4

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @Hacl_Impl_Matrix_matrix_add(i32 noundef, i32 noundef, ptr noundef, ptr noundef) #4

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @Hacl_Impl_Frodo_Pack_frodo_pack(i32 noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef) #4

; 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
define dso_local i32 @Hacl_Frodo64_crypto_kem_enc(ptr noundef %0, ptr noundef %1, ptr noundef %2) #5 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca [16 x i8], align 16
  %8 = alloca [32 x i8], align 16
  %9 = alloca [32 x i8], align 16
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca [512 x i16], align 16
  %15 = alloca [512 x i16], align 16
  %16 = alloca [64 x i16], align 16
  %17 = alloca [2176 x i8], align 16
  %18 = alloca [17 x i8], align 16
  %19 = alloca ptr, align 8
  %20 = alloca ptr, align 8
  %21 = alloca [512 x i16], align 16
  %22 = alloca [4096 x i16], align 16
  %23 = alloca [64 x i16], align 16
  %24 = alloca [512 x i16], align 16
  %25 = alloca [64 x i16], align 16
  %26 = alloca i32, align 4
  %27 = alloca ptr, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %7) #7
  call void @llvm.memset.p0.i64(ptr align 16 %7, i8 0, i64 16, i1 false)
  %28 = getelementptr inbounds [16 x i8], ptr %7, i64 0, i64 0
  call void @randombytes_(i32 noundef 16, ptr noundef %28)
  call void @llvm.lifetime.start.p0(i64 32, ptr %8) #7
  call void @llvm.memset.p0.i64(ptr align 16 %8, i8 0, i64 32, i1 false)
  call void @llvm.lifetime.start.p0(i64 32, ptr %9) #7
  call void @llvm.memset.p0.i64(ptr align 16 %9, i8 0, i64 32, i1 false)
  %29 = load ptr, ptr %6, align 8, !tbaa !5
  %30 = getelementptr inbounds [32 x i8], ptr %9, i64 0, i64 0
  call void @Hacl_Hash_SHA3_shake128_hacl(i32 noundef 976, ptr noundef %29, i32 noundef 16, ptr noundef %30)
  %31 = getelementptr inbounds [32 x i8], ptr %9, i64 0, i64 0
  %32 = getelementptr inbounds i8, ptr %31, i64 16
  %33 = getelementptr inbounds [16 x i8], ptr %7, i64 0, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %32, ptr align 16 %33, i64 16, i1 false)
  %34 = getelementptr inbounds [32 x i8], ptr %9, i64 0, i64 0
  %35 = getelementptr inbounds [32 x i8], ptr %8, i64 0, i64 0
  call void @Hacl_Hash_SHA3_shake128_hacl(i32 noundef 32, ptr noundef %34, i32 noundef 32, ptr noundef %35)
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  %36 = getelementptr inbounds [32 x i8], ptr %8, i64 0, i64 0
  store ptr %36, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  %37 = getelementptr inbounds [32 x i8], ptr %8, i64 0, i64 0
  %38 = getelementptr inbounds i8, ptr %37, i64 16
  store ptr %38, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  %39 = load ptr, ptr %6, align 8, !tbaa !5
  store ptr %39, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  %40 = load ptr, ptr %6, align 8, !tbaa !5
  %41 = getelementptr inbounds i8, ptr %40, i64 16
  store ptr %41, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1024, ptr %14) #7
  call void @llvm.memset.p0.i64(ptr align 16 %14, i8 0, i64 1024, i1 false)
  call void @llvm.lifetime.start.p0(i64 1024, ptr %15) #7
  call void @llvm.memset.p0.i64(ptr align 16 %15, i8 0, i64 1024, i1 false)
  call void @llvm.lifetime.start.p0(i64 128, ptr %16) #7
  call void @llvm.memset.p0.i64(ptr align 16 %16, i8 0, i64 128, i1 false)
  call void @llvm.lifetime.start.p0(i64 2176, ptr %17) #7
  call void @llvm.memset.p0.i64(ptr align 16 %17, i8 0, i64 2176, i1 false)
  call void @llvm.lifetime.start.p0(i64 17, ptr %18) #7
  call void @llvm.memset.p0.i64(ptr align 16 %18, i8 0, i64 17, i1 false)
  %42 = getelementptr inbounds [17 x i8], ptr %18, i64 0, i64 0
  store i8 -106, ptr %42, align 16, !tbaa !9
  %43 = getelementptr inbounds [17 x i8], ptr %18, i64 0, i64 0
  %44 = getelementptr inbounds i8, ptr %43, i64 1
  %45 = load ptr, ptr %10, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %44, ptr align 1 %45, i64 16, i1 false)
  %46 = getelementptr inbounds [17 x i8], ptr %18, i64 0, i64 0
  %47 = getelementptr inbounds [2176 x i8], ptr %17, i64 0, i64 0
  call void @Hacl_Hash_SHA3_shake128_hacl(i32 noundef 17, ptr noundef %46, i32 noundef 2176, ptr noundef %47)
  %48 = getelementptr inbounds [17 x i8], ptr %18, i64 0, i64 0
  call void @Lib_Memzero0_memzero0(ptr noundef %48, i64 noundef 17)
  %49 = getelementptr inbounds [2176 x i8], ptr %17, i64 0, i64 0
  %50 = getelementptr inbounds [512 x i16], ptr %14, i64 0, i64 0
  call void @Hacl_Impl_Frodo_Sample_frodo_sample_matrix64(i32 noundef 8, i32 noundef 64, ptr noundef %49, ptr noundef %50)
  %51 = getelementptr inbounds [2176 x i8], ptr %17, i64 0, i64 0
  %52 = getelementptr inbounds i8, ptr %51, i64 1024
  %53 = getelementptr inbounds [512 x i16], ptr %15, i64 0, i64 0
  call void @Hacl_Impl_Frodo_Sample_frodo_sample_matrix64(i32 noundef 8, i32 noundef 64, ptr noundef %52, ptr noundef %53)
  %54 = getelementptr inbounds [2176 x i8], ptr %17, i64 0, i64 0
  %55 = getelementptr inbounds i8, ptr %54, i64 2048
  %56 = getelementptr inbounds [64 x i16], ptr %16, i64 0, i64 0
  call void @Hacl_Impl_Frodo_Sample_frodo_sample_matrix64(i32 noundef 8, i32 noundef 8, ptr noundef %55, ptr noundef %56)
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #7
  %57 = load ptr, ptr %4, align 8, !tbaa !5
  store ptr %57, ptr %19, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #7
  %58 = load ptr, ptr %4, align 8, !tbaa !5
  %59 = getelementptr inbounds i8, ptr %58, i64 960
  store ptr %59, ptr %20, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1024, ptr %21) #7
  call void @llvm.memset.p0.i64(ptr align 16 %21, i8 0, i64 1024, i1 false)
  call void @llvm.lifetime.start.p0(i64 8192, ptr %22) #7
  call void @llvm.memset.p0.i64(ptr align 16 %22, i8 0, i64 8192, i1 false)
  %60 = load ptr, ptr %12, align 8, !tbaa !5
  %61 = getelementptr inbounds [4096 x i16], ptr %22, i64 0, i64 0
  call void @Hacl_Impl_Frodo_Params_frodo_gen_matrix(i8 noundef zeroext 0, i32 noundef 64, ptr noundef %60, ptr noundef %61)
  %62 = getelementptr inbounds [512 x i16], ptr %14, i64 0, i64 0
  %63 = getelementptr inbounds [4096 x i16], ptr %22, i64 0, i64 0
  %64 = getelementptr inbounds [512 x i16], ptr %21, i64 0, i64 0
  call void @Hacl_Impl_Matrix_matrix_mul(i32 noundef 8, i32 noundef 64, i32 noundef 64, ptr noundef %62, ptr noundef %63, ptr noundef %64)
  %65 = getelementptr inbounds [512 x i16], ptr %21, i64 0, i64 0
  %66 = getelementptr inbounds [512 x i16], ptr %15, i64 0, i64 0
  call void @Hacl_Impl_Matrix_matrix_add(i32 noundef 8, i32 noundef 64, ptr noundef %65, ptr noundef %66)
  %67 = getelementptr inbounds [512 x i16], ptr %21, i64 0, i64 0
  %68 = load ptr, ptr %19, align 8, !tbaa !5
  call void @Hacl_Impl_Frodo_Pack_frodo_pack(i32 noundef 8, i32 noundef 64, i32 noundef 15, ptr noundef %67, ptr noundef %68)
  call void @llvm.lifetime.start.p0(i64 128, ptr %23) #7
  call void @llvm.memset.p0.i64(ptr align 16 %23, i8 0, i64 128, i1 false)
  call void @llvm.lifetime.start.p0(i64 1024, ptr %24) #7
  call void @llvm.memset.p0.i64(ptr align 16 %24, i8 0, i64 1024, i1 false)
  %69 = load ptr, ptr %13, align 8, !tbaa !5
  %70 = getelementptr inbounds [512 x i16], ptr %24, i64 0, i64 0
  call void @Hacl_Impl_Frodo_Pack_frodo_unpack(i32 noundef 64, i32 noundef 8, i32 noundef 15, ptr noundef %69, ptr noundef %70)
  %71 = getelementptr inbounds [512 x i16], ptr %14, i64 0, i64 0
  %72 = getelementptr inbounds [512 x i16], ptr %24, i64 0, i64 0
  %73 = getelementptr inbounds [64 x i16], ptr %23, i64 0, i64 0
  call void @Hacl_Impl_Matrix_matrix_mul(i32 noundef 8, i32 noundef 64, i32 noundef 8, ptr noundef %71, ptr noundef %72, ptr noundef %73)
  %74 = getelementptr inbounds [64 x i16], ptr %23, i64 0, i64 0
  %75 = getelementptr inbounds [64 x i16], ptr %16, i64 0, i64 0
  call void @Hacl_Impl_Matrix_matrix_add(i32 noundef 8, i32 noundef 8, ptr noundef %74, ptr noundef %75)
  call void @llvm.lifetime.start.p0(i64 128, ptr %25) #7
  call void @llvm.memset.p0.i64(ptr align 16 %25, i8 0, i64 128, i1 false)
  %76 = getelementptr inbounds [16 x i8], ptr %7, i64 0, i64 0
  %77 = getelementptr inbounds [64 x i16], ptr %25, i64 0, i64 0
  call void @Hacl_Impl_Frodo_Encode_frodo_key_encode(i32 noundef 15, i32 noundef 2, i32 noundef 8, ptr noundef %76, ptr noundef %77)
  %78 = getelementptr inbounds [64 x i16], ptr %23, i64 0, i64 0
  %79 = getelementptr inbounds [64 x i16], ptr %25, i64 0, i64 0
  call void @Hacl_Impl_Matrix_matrix_add(i32 noundef 8, i32 noundef 8, ptr noundef %78, ptr noundef %79)
  %80 = getelementptr inbounds [64 x i16], ptr %25, i64 0, i64 0
  call void @Lib_Memzero0_memzero0(ptr noundef %80, i64 noundef 128)
  %81 = getelementptr inbounds [64 x i16], ptr %23, i64 0, i64 0
  %82 = load ptr, ptr %20, align 8, !tbaa !5
  call void @Hacl_Impl_Frodo_Pack_frodo_pack(i32 noundef 8, i32 noundef 8, i32 noundef 15, ptr noundef %81, ptr noundef %82)
  %83 = getelementptr inbounds [64 x i16], ptr %23, i64 0, i64 0
  call void @Lib_Memzero0_memzero0(ptr noundef %83, i64 noundef 128)
  %84 = getelementptr inbounds [512 x i16], ptr %14, i64 0, i64 0
  call void @Lib_Memzero0_memzero0(ptr noundef %84, i64 noundef 1024)
  %85 = getelementptr inbounds [512 x i16], ptr %15, i64 0, i64 0
  call void @Lib_Memzero0_memzero0(ptr noundef %85, i64 noundef 1024)
  %86 = getelementptr inbounds [64 x i16], ptr %16, i64 0, i64 0
  call void @Lib_Memzero0_memzero0(ptr noundef %86, i64 noundef 128)
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #7
  store i32 1096, ptr %26, align 4, !tbaa !10
  br label %87

87:                                               ; preds = %3
  %88 = load i32, ptr %26, align 4, !tbaa !10
  %89 = zext i32 %88 to i64
  %90 = icmp ugt i64 %89, -1
  br i1 %90, label %91, label %93

91:                                               ; preds = %87
  %92 = call i32 (ptr, ...) @printf(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 132)
  call void @exit(i32 noundef 253) #8
  unreachable

93:                                               ; preds = %87
  br label %94

94:                                               ; preds = %93
  br label %95

95:                                               ; preds = %94
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #7
  %96 = load i32, ptr %26, align 4, !tbaa !10
  %97 = zext i32 %96 to i64
  %98 = mul i64 %97, 1
  %99 = alloca i8, i64 %98, align 16
  store ptr %99, ptr %27, align 8, !tbaa !5
  %100 = load ptr, ptr %27, align 8, !tbaa !5
  %101 = load i32, ptr %26, align 4, !tbaa !10
  %102 = zext i32 %101 to i64
  %103 = mul i64 %102, 1
  call void @llvm.memset.p0.i64(ptr align 1 %100, i8 0, i64 %103, i1 false)
  %104 = load ptr, ptr %27, align 8, !tbaa !5
  %105 = load ptr, ptr %4, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %104, ptr align 1 %105, i64 1080, i1 false)
  %106 = load ptr, ptr %27, align 8, !tbaa !5
  %107 = getelementptr inbounds i8, ptr %106, i64 1080
  %108 = load ptr, ptr %11, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %107, ptr align 1 %108, i64 16, i1 false)
  %109 = load i32, ptr %26, align 4, !tbaa !10
  %110 = load ptr, ptr %27, align 8, !tbaa !5
  %111 = load ptr, ptr %5, align 8, !tbaa !5
  call void @Hacl_Hash_SHA3_shake128_hacl(i32 noundef %109, ptr noundef %110, i32 noundef 16, ptr noundef %111)
  %112 = load ptr, ptr %27, align 8, !tbaa !5
  %113 = load i32, ptr %26, align 4, !tbaa !10
  %114 = zext i32 %113 to i64
  %115 = mul i64 %114, 1
  call void @Lib_Memzero0_memzero0(ptr noundef %112, i64 noundef %115)
  %116 = getelementptr inbounds [32 x i8], ptr %8, i64 0, i64 0
  call void @Lib_Memzero0_memzero0(ptr noundef %116, i64 noundef 32)
  %117 = getelementptr inbounds [16 x i8], ptr %7, i64 0, i64 0
  call void @Lib_Memzero0_memzero0(ptr noundef %117, i64 noundef 16)
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #7
  call void @llvm.lifetime.end.p0(i64 128, ptr %25) #7
  call void @llvm.lifetime.end.p0(i64 1024, ptr %24) #7
  call void @llvm.lifetime.end.p0(i64 128, ptr %23) #7
  call void @llvm.lifetime.end.p0(i64 8192, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 1024, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 17, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 2176, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 128, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 1024, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 1024, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %7) #7
  ret i32 0
}

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @Hacl_Impl_Matrix_matrix_mul(i32 noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef) #4

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @Hacl_Impl_Frodo_Pack_frodo_unpack(i32 noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef) #4

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @Hacl_Impl_Frodo_Encode_frodo_key_encode(i32 noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef) #4

declare i32 @printf(ptr noundef, ...) #2

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) #6

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: write) }
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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 #5 = { 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 #6 = { noreturn nounwind "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 #7 = { nounwind }
attributes #8 = { noreturn 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 = !{!7, !7, i64 0}
!10 = !{!11, !11, i64 0}
!11 = !{!"int", !7, i64 0}


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

; Function Attrs: 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: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #1

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

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

; 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) #3

declare void @Lib_Memzero0_memzero0(ptr noundef, i64 noundef) local_unnamed_addr #2

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @Hacl_Impl_Frodo_Sample_frodo_sample_matrix64(i32 noundef, i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #4

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @Hacl_Impl_Frodo_Params_frodo_gen_matrix(i8 noundef zeroext, i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #4

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @Hacl_Impl_Matrix_matrix_add(i32 noundef, i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #4

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @Hacl_Impl_Frodo_Pack_frodo_pack(i32 noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #4

; 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
define dso_local noundef i32 @Hacl_Frodo64_crypto_kem_enc(ptr noundef %0, ptr noundef %1, ptr noundef %2) local_unnamed_addr #5 {
  %4 = alloca [16 x i8], align 16
  %5 = alloca [32 x i8], align 16
  %6 = alloca [32 x i8], align 16
  %7 = alloca [512 x i16], align 16
  %8 = alloca [512 x i16], align 16
  %9 = alloca [64 x i16], align 16
  %10 = alloca [2176 x i8], align 16
  %11 = alloca [17 x i8], align 16
  %12 = alloca [512 x i16], align 16
  %13 = alloca [4096 x i16], align 16
  %14 = alloca [64 x i16], align 16
  %15 = alloca [512 x i16], align 16
  %16 = alloca [64 x i16], align 16
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #6
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %4, i8 0, i64 16, i1 false)
  call void @randombytes_(i32 noundef 16, ptr noundef nonnull %4) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #6
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(32) %5, i8 0, i64 32, i1 false)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #6
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(32) %6, i8 0, i64 32, i1 false)
  call void @Hacl_Hash_SHA3_shake128_hacl(i32 noundef 976, ptr noundef %2, i32 noundef 16, ptr noundef nonnull %6) #6
  %17 = getelementptr inbounds i8, ptr %6, i64 16
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %17, ptr noundef nonnull align 16 dereferenceable(16) %4, i64 16, i1 false)
  call void @Hacl_Hash_SHA3_shake128_hacl(i32 noundef 32, ptr noundef nonnull %6, i32 noundef 32, ptr noundef nonnull %5) #6
  %18 = getelementptr inbounds i8, ptr %2, i64 16
  call void @llvm.lifetime.start.p0(i64 1024, ptr nonnull %7) #6
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(1024) %7, i8 0, i64 1024, i1 false)
  call void @llvm.lifetime.start.p0(i64 1024, ptr nonnull %8) #6
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(1024) %8, i8 0, i64 1024, i1 false)
  call void @llvm.lifetime.start.p0(i64 128, ptr nonnull %9) #6
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(128) %9, i8 0, i64 128, i1 false)
  call void @llvm.lifetime.start.p0(i64 2176, ptr nonnull %10) #6
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(2176) %10, i8 0, i64 2176, i1 false)
  call void @llvm.lifetime.start.p0(i64 17, ptr nonnull %11) #6
  store i8 -106, ptr %11, align 16, !tbaa !5
  %19 = getelementptr inbounds i8, ptr %11, i64 1
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(16) %19, ptr noundef nonnull align 16 dereferenceable(16) %5, i64 16, i1 false)
  call void @Hacl_Hash_SHA3_shake128_hacl(i32 noundef 17, ptr noundef nonnull %11, i32 noundef 2176, ptr noundef nonnull %10) #6
  call void @Lib_Memzero0_memzero0(ptr noundef nonnull %11, i64 noundef 17) #6
  call void @Hacl_Impl_Frodo_Sample_frodo_sample_matrix64(i32 noundef 8, i32 noundef 64, ptr noundef nonnull %10, ptr noundef nonnull %7)
  %20 = getelementptr inbounds i8, ptr %10, i64 1024
  call void @Hacl_Impl_Frodo_Sample_frodo_sample_matrix64(i32 noundef 8, i32 noundef 64, ptr noundef nonnull %20, ptr noundef nonnull %8)
  %21 = getelementptr inbounds i8, ptr %10, i64 2048
  call void @Hacl_Impl_Frodo_Sample_frodo_sample_matrix64(i32 noundef 8, i32 noundef 8, ptr noundef nonnull %21, ptr noundef nonnull %9)
  %22 = getelementptr inbounds i8, ptr %0, i64 960
  call void @llvm.lifetime.start.p0(i64 1024, ptr nonnull %12) #6
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(1024) %12, i8 0, i64 1024, i1 false)
  call void @llvm.lifetime.start.p0(i64 8192, ptr nonnull %13) #6
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(8192) %13, i8 0, i64 8192, i1 false)
  call void @Hacl_Impl_Frodo_Params_frodo_gen_matrix(i8 noundef zeroext 0, i32 noundef 64, ptr noundef %2, ptr noundef nonnull %13)
  call void @Hacl_Impl_Matrix_matrix_mul(i32 noundef 8, i32 noundef 64, i32 noundef 64, ptr noundef nonnull %7, ptr noundef nonnull %13, ptr noundef nonnull %12)
  call void @Hacl_Impl_Matrix_matrix_add(i32 noundef 8, i32 noundef 64, ptr noundef nonnull %12, ptr noundef nonnull %8)
  call void @Hacl_Impl_Frodo_Pack_frodo_pack(i32 noundef 8, i32 noundef 64, i32 noundef 15, ptr noundef nonnull %12, ptr noundef %0)
  call void @llvm.lifetime.start.p0(i64 128, ptr nonnull %14) #6
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(128) %14, i8 0, i64 128, i1 false)
  call void @llvm.lifetime.start.p0(i64 1024, ptr nonnull %15) #6
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(1024) %15, i8 0, i64 1024, i1 false)
  call void @Hacl_Impl_Frodo_Pack_frodo_unpack(i32 noundef 64, i32 noundef 8, i32 noundef 15, ptr noundef nonnull %18, ptr noundef nonnull %15)
  call void @Hacl_Impl_Matrix_matrix_mul(i32 noundef 8, i32 noundef 64, i32 noundef 8, ptr noundef nonnull %7, ptr noundef nonnull %15, ptr noundef nonnull %14)
  call void @Hacl_Impl_Matrix_matrix_add(i32 noundef 8, i32 noundef 8, ptr noundef nonnull %14, ptr noundef nonnull %9)
  call void @llvm.lifetime.start.p0(i64 128, ptr nonnull %16) #6
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(128) %16, i8 0, i64 128, i1 false)
  call void @Hacl_Impl_Frodo_Encode_frodo_key_encode(i32 noundef 15, i32 noundef 2, i32 noundef 8, ptr noundef nonnull %4, ptr noundef nonnull %16)
  call void @Hacl_Impl_Matrix_matrix_add(i32 noundef 8, i32 noundef 8, ptr noundef nonnull %14, ptr noundef nonnull %16)
  call void @Lib_Memzero0_memzero0(ptr noundef nonnull %16, i64 noundef 128) #6
  call void @Hacl_Impl_Frodo_Pack_frodo_pack(i32 noundef 8, i32 noundef 8, i32 noundef 15, ptr noundef nonnull %14, ptr noundef nonnull %22)
  call void @Lib_Memzero0_memzero0(ptr noundef nonnull %14, i64 noundef 128) #6
  call void @Lib_Memzero0_memzero0(ptr noundef nonnull %7, i64 noundef 1024) #6
  call void @Lib_Memzero0_memzero0(ptr noundef nonnull %8, i64 noundef 1024) #6
  call void @Lib_Memzero0_memzero0(ptr noundef nonnull %9, i64 noundef 128) #6
  %23 = getelementptr inbounds i8, ptr %5, i64 16
  %24 = alloca [1096 x i8], align 16
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(1080) %24, ptr noundef nonnull align 1 dereferenceable(1080) %0, i64 1080, i1 false)
  %25 = getelementptr inbounds i8, ptr %24, i64 1080
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %25, ptr noundef nonnull align 16 dereferenceable(16) %23, i64 16, i1 false)
  call void @Hacl_Hash_SHA3_shake128_hacl(i32 noundef 1096, ptr noundef nonnull %24, i32 noundef 16, ptr noundef %1) #6
  call void @Lib_Memzero0_memzero0(ptr noundef nonnull %24, i64 noundef 1096) #6
  call void @Lib_Memzero0_memzero0(ptr noundef nonnull %5, i64 noundef 32) #6
  call void @Lib_Memzero0_memzero0(ptr noundef nonnull %4, i64 noundef 16) #6
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %16) #6
  call void @llvm.lifetime.end.p0(i64 1024, ptr nonnull %15) #6
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %14) #6
  call void @llvm.lifetime.end.p0(i64 8192, ptr nonnull %13) #6
  call void @llvm.lifetime.end.p0(i64 1024, ptr nonnull %12) #6
  call void @llvm.lifetime.end.p0(i64 17, ptr nonnull %11) #6
  call void @llvm.lifetime.end.p0(i64 2176, ptr nonnull %10) #6
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %9) #6
  call void @llvm.lifetime.end.p0(i64 1024, ptr nonnull %8) #6
  call void @llvm.lifetime.end.p0(i64 1024, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #6
  ret i32 0
}

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @Hacl_Impl_Matrix_matrix_mul(i32 noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #4

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @Hacl_Impl_Frodo_Pack_frodo_unpack(i32 noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #4

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @Hacl_Impl_Frodo_Encode_frodo_key_encode(i32 noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #4

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


; Effective O3 passes: DSEPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,MemCpyOptPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass