; LLVM IR from dynexcoin/Dynex :: src/Wallet (WalletSerializationV1)

; 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.DynexCN::WalletSerializerV1::CryptoContext" = type { %"struct.Crypto::chacha8_key", %"struct.Crypto::chacha8_iv" }
%"struct.Crypto::chacha8_key" = type { [32 x i8] }
%"struct.Crypto::chacha8_iv" = type { [8 x i8] }

declare i32 @__gxx_personality_v0(...)

; 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

; 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 @_ZN7DynexCN18WalletSerializerV110loadWalletERN6Common12IInputStreamERKN6Crypto11chacha8_keyEj(ptr noundef nonnull align 8 dereferenceable(92) %0, ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 1 dereferenceable(32) %2, i32 noundef %3) #2 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca %"struct.DynexCN::WalletSerializerV1::CryptoContext", align 1
  %10 = alloca i8, align 1
  %11 = alloca i8, align 1
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  store i32 %3, ptr %8, align 4, !tbaa !9
  %14 = load ptr, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 40, ptr %9) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr %10) #4
  store i8 0, ptr %10, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 1, ptr %11) #4
  store i8 0, ptr %11, align 1, !tbaa !11
  %15 = load ptr, ptr %6, align 8, !tbaa !5
  %16 = getelementptr inbounds %"struct.DynexCN::WalletSerializerV1::CryptoContext", ptr %9, i32 0, i32 1
  invoke void @_ZN7DynexCN18WalletSerializerV16loadIvERN6Common12IInputStreamERN6Crypto10chacha8_ivE(ptr noundef nonnull align 8 dereferenceable(92) %14, ptr noundef nonnull align 8 dereferenceable(8) %15, ptr noundef nonnull align 1 dereferenceable(8) %16)
          to label %17 unwind label %36

17:                                               ; preds = %4
  %18 = load ptr, ptr %7, align 8, !tbaa !5
  %19 = getelementptr inbounds %"struct.DynexCN::WalletSerializerV1::CryptoContext", ptr %9, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %19, ptr align 1 %18, i64 32, i1 false), !tbaa.struct !13
  %20 = load ptr, ptr %6, align 8, !tbaa !5
  invoke void @_ZN7DynexCN18WalletSerializerV18loadKeysERN6Common12IInputStreamERNS0_13CryptoContextE(ptr noundef nonnull align 8 dereferenceable(92) %14, ptr noundef nonnull align 8 dereferenceable(8) %20, ptr noundef nonnull align 1 dereferenceable(40) %9)
          to label %21 unwind label %36

21:                                               ; preds = %17
  invoke void @_ZN7DynexCN18WalletSerializerV19checkKeysEv(ptr noundef nonnull align 8 dereferenceable(92) %14)
          to label %22 unwind label %36

22:                                               ; preds = %21
  %23 = load ptr, ptr %6, align 8, !tbaa !5
  invoke void @_ZN7DynexCN18WalletSerializerV111loadWalletsERN6Common12IInputStreamERNS0_13CryptoContextE(ptr noundef nonnull align 8 dereferenceable(92) %14, ptr noundef nonnull align 8 dereferenceable(8) %23, ptr noundef nonnull align 1 dereferenceable(40) %9)
          to label %24 unwind label %36

24:                                               ; preds = %22
  invoke void @_ZN7DynexCN18WalletSerializerV116subscribeWalletsEv(ptr noundef nonnull align 8 dereferenceable(92) %14)
          to label %25 unwind label %36

25:                                               ; preds = %24
  %26 = load ptr, ptr %6, align 8, !tbaa !5
  invoke void @_ZN7DynexCN18WalletSerializerV19loadFlagsERbS1_RN6Common12IInputStreamERNS0_13CryptoContextE(ptr noundef nonnull align 8 dereferenceable(92) %14, ptr noundef nonnull align 1 dereferenceable(1) %10, ptr noundef nonnull align 1 dereferenceable(1) %11, ptr noundef nonnull align 8 dereferenceable(8) %26, ptr noundef nonnull align 1 dereferenceable(40) %9)
          to label %27 unwind label %36

27:                                               ; preds = %25
  %28 = load i8, ptr %10, align 1, !tbaa !11, !range !15, !noundef !16
  %29 = trunc i8 %28 to i1
  br i1 %29, label %30, label %40

30:                                               ; preds = %27
  %31 = load ptr, ptr %6, align 8, !tbaa !5
  invoke void @_ZN7DynexCN18WalletSerializerV116loadTransactionsERN6Common12IInputStreamERNS0_13CryptoContextE(ptr noundef nonnull align 8 dereferenceable(92) %14, ptr noundef nonnull align 8 dereferenceable(8) %31, ptr noundef nonnull align 1 dereferenceable(40) %9)
          to label %32 unwind label %36

32:                                               ; preds = %30
  %33 = load ptr, ptr %6, align 8, !tbaa !5
  %34 = load i32, ptr %8, align 4, !tbaa !9
  invoke void @_ZN7DynexCN18WalletSerializerV113loadTransfersERN6Common12IInputStreamERNS0_13CryptoContextEj(ptr noundef nonnull align 8 dereferenceable(92) %14, ptr noundef nonnull align 8 dereferenceable(8) %33, ptr noundef nonnull align 1 dereferenceable(40) %9, i32 noundef %34)
          to label %35 unwind label %36

35:                                               ; preds = %32
  br label %40

36:                                               ; preds = %81, %73, %69, %63, %58, %55, %50, %48, %43, %32, %30, %25, %24, %22, %21, %17, %4
  %37 = landingpad { ptr, i32 }
          cleanup
  %38 = extractvalue { ptr, i32 } %37, 0
  store ptr %38, ptr %12, align 8
  %39 = extractvalue { ptr, i32 } %37, 1
  store i32 %39, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #4
  call void @_ZN7DynexCN18WalletSerializerV113CryptoContextD2Ev(ptr noundef nonnull align 1 dereferenceable(40) %9) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr %9) #4
  br label %84

40:                                               ; preds = %35, %27
  %41 = load i32, ptr %8, align 4, !tbaa !9
  %42 = icmp ult i32 %41, 5
  br i1 %42, label %43, label %45

43:                                               ; preds = %40
  invoke void @_ZN7DynexCN18WalletSerializerV119updateTransfersSignEv(ptr noundef nonnull align 8 dereferenceable(92) %14)
          to label %44 unwind label %36

44:                                               ; preds = %43
  store i8 0, ptr %11, align 1, !tbaa !11
  br label %45

45:                                               ; preds = %44, %40
  %46 = load i8, ptr %11, align 1, !tbaa !11, !range !15, !noundef !16
  %47 = trunc i8 %46 to i1
  br i1 %47, label %48, label %73

48:                                               ; preds = %45
  %49 = load ptr, ptr %6, align 8, !tbaa !5
  invoke void @_ZN7DynexCN18WalletSerializerV112loadBalancesERN6Common12IInputStreamERNS0_13CryptoContextE(ptr noundef nonnull align 8 dereferenceable(92) %14, ptr noundef nonnull align 8 dereferenceable(8) %49, ptr noundef nonnull align 1 dereferenceable(40) %9)
          to label %50 unwind label %36

50:                                               ; preds = %48
  %51 = load ptr, ptr %6, align 8, !tbaa !5
  invoke void @_ZN7DynexCN18WalletSerializerV125loadTransfersSynchronizerERN6Common12IInputStreamERNS0_13CryptoContextE(ptr noundef nonnull align 8 dereferenceable(92) %14, ptr noundef nonnull align 8 dereferenceable(8) %51, ptr noundef nonnull align 1 dereferenceable(40) %9)
          to label %52 unwind label %36

52:                                               ; preds = %50
  %53 = load i32, ptr %8, align 4, !tbaa !9
  %54 = icmp ult i32 %53, 5
  br i1 %54, label %55, label %58

55:                                               ; preds = %52
  %56 = load ptr, ptr %6, align 8, !tbaa !5
  invoke void @_ZN7DynexCN18WalletSerializerV124loadObsoleteSpentOutputsERN6Common12IInputStreamERNS0_13CryptoContextE(ptr noundef nonnull align 8 dereferenceable(92) %14, ptr noundef nonnull align 8 dereferenceable(8) %56, ptr noundef nonnull align 1 dereferenceable(40) %9)
          to label %57 unwind label %36

57:                                               ; preds = %55
  br label %58

58:                                               ; preds = %57, %52
  %59 = load ptr, ptr %6, align 8, !tbaa !5
  invoke void @_ZN7DynexCN18WalletSerializerV126loadUnlockTransactionsJobsERN6Common12IInputStreamERNS0_13CryptoContextE(ptr noundef nonnull align 8 dereferenceable(92) %14, ptr noundef nonnull align 8 dereferenceable(8) %59, ptr noundef nonnull align 1 dereferenceable(40) %9)
          to label %60 unwind label %36

60:                                               ; preds = %58
  %61 = load i32, ptr %8, align 4, !tbaa !9
  %62 = icmp ult i32 %61, 5
  br i1 %62, label %63, label %66

63:                                               ; preds = %60
  %64 = load ptr, ptr %6, align 8, !tbaa !5
  invoke void @_ZN7DynexCN18WalletSerializerV118loadObsoleteChangeERN6Common12IInputStreamERNS0_13CryptoContextE(ptr noundef nonnull align 8 dereferenceable(92) %14, ptr noundef nonnull align 8 dereferenceable(8) %64, ptr noundef nonnull align 1 dereferenceable(40) %9)
          to label %65 unwind label %36

65:                                               ; preds = %63
  br label %66

66:                                               ; preds = %65, %60
  %67 = load i32, ptr %8, align 4, !tbaa !9
  %68 = icmp ugt i32 %67, 3
  br i1 %68, label %69, label %72

69:                                               ; preds = %66
  %70 = load ptr, ptr %6, align 8, !tbaa !5
  invoke void @_ZN7DynexCN18WalletSerializerV126loadUncommitedTransactionsERN6Common12IInputStreamERNS0_13CryptoContextE(ptr noundef nonnull align 8 dereferenceable(92) %14, ptr noundef nonnull align 8 dereferenceable(8) %70, ptr noundef nonnull align 1 dereferenceable(40) %9)
          to label %71 unwind label %36

71:                                               ; preds = %69
  br label %72

72:                                               ; preds = %71, %66
  br label %75

73:                                               ; preds = %45
  invoke void @_ZN7DynexCN18WalletSerializerV118resetCachedBalanceEv(ptr noundef nonnull align 8 dereferenceable(92) %14)
          to label %74 unwind label %36

74:                                               ; preds = %73
  br label %75

75:                                               ; preds = %74, %72
  %76 = load i8, ptr %10, align 1, !tbaa !11, !range !15, !noundef !16
  %77 = trunc i8 %76 to i1
  br i1 %77, label %78, label %83

78:                                               ; preds = %75
  %79 = load i8, ptr %11, align 1, !tbaa !11, !range !15, !noundef !16
  %80 = trunc i8 %79 to i1
  br i1 %80, label %81, label %83

81:                                               ; preds = %78
  invoke void @_ZN7DynexCN18WalletSerializerV128updateTransactionsBaseStatusEv(ptr noundef nonnull align 8 dereferenceable(92) %14)
          to label %82 unwind label %36

82:                                               ; preds = %81
  br label %83

83:                                               ; preds = %82, %78, %75
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #4
  call void @_ZN7DynexCN18WalletSerializerV113CryptoContextD2Ev(ptr noundef nonnull align 1 dereferenceable(40) %9) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr %9) #4
  ret void

84:                                               ; preds = %36
  %85 = load ptr, ptr %12, align 8
  %86 = load i32, ptr %13, align 4
  %87 = insertvalue { ptr, i32 } poison, ptr %85, 0
  %88 = insertvalue { ptr, i32 } %87, i32 %86, 1
  resume { ptr, i32 } %88
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7DynexCN18WalletSerializerV16loadIvERN6Common12IInputStreamERN6Crypto10chacha8_ivE(ptr noundef nonnull align 8 dereferenceable(92), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 1 dereferenceable(8)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7DynexCN18WalletSerializerV18loadKeysERN6Common12IInputStreamERNS0_13CryptoContextE(ptr noundef nonnull align 8 dereferenceable(92), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 1 dereferenceable(40)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7DynexCN18WalletSerializerV19checkKeysEv(ptr noundef nonnull align 8 dereferenceable(92)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7DynexCN18WalletSerializerV111loadWalletsERN6Common12IInputStreamERNS0_13CryptoContextE(ptr noundef nonnull align 8 dereferenceable(92), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 1 dereferenceable(40)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7DynexCN18WalletSerializerV116subscribeWalletsEv(ptr noundef nonnull align 8 dereferenceable(92)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7DynexCN18WalletSerializerV19loadFlagsERbS1_RN6Common12IInputStreamERNS0_13CryptoContextE(ptr noundef nonnull align 8 dereferenceable(92), ptr noundef nonnull align 1 dereferenceable(1), ptr noundef nonnull align 1 dereferenceable(1), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 1 dereferenceable(40)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7DynexCN18WalletSerializerV116loadTransactionsERN6Common12IInputStreamERNS0_13CryptoContextE(ptr noundef nonnull align 8 dereferenceable(92), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 1 dereferenceable(40)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7DynexCN18WalletSerializerV113loadTransfersERN6Common12IInputStreamERNS0_13CryptoContextEj(ptr noundef nonnull align 8 dereferenceable(92), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 1 dereferenceable(40), i32 noundef) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7DynexCN18WalletSerializerV119updateTransfersSignEv(ptr noundef nonnull align 8 dereferenceable(92)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7DynexCN18WalletSerializerV112loadBalancesERN6Common12IInputStreamERNS0_13CryptoContextE(ptr noundef nonnull align 8 dereferenceable(92), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 1 dereferenceable(40)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7DynexCN18WalletSerializerV125loadTransfersSynchronizerERN6Common12IInputStreamERNS0_13CryptoContextE(ptr noundef nonnull align 8 dereferenceable(92), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 1 dereferenceable(40)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7DynexCN18WalletSerializerV124loadObsoleteSpentOutputsERN6Common12IInputStreamERNS0_13CryptoContextE(ptr noundef nonnull align 8 dereferenceable(92), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 1 dereferenceable(40)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7DynexCN18WalletSerializerV126loadUnlockTransactionsJobsERN6Common12IInputStreamERNS0_13CryptoContextE(ptr noundef nonnull align 8 dereferenceable(92), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 1 dereferenceable(40)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7DynexCN18WalletSerializerV118loadObsoleteChangeERN6Common12IInputStreamERNS0_13CryptoContextE(ptr noundef nonnull align 8 dereferenceable(92), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 1 dereferenceable(40)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7DynexCN18WalletSerializerV126loadUncommitedTransactionsERN6Common12IInputStreamERNS0_13CryptoContextE(ptr noundef nonnull align 8 dereferenceable(92), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 1 dereferenceable(40)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7DynexCN18WalletSerializerV118resetCachedBalanceEv(ptr noundef nonnull align 8 dereferenceable(92)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7DynexCN18WalletSerializerV128updateTransactionsBaseStatusEv(ptr noundef nonnull align 8 dereferenceable(92)) #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN7DynexCN18WalletSerializerV113CryptoContextD2Ev(ptr noundef nonnull align 1 dereferenceable(40)) unnamed_addr #3 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { 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 #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++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{i64 0, i64 32, !14}
!14 = !{!7, !7, i64 0}
!15 = !{i8 0, i8 2}
!16 = !{}


; 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.DynexCN::WalletSerializerV1::CryptoContext" = type { %"struct.Crypto::chacha8_key", %"struct.Crypto::chacha8_iv" }
%"struct.Crypto::chacha8_key" = type { [32 x i8] }
%"struct.Crypto::chacha8_iv" = type { [8 x i8] }

declare i32 @__gxx_personality_v0(...)

; 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

; 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 @_ZN7DynexCN18WalletSerializerV110loadWalletERN6Common12IInputStreamERKN6Crypto11chacha8_keyEj(ptr noundef nonnull align 8 dereferenceable(92) %0, ptr noundef nonnull align 8 dereferenceable(8) %1, ptr nocapture noundef nonnull readonly align 1 dereferenceable(32) %2, i32 noundef %3) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca %"struct.DynexCN::WalletSerializerV1::CryptoContext", align 1
  %6 = alloca i8, align 1
  %7 = alloca i8, align 1
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %5) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %6) #4
  store i8 0, ptr %6, align 1, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %7) #4
  store i8 0, ptr %7, align 1, !tbaa !5
  %8 = getelementptr inbounds i8, ptr %5, i64 32
  invoke void @_ZN7DynexCN18WalletSerializerV16loadIvERN6Common12IInputStreamERN6Crypto10chacha8_ivE(ptr noundef nonnull align 8 dereferenceable(92) %0, ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 1 dereferenceable(8) %8)
          to label %9 unwind label %19

9:                                                ; preds = %4
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(32) %5, ptr noundef nonnull align 1 dereferenceable(32) %2, i64 32, i1 false), !tbaa.struct !9
  invoke void @_ZN7DynexCN18WalletSerializerV18loadKeysERN6Common12IInputStreamERNS0_13CryptoContextE(ptr noundef nonnull align 8 dereferenceable(92) %0, ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 1 dereferenceable(40) %5)
          to label %10 unwind label %19

10:                                               ; preds = %9
  invoke void @_ZN7DynexCN18WalletSerializerV19checkKeysEv(ptr noundef nonnull align 8 dereferenceable(92) %0)
          to label %11 unwind label %19

11:                                               ; preds = %10
  invoke void @_ZN7DynexCN18WalletSerializerV111loadWalletsERN6Common12IInputStreamERNS0_13CryptoContextE(ptr noundef nonnull align 8 dereferenceable(92) %0, ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 1 dereferenceable(40) %5)
          to label %12 unwind label %19

12:                                               ; preds = %11
  invoke void @_ZN7DynexCN18WalletSerializerV116subscribeWalletsEv(ptr noundef nonnull align 8 dereferenceable(92) %0)
          to label %13 unwind label %19

13:                                               ; preds = %12
  invoke void @_ZN7DynexCN18WalletSerializerV19loadFlagsERbS1_RN6Common12IInputStreamERNS0_13CryptoContextE(ptr noundef nonnull align 8 dereferenceable(92) %0, ptr noundef nonnull align 1 dereferenceable(1) %6, ptr noundef nonnull align 1 dereferenceable(1) %7, ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 1 dereferenceable(40) %5)
          to label %14 unwind label %19

14:                                               ; preds = %13
  %15 = load i8, ptr %6, align 1, !tbaa !5, !range !11, !noundef !12
  %16 = trunc nuw i8 %15 to i1
  br i1 %16, label %17, label %21

17:                                               ; preds = %14
  invoke void @_ZN7DynexCN18WalletSerializerV116loadTransactionsERN6Common12IInputStreamERNS0_13CryptoContextE(ptr noundef nonnull align 8 dereferenceable(92) %0, ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 1 dereferenceable(40) %5)
          to label %18 unwind label %19

18:                                               ; preds = %17
  invoke void @_ZN7DynexCN18WalletSerializerV113loadTransfersERN6Common12IInputStreamERNS0_13CryptoContextEj(ptr noundef nonnull align 8 dereferenceable(92) %0, ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 1 dereferenceable(40) %5, i32 noundef %3)
          to label %21 unwind label %19

19:                                               ; preds = %36, %29, %.thread, %28, %27, %26, %23, %18, %17, %13, %12, %11, %10, %9, %4
  %20 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #4
  call void @_ZN7DynexCN18WalletSerializerV113CryptoContextD2Ev(ptr noundef nonnull align 1 dereferenceable(40) %5) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %5) #4
  resume { ptr, i32 } %20

21:                                               ; preds = %18, %14
  %22 = icmp ult i32 %3, 5
  br i1 %22, label %23, label %24

23:                                               ; preds = %21
  invoke void @_ZN7DynexCN18WalletSerializerV119updateTransfersSignEv(ptr noundef nonnull align 8 dereferenceable(92) %0)
          to label %.thread20 unwind label %19

.thread20:                                        ; preds = %23
  store i8 0, ptr %7, align 1, !tbaa !5
  br label %29

24:                                               ; preds = %21
  %.pre = load i8, ptr %7, align 1, !tbaa !5, !range !11
  %25 = trunc nuw i8 %.pre to i1
  br i1 %25, label %26, label %29

26:                                               ; preds = %24
  invoke void @_ZN7DynexCN18WalletSerializerV112loadBalancesERN6Common12IInputStreamERNS0_13CryptoContextE(ptr noundef nonnull align 8 dereferenceable(92) %0, ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 1 dereferenceable(40) %5)
          to label %27 unwind label %19

27:                                               ; preds = %26
  invoke void @_ZN7DynexCN18WalletSerializerV125loadTransfersSynchronizerERN6Common12IInputStreamERNS0_13CryptoContextE(ptr noundef nonnull align 8 dereferenceable(92) %0, ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 1 dereferenceable(40) %5)
          to label %28 unwind label %19

28:                                               ; preds = %27
  invoke void @_ZN7DynexCN18WalletSerializerV126loadUnlockTransactionsJobsERN6Common12IInputStreamERNS0_13CryptoContextE(ptr noundef nonnull align 8 dereferenceable(92) %0, ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 1 dereferenceable(40) %5)
          to label %.thread unwind label %19

.thread:                                          ; preds = %28
  invoke void @_ZN7DynexCN18WalletSerializerV126loadUncommitedTransactionsERN6Common12IInputStreamERNS0_13CryptoContextE(ptr noundef nonnull align 8 dereferenceable(92) %0, ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 1 dereferenceable(40) %5)
          to label %30 unwind label %19

29:                                               ; preds = %.thread20, %24
  invoke void @_ZN7DynexCN18WalletSerializerV118resetCachedBalanceEv(ptr noundef nonnull align 8 dereferenceable(92) %0)
          to label %30 unwind label %19

30:                                               ; preds = %29, %.thread
  %31 = load i8, ptr %6, align 1, !tbaa !5, !range !11, !noundef !12
  %32 = trunc nuw i8 %31 to i1
  br i1 %32, label %33, label %37

33:                                               ; preds = %30
  %34 = load i8, ptr %7, align 1, !tbaa !5, !range !11, !noundef !12
  %35 = trunc nuw i8 %34 to i1
  br i1 %35, label %36, label %37

36:                                               ; preds = %33
  invoke void @_ZN7DynexCN18WalletSerializerV128updateTransactionsBaseStatusEv(ptr noundef nonnull align 8 dereferenceable(92) %0)
          to label %37 unwind label %19

37:                                               ; preds = %36, %33, %30
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #4
  call void @_ZN7DynexCN18WalletSerializerV113CryptoContextD2Ev(ptr noundef nonnull align 1 dereferenceable(40) %5) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %5) #4
  ret void
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7DynexCN18WalletSerializerV16loadIvERN6Common12IInputStreamERN6Crypto10chacha8_ivE(ptr noundef nonnull align 8 dereferenceable(92), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 1 dereferenceable(8)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7DynexCN18WalletSerializerV18loadKeysERN6Common12IInputStreamERNS0_13CryptoContextE(ptr noundef nonnull align 8 dereferenceable(92), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 1 dereferenceable(40)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7DynexCN18WalletSerializerV19checkKeysEv(ptr noundef nonnull align 8 dereferenceable(92)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7DynexCN18WalletSerializerV111loadWalletsERN6Common12IInputStreamERNS0_13CryptoContextE(ptr noundef nonnull align 8 dereferenceable(92), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 1 dereferenceable(40)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7DynexCN18WalletSerializerV116subscribeWalletsEv(ptr noundef nonnull align 8 dereferenceable(92)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7DynexCN18WalletSerializerV19loadFlagsERbS1_RN6Common12IInputStreamERNS0_13CryptoContextE(ptr noundef nonnull align 8 dereferenceable(92), ptr noundef nonnull align 1 dereferenceable(1), ptr noundef nonnull align 1 dereferenceable(1), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 1 dereferenceable(40)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7DynexCN18WalletSerializerV116loadTransactionsERN6Common12IInputStreamERNS0_13CryptoContextE(ptr noundef nonnull align 8 dereferenceable(92), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 1 dereferenceable(40)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7DynexCN18WalletSerializerV113loadTransfersERN6Common12IInputStreamERNS0_13CryptoContextEj(ptr noundef nonnull align 8 dereferenceable(92), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 1 dereferenceable(40), i32 noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7DynexCN18WalletSerializerV119updateTransfersSignEv(ptr noundef nonnull align 8 dereferenceable(92)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7DynexCN18WalletSerializerV112loadBalancesERN6Common12IInputStreamERNS0_13CryptoContextE(ptr noundef nonnull align 8 dereferenceable(92), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 1 dereferenceable(40)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7DynexCN18WalletSerializerV125loadTransfersSynchronizerERN6Common12IInputStreamERNS0_13CryptoContextE(ptr noundef nonnull align 8 dereferenceable(92), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 1 dereferenceable(40)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7DynexCN18WalletSerializerV126loadUnlockTransactionsJobsERN6Common12IInputStreamERNS0_13CryptoContextE(ptr noundef nonnull align 8 dereferenceable(92), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 1 dereferenceable(40)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7DynexCN18WalletSerializerV126loadUncommitedTransactionsERN6Common12IInputStreamERNS0_13CryptoContextE(ptr noundef nonnull align 8 dereferenceable(92), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 1 dereferenceable(40)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7DynexCN18WalletSerializerV118resetCachedBalanceEv(ptr noundef nonnull align 8 dereferenceable(92)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7DynexCN18WalletSerializerV128updateTransactionsBaseStatusEv(ptr noundef nonnull align 8 dereferenceable(92)) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN7DynexCN18WalletSerializerV113CryptoContextD2Ev(ptr noundef nonnull align 1 dereferenceable(40)) unnamed_addr #3 align 2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { 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 #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 = !{!"bool", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{i64 0, i64 32, !10}
!10 = !{!7, !7, i64 0}
!11 = !{i8 0, i8 2}
!12 = !{}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass