; LLVM IR from Waqar144/simplecrypto-cxx :: simplecrypto-cxx (pbkdf2)

; 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.SHA512_CTX = type { %"struct.std::array.1", %"struct.std::array.2", %"struct.std::array.3" }
%"struct.std::array.1" = type { [8 x i64] }
%"struct.std::array.2" = type { [2 x i64] }
%"struct.std::array.3" = type { [16 x i64] }
%struct.PBKDF2_CTX.4 = type { %"struct.std::array.1", %"struct.std::array.1", %"struct.std::array.1", %"struct.std::array.3", i8 }

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef i32 @_ZL9Reverse32j(i32 noundef) #1

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z23pbkdf2_hmac_sha512_InitImLm128ELm64EEvP10PBKDF2_CTXIT_XT0_EXT1_EEPKhiS5_i(ptr noundef %0, ptr noundef %1, i32 noundef %2, ptr noundef %3, i32 noundef %4) #4 {
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca %struct.SHA512_CTX, align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store i32 %2, ptr %8, align 4, !tbaa !9
  store ptr %3, ptr %9, align 8, !tbaa !5
  store i32 %4, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 208, ptr %11) #8
  call void @_ZN10SHA512_CTXC2Ev(ptr noundef nonnull align 8 dereferenceable(208) %11) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #8
  store i32 1, ptr %12, align 4, !tbaa !9
  %14 = load i32, ptr %12, align 4, !tbaa !9
  %15 = call noundef i32 @_ZL9Reverse32j(i32 noundef %14)
  store i32 %15, ptr %12, align 4, !tbaa !9
  %16 = load ptr, ptr %7, align 8, !tbaa !5
  %17 = load i32, ptr %8, align 4, !tbaa !9
  %18 = sext i32 %17 to i64
  %19 = load ptr, ptr %6, align 8, !tbaa !5
  %20 = getelementptr inbounds %struct.PBKDF2_CTX.4, ptr %19, i32 0, i32 0
  %21 = load ptr, ptr %6, align 8, !tbaa !5
  %22 = getelementptr inbounds %struct.PBKDF2_CTX.4, ptr %21, i32 0, i32 1
  call void @_Z19hmac_sha512_preparePKhmRSt5arrayImLm8EES3_(ptr noundef %16, i64 noundef %18, ptr noundef nonnull align 8 dereferenceable(64) %20, ptr noundef nonnull align 8 dereferenceable(64) %22)
  %23 = load ptr, ptr %6, align 8, !tbaa !5
  %24 = getelementptr inbounds %struct.PBKDF2_CTX.4, ptr %23, i32 0, i32 3
  %25 = call noundef ptr @_ZNSt5arrayImLm16EE4dataEv(ptr noundef nonnull align 8 dereferenceable(128) %24) #9
  call void @llvm.memset.p0.i64(ptr align 8 %25, i8 0, i64 128, i1 false)
  %26 = load ptr, ptr %6, align 8, !tbaa !5
  %27 = getelementptr inbounds %struct.PBKDF2_CTX.4, ptr %26, i32 0, i32 3
  %28 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayImLm16EEixEm(ptr noundef nonnull align 8 dereferenceable(128) %27, i64 noundef 8) #8
  store i64 -9223372036854775808, ptr %28, align 8, !tbaa !11
  %29 = load ptr, ptr %6, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct.PBKDF2_CTX.4, ptr %29, i32 0, i32 3
  %31 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayImLm16EEixEm(ptr noundef nonnull align 8 dereferenceable(128) %30, i64 noundef 15) #8
  store i64 1536, ptr %31, align 8, !tbaa !11
  %32 = getelementptr inbounds %struct.SHA512_CTX, ptr %11, i32 0, i32 0
  %33 = call noundef ptr @_ZNSt5arrayImLm8EE4dataEv(ptr noundef nonnull align 8 dereferenceable(64) %32) #9
  %34 = load ptr, ptr %6, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct.PBKDF2_CTX.4, ptr %34, i32 0, i32 1
  %36 = call noundef ptr @_ZNSt5arrayImLm8EE4dataEv(ptr noundef nonnull align 8 dereferenceable(64) %35) #9
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %33, ptr align 8 %36, i64 64, i1 false)
  %37 = getelementptr inbounds %struct.SHA512_CTX, ptr %11, i32 0, i32 1
  %38 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayImLm2EEixEm(ptr noundef nonnull align 8 dereferenceable(16) %37, i64 noundef 0) #8
  store i64 1024, ptr %38, align 8, !tbaa !11
  %39 = getelementptr inbounds %struct.SHA512_CTX, ptr %11, i32 0, i32 1
  %40 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayImLm2EEixEm(ptr noundef nonnull align 8 dereferenceable(16) %39, i64 noundef 1) #8
  store i64 0, ptr %40, align 8, !tbaa !11
  %41 = load ptr, ptr %9, align 8, !tbaa !5
  %42 = load i32, ptr %10, align 4, !tbaa !9
  %43 = sext i32 %42 to i64
  call void @_Z13sha512_UpdateP10SHA512_CTXPKhm(ptr noundef %11, ptr noundef %41, i64 noundef %43)
  call void @_Z13sha512_UpdateP10SHA512_CTXPKhm(ptr noundef %11, ptr noundef %12, i64 noundef 4)
  %44 = load ptr, ptr %6, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.PBKDF2_CTX.4, ptr %44, i32 0, i32 3
  %46 = call noundef ptr @_ZNSt5arrayImLm16EE4dataEv(ptr noundef nonnull align 8 dereferenceable(128) %45) #9
  call void @_Z12sha512_FinalP10SHA512_CTXPh(ptr noundef %11, ptr noundef %46)
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #8
  store i32 0, ptr %13, align 4, !tbaa !9
  br label %47

47:                                               ; preds = %65, %5
  %48 = load i32, ptr %13, align 4, !tbaa !9
  %49 = zext i32 %48 to i64
  %50 = icmp ult i64 %49, 8
  br i1 %50, label %52, label %51

51:                                               ; preds = %47
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #8
  br label %68

52:                                               ; preds = %47
  %53 = load ptr, ptr %6, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.PBKDF2_CTX.4, ptr %53, i32 0, i32 3
  %55 = load i32, ptr %13, align 4, !tbaa !9
  %56 = zext i32 %55 to i64
  %57 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayImLm16EEixEm(ptr noundef nonnull align 8 dereferenceable(128) %54, i64 noundef %56) #8
  %58 = load i64, ptr %57, align 8, !tbaa !11
  %59 = call noundef i64 @_ZL9reverse64m(i64 noundef %58)
  %60 = load ptr, ptr %6, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct.PBKDF2_CTX.4, ptr %60, i32 0, i32 3
  %62 = load i32, ptr %13, align 4, !tbaa !9
  %63 = zext i32 %62 to i64
  %64 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayImLm16EEixEm(ptr noundef nonnull align 8 dereferenceable(128) %61, i64 noundef %63) #8
  store i64 %59, ptr %64, align 8, !tbaa !11
  br label %65

65:                                               ; preds = %52
  %66 = load i32, ptr %13, align 4, !tbaa !9
  %67 = add i32 %66, 1
  store i32 %67, ptr %13, align 4, !tbaa !9
  br label %47, !llvm.loop !13

68:                                               ; preds = %51
  %69 = load ptr, ptr %6, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct.PBKDF2_CTX.4, ptr %69, i32 0, i32 0
  %71 = load ptr, ptr %6, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct.PBKDF2_CTX.4, ptr %71, i32 0, i32 3
  %73 = load ptr, ptr %6, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.PBKDF2_CTX.4, ptr %73, i32 0, i32 3
  %75 = call noundef ptr @_ZNSt5arrayImLm16EE4dataEv(ptr noundef nonnull align 8 dereferenceable(128) %74) #9
  call void @_Z16sha512_TransformRKSt5arrayImLm8EERKS_ImLm16EEPm(ptr noundef nonnull align 8 dereferenceable(64) %70, ptr noundef nonnull align 8 dereferenceable(128) %72, ptr noundef %75)
  %76 = load ptr, ptr %6, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.PBKDF2_CTX.4, ptr %76, i32 0, i32 2
  %78 = call noundef ptr @_ZNSt5arrayImLm8EE4dataEv(ptr noundef nonnull align 8 dereferenceable(64) %77) #9
  %79 = load ptr, ptr %6, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct.PBKDF2_CTX.4, ptr %79, i32 0, i32 3
  %81 = call noundef ptr @_ZNSt5arrayImLm16EE4dataEv(ptr noundef nonnull align 8 dereferenceable(128) %80) #9
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %78, ptr align 8 %81, i64 64, i1 false)
  %82 = load ptr, ptr %6, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct.PBKDF2_CTX.4, ptr %82, i32 0, i32 4
  store i8 1, ptr %83, align 8, !tbaa !15
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #8
  call void @llvm.lifetime.end.p0(i64 208, ptr %11) #8
  ret void
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN10SHA512_CTXC2Ev(ptr noundef nonnull align 8 dereferenceable(208)) unnamed_addr #1 align 2

declare void @_Z19hmac_sha512_preparePKhmRSt5arrayImLm8EES3_(ptr noundef, i64 noundef, ptr noundef nonnull align 8 dereferenceable(64), ptr noundef nonnull align 8 dereferenceable(64)) #5

; Function Attrs: mustprogress nounwind willreturn memory(none) uwtable
declare dso_local noundef ptr @_ZNSt5arrayImLm16EE4dataEv(ptr noundef nonnull align 8 dereferenceable(128)) #6 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayImLm16EEixEm(ptr noundef nonnull align 8 dereferenceable(128), i64 noundef) #7 align 2

; Function Attrs: mustprogress nounwind willreturn memory(none) uwtable
declare dso_local noundef ptr @_ZNSt5arrayImLm8EE4dataEv(ptr noundef nonnull align 8 dereferenceable(64)) #6 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayImLm2EEixEm(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef) #7 align 2

declare void @_Z13sha512_UpdateP10SHA512_CTXPKhm(ptr noundef, ptr noundef, i64 noundef) #5

declare void @_Z12sha512_FinalP10SHA512_CTXPh(ptr noundef, ptr noundef) #5

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef i64 @_ZL9reverse64m(i64 noundef) #1

declare void @_Z16sha512_TransformRKSt5arrayImLm8EERKS_ImLm16EEPm(ptr noundef nonnull align 8 dereferenceable(64), ptr noundef nonnull align 8 dereferenceable(128), ptr noundef) #5

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { inlinehint mustprogress 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 #2 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { mustprogress 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 = { "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 = { mustprogress nounwind willreturn memory(none) 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 #7 = { mustprogress 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 #8 = { nounwind }
attributes #9 = { nounwind 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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = !{!16, !7, i64 320}
!16 = !{!"_ZTS10PBKDF2_CTXImLm128ELm64EE", !17, i64 0, !17, i64 64, !17, i64 128, !18, i64 192, !7, i64 320}
!17 = !{!"_ZTSSt5arrayImLm8EE", !7, i64 0}
!18 = !{!"_ZTSSt5arrayImLm16EE", !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"

%struct.SHA512_CTX = type { %"struct.std::array.1", %"struct.std::array.2", %"struct.std::array.3" }
%"struct.std::array.1" = type { [8 x i64] }
%"struct.std::array.2" = type { [2 x i64] }
%"struct.std::array.3" = type { [16 x i64] }

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef i32 @_ZL9Reverse32j(i32 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z23pbkdf2_hmac_sha512_InitImLm128ELm64EEvP10PBKDF2_CTXIT_XT0_EXT1_EEPKhiS5_i(ptr noundef %0, ptr noundef %1, i32 noundef %2, ptr noundef %3, i32 noundef %4) local_unnamed_addr #4 {
  %6 = alloca %struct.SHA512_CTX, align 8
  %7 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 208, ptr nonnull %6) #8
  call void @_ZN10SHA512_CTXC2Ev(ptr noundef nonnull align 8 dereferenceable(208) %6) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #8
  %8 = call noundef i32 @_ZL9Reverse32j(i32 noundef 1)
  store i32 %8, ptr %7, align 4, !tbaa !5
  %9 = sext i32 %2 to i64
  %10 = getelementptr inbounds i8, ptr %0, i64 64
  call void @_Z19hmac_sha512_preparePKhmRSt5arrayImLm8EES3_(ptr noundef %1, i64 noundef %9, ptr noundef nonnull align 8 dereferenceable(64) %0, ptr noundef nonnull align 8 dereferenceable(64) %10)
  %11 = getelementptr inbounds i8, ptr %0, i64 192
  %12 = call noundef ptr @_ZNSt5arrayImLm16EE4dataEv(ptr noundef nonnull align 8 dereferenceable(128) %11) #9
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(128) %12, i8 0, i64 128, i1 false)
  %13 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayImLm16EEixEm(ptr noundef nonnull align 8 dereferenceable(128) %11, i64 noundef 8) #8
  store i64 -9223372036854775808, ptr %13, align 8, !tbaa !9
  %14 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayImLm16EEixEm(ptr noundef nonnull align 8 dereferenceable(128) %11, i64 noundef 15) #8
  store i64 1536, ptr %14, align 8, !tbaa !9
  %15 = call noundef ptr @_ZNSt5arrayImLm8EE4dataEv(ptr noundef nonnull align 8 dereferenceable(64) %6) #9
  %16 = call noundef ptr @_ZNSt5arrayImLm8EE4dataEv(ptr noundef nonnull align 8 dereferenceable(64) %10) #9
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %15, ptr noundef nonnull align 8 dereferenceable(64) %16, i64 64, i1 false)
  %17 = getelementptr inbounds i8, ptr %6, i64 64
  %18 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayImLm2EEixEm(ptr noundef nonnull align 8 dereferenceable(16) %17, i64 noundef 0) #8
  store i64 1024, ptr %18, align 8, !tbaa !9
  %19 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayImLm2EEixEm(ptr noundef nonnull align 8 dereferenceable(16) %17, i64 noundef 1) #8
  store i64 0, ptr %19, align 8, !tbaa !9
  %20 = sext i32 %4 to i64
  call void @_Z13sha512_UpdateP10SHA512_CTXPKhm(ptr noundef nonnull %6, ptr noundef %3, i64 noundef %20)
  call void @_Z13sha512_UpdateP10SHA512_CTXPKhm(ptr noundef nonnull %6, ptr noundef nonnull %7, i64 noundef 4)
  call void @_Z12sha512_FinalP10SHA512_CTXPh(ptr noundef nonnull %6, ptr noundef %12)
  %21 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayImLm16EEixEm(ptr noundef nonnull align 8 dereferenceable(128) %11, i64 noundef 0) #8
  %22 = load i64, ptr %21, align 8, !tbaa !9
  %23 = call noundef i64 @_ZL9reverse64m(i64 noundef %22)
  %24 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayImLm16EEixEm(ptr noundef nonnull align 8 dereferenceable(128) %11, i64 noundef 0) #8
  store i64 %23, ptr %24, align 8, !tbaa !9
  %25 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayImLm16EEixEm(ptr noundef nonnull align 8 dereferenceable(128) %11, i64 noundef 1) #8
  %26 = load i64, ptr %25, align 8, !tbaa !9
  %27 = call noundef i64 @_ZL9reverse64m(i64 noundef %26)
  %28 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayImLm16EEixEm(ptr noundef nonnull align 8 dereferenceable(128) %11, i64 noundef 1) #8
  store i64 %27, ptr %28, align 8, !tbaa !9
  %29 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayImLm16EEixEm(ptr noundef nonnull align 8 dereferenceable(128) %11, i64 noundef 2) #8
  %30 = load i64, ptr %29, align 8, !tbaa !9
  %31 = call noundef i64 @_ZL9reverse64m(i64 noundef %30)
  %32 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayImLm16EEixEm(ptr noundef nonnull align 8 dereferenceable(128) %11, i64 noundef 2) #8
  store i64 %31, ptr %32, align 8, !tbaa !9
  %33 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayImLm16EEixEm(ptr noundef nonnull align 8 dereferenceable(128) %11, i64 noundef 3) #8
  %34 = load i64, ptr %33, align 8, !tbaa !9
  %35 = call noundef i64 @_ZL9reverse64m(i64 noundef %34)
  %36 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayImLm16EEixEm(ptr noundef nonnull align 8 dereferenceable(128) %11, i64 noundef 3) #8
  store i64 %35, ptr %36, align 8, !tbaa !9
  %37 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayImLm16EEixEm(ptr noundef nonnull align 8 dereferenceable(128) %11, i64 noundef 4) #8
  %38 = load i64, ptr %37, align 8, !tbaa !9
  %39 = call noundef i64 @_ZL9reverse64m(i64 noundef %38)
  %40 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayImLm16EEixEm(ptr noundef nonnull align 8 dereferenceable(128) %11, i64 noundef 4) #8
  store i64 %39, ptr %40, align 8, !tbaa !9
  %41 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayImLm16EEixEm(ptr noundef nonnull align 8 dereferenceable(128) %11, i64 noundef 5) #8
  %42 = load i64, ptr %41, align 8, !tbaa !9
  %43 = call noundef i64 @_ZL9reverse64m(i64 noundef %42)
  %44 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayImLm16EEixEm(ptr noundef nonnull align 8 dereferenceable(128) %11, i64 noundef 5) #8
  store i64 %43, ptr %44, align 8, !tbaa !9
  %45 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayImLm16EEixEm(ptr noundef nonnull align 8 dereferenceable(128) %11, i64 noundef 6) #8
  %46 = load i64, ptr %45, align 8, !tbaa !9
  %47 = call noundef i64 @_ZL9reverse64m(i64 noundef %46)
  %48 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayImLm16EEixEm(ptr noundef nonnull align 8 dereferenceable(128) %11, i64 noundef 6) #8
  store i64 %47, ptr %48, align 8, !tbaa !9
  %49 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayImLm16EEixEm(ptr noundef nonnull align 8 dereferenceable(128) %11, i64 noundef 7) #8
  %50 = load i64, ptr %49, align 8, !tbaa !9
  %51 = call noundef i64 @_ZL9reverse64m(i64 noundef %50)
  %52 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayImLm16EEixEm(ptr noundef nonnull align 8 dereferenceable(128) %11, i64 noundef 7) #8
  store i64 %51, ptr %52, align 8, !tbaa !9
  call void @_Z16sha512_TransformRKSt5arrayImLm8EERKS_ImLm16EEPm(ptr noundef nonnull align 8 dereferenceable(64) %0, ptr noundef nonnull align 8 dereferenceable(128) %11, ptr noundef %12)
  %53 = getelementptr inbounds i8, ptr %0, i64 128
  %54 = call noundef ptr @_ZNSt5arrayImLm8EE4dataEv(ptr noundef nonnull align 8 dereferenceable(64) %53) #9
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %54, ptr noundef nonnull align 8 dereferenceable(64) %12, i64 64, i1 false)
  %55 = getelementptr inbounds i8, ptr %0, i64 320
  store i8 1, ptr %55, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #8
  call void @llvm.lifetime.end.p0(i64 208, ptr nonnull %6) #8
  ret void
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN10SHA512_CTXC2Ev(ptr noundef nonnull align 8 dereferenceable(208)) unnamed_addr #1 align 2

declare void @_Z19hmac_sha512_preparePKhmRSt5arrayImLm8EES3_(ptr noundef, i64 noundef, ptr noundef nonnull align 8 dereferenceable(64), ptr noundef nonnull align 8 dereferenceable(64)) local_unnamed_addr #5

; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) uwtable
declare dso_local noundef ptr @_ZNSt5arrayImLm16EE4dataEv(ptr noundef nonnull align 8 dereferenceable(128)) local_unnamed_addr #6 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayImLm16EEixEm(ptr noundef nonnull align 8 dereferenceable(128), i64 noundef) local_unnamed_addr #7 align 2

; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) uwtable
declare dso_local noundef ptr @_ZNSt5arrayImLm8EE4dataEv(ptr noundef nonnull align 8 dereferenceable(64)) local_unnamed_addr #6 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayImLm2EEixEm(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef) local_unnamed_addr #7 align 2

declare void @_Z13sha512_UpdateP10SHA512_CTXPKhm(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #5

declare void @_Z12sha512_FinalP10SHA512_CTXPh(ptr noundef, ptr noundef) local_unnamed_addr #5

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef i64 @_ZL9reverse64m(i64 noundef) local_unnamed_addr #1

declare void @_Z16sha512_TransformRKSt5arrayImLm8EERKS_ImLm16EEPm(ptr noundef nonnull align 8 dereferenceable(64), ptr noundef nonnull align 8 dereferenceable(128), ptr noundef) local_unnamed_addr #5

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { inlinehint mustprogress 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 #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { mustprogress 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 = { "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 = { mustprogress nofree nosync nounwind willreturn memory(none) 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 #7 = { mustprogress 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 #8 = { nounwind }
attributes #9 = { nounwind 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!12, !7, i64 320}
!12 = !{!"_ZTS10PBKDF2_CTXImLm128ELm64EE", !13, i64 0, !13, i64 64, !13, i64 128, !14, i64 192, !7, i64 320}
!13 = !{!"_ZTSSt5arrayImLm8EE", !7, i64 0}
!14 = !{!"_ZTSSt5arrayImLm16EE", !7, i64 0}


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