; 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.SHA256_CTX = type { %"struct.std::array", %"struct.std::array.0", i64 }
%"struct.std::array" = type { [16 x i32] }
%"struct.std::array.0" = type { [8 x i32] }
%struct.PBKDF2_CTX = type { %"struct.std::array.0", %"struct.std::array.0", %"struct.std::array.0", %"struct.std::array", i8 }

; Function Attrs: mustprogress uwtable
define dso_local void @_Z23pbkdf2_hmac_sha256_InitIjLm64ELm32EEvP10PBKDF2_CTXIT_XT0_EXT1_EEPKhiS5_i(ptr noundef %0, ptr noundef %1, i32 noundef %2, ptr noundef %3, i32 noundef %4) #0 {
  %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.SHA256_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 104, ptr %11) #8
  call void @_ZN10SHA256_CTXC2Ev(ptr noundef nonnull align 8 dereferenceable(104) %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, ptr %19, i32 0, i32 0
  %21 = call noundef ptr @_ZNSt5arrayIjLm8EE4dataEv(ptr noundef nonnull align 4 dereferenceable(32) %20) #9
  %22 = load ptr, ptr %6, align 8, !tbaa !5
  %23 = getelementptr inbounds %struct.PBKDF2_CTX, ptr %22, i32 0, i32 1
  %24 = call noundef ptr @_ZNSt5arrayIjLm8EE4dataEv(ptr noundef nonnull align 4 dereferenceable(32) %23) #9
  call void @_Z19hmac_sha256_preparePKhmPjS1_(ptr noundef %16, i64 noundef %18, ptr noundef %21, ptr noundef %24)
  %25 = load ptr, ptr %6, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct.PBKDF2_CTX, ptr %25, i32 0, i32 3
  %27 = call noundef ptr @_ZNSt5arrayIjLm16EE4dataEv(ptr noundef nonnull align 4 dereferenceable(64) %26) #9
  call void @llvm.memset.p0.i64(ptr align 4 %27, i8 0, i64 64, i1 false)
  %28 = load ptr, ptr %6, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct.PBKDF2_CTX, ptr %28, i32 0, i32 3
  %30 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5arrayIjLm16EEixEm(ptr noundef nonnull align 4 dereferenceable(64) %29, i64 noundef 8) #8
  store i32 -2147483648, ptr %30, align 4, !tbaa !9
  %31 = load ptr, ptr %6, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct.PBKDF2_CTX, ptr %31, i32 0, i32 3
  %33 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5arrayIjLm16EEixEm(ptr noundef nonnull align 4 dereferenceable(64) %32, i64 noundef 15) #8
  store i32 768, ptr %33, align 4, !tbaa !9
  %34 = getelementptr inbounds %struct.SHA256_CTX, ptr %11, i32 0, i32 1
  %35 = call noundef ptr @_ZNSt5arrayIjLm8EE4dataEv(ptr noundef nonnull align 4 dereferenceable(32) %34) #9
  %36 = load ptr, ptr %6, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct.PBKDF2_CTX, ptr %36, i32 0, i32 1
  %38 = call noundef ptr @_ZNSt5arrayIjLm8EE4dataEv(ptr noundef nonnull align 4 dereferenceable(32) %37) #9
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %35, ptr align 4 %38, i64 32, i1 false)
  %39 = getelementptr inbounds %struct.SHA256_CTX, ptr %11, i32 0, i32 2
  store i64 512, ptr %39, align 8, !tbaa !11
  %40 = load ptr, ptr %9, align 8, !tbaa !5
  %41 = load i32, ptr %10, align 4, !tbaa !9
  %42 = sext i32 %41 to i64
  call void @_Z13sha256_UpdateP10SHA256_CTXPKhm(ptr noundef %11, ptr noundef %40, i64 noundef %42)
  call void @_Z13sha256_UpdateP10SHA256_CTXPKhm(ptr noundef %11, ptr noundef %12, i64 noundef 4)
  %43 = load ptr, ptr %6, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.PBKDF2_CTX, ptr %43, i32 0, i32 3
  %45 = call noundef ptr @_ZNSt5arrayIjLm16EE4dataEv(ptr noundef nonnull align 4 dereferenceable(64) %44) #9
  call void @_Z12sha256_FinalP10SHA256_CTXPh(ptr noundef %11, ptr noundef %45)
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #8
  store i32 0, ptr %13, align 4, !tbaa !9
  br label %46

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

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

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

64:                                               ; preds = %51
  %65 = load i32, ptr %13, align 4, !tbaa !9
  %66 = add i32 %65, 1
  store i32 %66, ptr %13, align 4, !tbaa !9
  br label %46, !llvm.loop !16

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

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

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

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

declare void @_Z19hmac_sha256_preparePKhmPjS1_(ptr noundef, i64 noundef, ptr noundef, ptr noundef) #3

; Function Attrs: mustprogress nounwind willreturn memory(none) uwtable
declare dso_local noundef ptr @_ZNSt5arrayIjLm8EE4dataEv(ptr noundef nonnull align 4 dereferenceable(32)) #4 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5arrayIjLm16EEixEm(ptr noundef nonnull align 4 dereferenceable(64), i64 noundef) #6 align 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) #7

declare void @_Z13sha256_UpdateP10SHA256_CTXPKhm(ptr noundef, ptr noundef, i64 noundef) #3

declare void @_Z12sha256_FinalP10SHA256_CTXPh(ptr noundef, ptr noundef) #3

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

declare void @_Z16sha256_TransformRKSt5arrayIjLm8EERKS_IjLm16EEPj(ptr noundef nonnull align 4 dereferenceable(32), ptr noundef nonnull align 4 dereferenceable(64), ptr noundef) #3

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { "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 = { 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 #5 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #6 = { 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 #7 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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, !15, i64 96}
!12 = !{!"_ZTS10SHA256_CTX", !13, i64 0, !14, i64 64, !15, i64 96}
!13 = !{!"_ZTSSt5arrayIjLm16EE", !7, i64 0}
!14 = !{!"_ZTSSt5arrayIjLm8EE", !7, i64 0}
!15 = !{!"long", !7, i64 0}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = !{!19, !7, i64 160}
!19 = !{!"_ZTS10PBKDF2_CTXIjLm64ELm32EE", !14, i64 0, !14, i64 32, !14, i64 64, !13, i64 96, !7, i64 160}


; 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.SHA256_CTX = type { %"struct.std::array", %"struct.std::array.0", i64 }
%"struct.std::array" = type { [16 x i32] }
%"struct.std::array.0" = type { [8 x i32] }

; Function Attrs: mustprogress uwtable
define dso_local void @_Z23pbkdf2_hmac_sha256_InitIjLm64ELm32EEvP10PBKDF2_CTXIT_XT0_EXT1_EEPKhiS5_i(ptr noundef %0, ptr noundef %1, i32 noundef %2, ptr noundef %3, i32 noundef %4) local_unnamed_addr #0 {
  %6 = alloca %struct.SHA256_CTX, align 8
  %7 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 104, ptr nonnull %6) #8
  call void @_ZN10SHA256_CTXC2Ev(ptr noundef nonnull align 8 dereferenceable(104) %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 = call noundef ptr @_ZNSt5arrayIjLm8EE4dataEv(ptr noundef nonnull align 4 dereferenceable(32) %0) #9
  %11 = getelementptr inbounds i8, ptr %0, i64 32
  %12 = call noundef ptr @_ZNSt5arrayIjLm8EE4dataEv(ptr noundef nonnull align 4 dereferenceable(32) %11) #9
  call void @_Z19hmac_sha256_preparePKhmPjS1_(ptr noundef %1, i64 noundef %9, ptr noundef %10, ptr noundef %12)
  %13 = getelementptr inbounds i8, ptr %0, i64 96
  %14 = call noundef ptr @_ZNSt5arrayIjLm16EE4dataEv(ptr noundef nonnull align 4 dereferenceable(64) %13) #9
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(64) %14, i8 0, i64 64, i1 false)
  %15 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5arrayIjLm16EEixEm(ptr noundef nonnull align 4 dereferenceable(64) %13, i64 noundef 8) #8
  store i32 -2147483648, ptr %15, align 4, !tbaa !5
  %16 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5arrayIjLm16EEixEm(ptr noundef nonnull align 4 dereferenceable(64) %13, i64 noundef 15) #8
  store i32 768, ptr %16, align 4, !tbaa !5
  %17 = getelementptr inbounds i8, ptr %6, i64 64
  %18 = call noundef ptr @_ZNSt5arrayIjLm8EE4dataEv(ptr noundef nonnull align 4 dereferenceable(32) %17) #9
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(32) %18, ptr noundef nonnull align 4 dereferenceable(32) %12, i64 32, i1 false)
  %19 = getelementptr inbounds i8, ptr %6, i64 96
  store i64 512, ptr %19, align 8, !tbaa !9
  %20 = sext i32 %4 to i64
  call void @_Z13sha256_UpdateP10SHA256_CTXPKhm(ptr noundef nonnull %6, ptr noundef %3, i64 noundef %20)
  call void @_Z13sha256_UpdateP10SHA256_CTXPKhm(ptr noundef nonnull %6, ptr noundef nonnull %7, i64 noundef 4)
  call void @_Z12sha256_FinalP10SHA256_CTXPh(ptr noundef nonnull %6, ptr noundef %14)
  %21 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5arrayIjLm16EEixEm(ptr noundef nonnull align 4 dereferenceable(64) %13, i64 noundef 0) #8
  %22 = load i32, ptr %21, align 4, !tbaa !5
  %23 = call noundef i32 @_ZL9Reverse32j(i32 noundef %22)
  %24 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5arrayIjLm16EEixEm(ptr noundef nonnull align 4 dereferenceable(64) %13, i64 noundef 0) #8
  store i32 %23, ptr %24, align 4, !tbaa !5
  %25 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5arrayIjLm16EEixEm(ptr noundef nonnull align 4 dereferenceable(64) %13, i64 noundef 1) #8
  %26 = load i32, ptr %25, align 4, !tbaa !5
  %27 = call noundef i32 @_ZL9Reverse32j(i32 noundef %26)
  %28 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5arrayIjLm16EEixEm(ptr noundef nonnull align 4 dereferenceable(64) %13, i64 noundef 1) #8
  store i32 %27, ptr %28, align 4, !tbaa !5
  %29 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5arrayIjLm16EEixEm(ptr noundef nonnull align 4 dereferenceable(64) %13, i64 noundef 2) #8
  %30 = load i32, ptr %29, align 4, !tbaa !5
  %31 = call noundef i32 @_ZL9Reverse32j(i32 noundef %30)
  %32 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5arrayIjLm16EEixEm(ptr noundef nonnull align 4 dereferenceable(64) %13, i64 noundef 2) #8
  store i32 %31, ptr %32, align 4, !tbaa !5
  %33 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5arrayIjLm16EEixEm(ptr noundef nonnull align 4 dereferenceable(64) %13, i64 noundef 3) #8
  %34 = load i32, ptr %33, align 4, !tbaa !5
  %35 = call noundef i32 @_ZL9Reverse32j(i32 noundef %34)
  %36 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5arrayIjLm16EEixEm(ptr noundef nonnull align 4 dereferenceable(64) %13, i64 noundef 3) #8
  store i32 %35, ptr %36, align 4, !tbaa !5
  %37 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5arrayIjLm16EEixEm(ptr noundef nonnull align 4 dereferenceable(64) %13, i64 noundef 4) #8
  %38 = load i32, ptr %37, align 4, !tbaa !5
  %39 = call noundef i32 @_ZL9Reverse32j(i32 noundef %38)
  %40 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5arrayIjLm16EEixEm(ptr noundef nonnull align 4 dereferenceable(64) %13, i64 noundef 4) #8
  store i32 %39, ptr %40, align 4, !tbaa !5
  %41 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5arrayIjLm16EEixEm(ptr noundef nonnull align 4 dereferenceable(64) %13, i64 noundef 5) #8
  %42 = load i32, ptr %41, align 4, !tbaa !5
  %43 = call noundef i32 @_ZL9Reverse32j(i32 noundef %42)
  %44 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5arrayIjLm16EEixEm(ptr noundef nonnull align 4 dereferenceable(64) %13, i64 noundef 5) #8
  store i32 %43, ptr %44, align 4, !tbaa !5
  %45 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5arrayIjLm16EEixEm(ptr noundef nonnull align 4 dereferenceable(64) %13, i64 noundef 6) #8
  %46 = load i32, ptr %45, align 4, !tbaa !5
  %47 = call noundef i32 @_ZL9Reverse32j(i32 noundef %46)
  %48 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5arrayIjLm16EEixEm(ptr noundef nonnull align 4 dereferenceable(64) %13, i64 noundef 6) #8
  store i32 %47, ptr %48, align 4, !tbaa !5
  %49 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5arrayIjLm16EEixEm(ptr noundef nonnull align 4 dereferenceable(64) %13, i64 noundef 7) #8
  %50 = load i32, ptr %49, align 4, !tbaa !5
  %51 = call noundef i32 @_ZL9Reverse32j(i32 noundef %50)
  %52 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5arrayIjLm16EEixEm(ptr noundef nonnull align 4 dereferenceable(64) %13, i64 noundef 7) #8
  store i32 %51, ptr %52, align 4, !tbaa !5
  call void @_Z16sha256_TransformRKSt5arrayIjLm8EERKS_IjLm16EEPj(ptr noundef nonnull align 4 dereferenceable(32) %0, ptr noundef nonnull align 4 dereferenceable(64) %13, ptr noundef %14)
  %53 = getelementptr inbounds i8, ptr %0, i64 64
  %54 = call noundef ptr @_ZNSt5arrayIjLm8EE4dataEv(ptr noundef nonnull align 4 dereferenceable(32) %53) #9
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(32) %54, ptr noundef nonnull align 4 dereferenceable(32) %14, i64 32, i1 false)
  %55 = getelementptr inbounds i8, ptr %0, i64 160
  store i8 1, ptr %55, align 4, !tbaa !14
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #8
  call void @llvm.lifetime.end.p0(i64 104, ptr nonnull %6) #8
  ret void
}

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

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

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

declare void @_Z19hmac_sha256_preparePKhmPjS1_(ptr noundef, i64 noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) uwtable
declare dso_local noundef ptr @_ZNSt5arrayIjLm8EE4dataEv(ptr noundef nonnull align 4 dereferenceable(32)) local_unnamed_addr #4 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5arrayIjLm16EEixEm(ptr noundef nonnull align 4 dereferenceable(64), i64 noundef) local_unnamed_addr #6 align 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) #7

declare void @_Z13sha256_UpdateP10SHA256_CTXPKhm(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #3

declare void @_Z12sha256_FinalP10SHA256_CTXPh(ptr noundef, ptr noundef) local_unnamed_addr #3

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

declare void @_Z16sha256_TransformRKSt5arrayIjLm8EERKS_IjLm16EEPj(ptr noundef nonnull align 4 dereferenceable(32), ptr noundef nonnull align 4 dereferenceable(64), ptr noundef) local_unnamed_addr #3

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { "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 = { 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 #5 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #6 = { 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 #7 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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, !13, i64 96}
!10 = !{!"_ZTS10SHA256_CTX", !11, i64 0, !12, i64 64, !13, i64 96}
!11 = !{!"_ZTSSt5arrayIjLm16EE", !7, i64 0}
!12 = !{!"_ZTSSt5arrayIjLm8EE", !7, i64 0}
!13 = !{!"long", !7, i64 0}
!14 = !{!15, !7, i64 160}
!15 = !{!"_ZTS10PBKDF2_CTXIjLm64ELm32EE", !12, i64 0, !12, i64 32, !12, i64 64, !11, i64 96, !7, i64 160}


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