; LLVM IR from dynexcoin/Dynex :: src/WalletLegacy (WalletLegacySerializer)

; 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.Crypto::SecretKey" = type { [32 x i8] }
%"class.Common::StdInputStream" = type { %"class.Common::IInputStream", ptr }
%"class.Common::IInputStream" = type { ptr }
%"class.DynexCN::BinaryInputStreamSerializer" = type { %"class.DynexCN::ISerializer", ptr }
%"class.DynexCN::ISerializer" = type { ptr }
%"class.Common::StringView" = type { ptr, i64 }
%"struct.Crypto::chacha8_iv" = type { [8 x i8] }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.Common::MemoryInputStream" = type { %"class.Common::IInputStream", ptr, i64, i64 }
%"class.std::allocator" = type { i8 }
%"class.std::error_code" = type { i32, ptr }
%"class.DynexCN::WalletLegacySerializer" = type <{ ptr, ptr, i32, [4 x i8] }>
%"struct.DynexCN::AccountKeys" = type { %"struct.DynexCN::AccountPublicAddress", %"struct.Crypto::SecretKey", %"struct.Crypto::SecretKey" }
%"struct.DynexCN::AccountPublicAddress" = type { %"struct.Crypto::PublicKey", %"struct.Crypto::PublicKey" }
%"struct.Crypto::PublicKey" = type { [32 x i8] }

@_ZN7DynexCNL15NULL_SECRET_KEYE = external hidden global %"struct.Crypto::SecretKey", align 1
@_ZN7DynexCN35WALLET_LEGACY_SERIALIZATION_VERSIONE = external dso_local global i32, align 4
@.str.7 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [1 x i8], align 1
@_ZTISt12system_error = external constant ptr

; 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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6Common10StringViewC2ILm12EEERAT__Kc(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 1 dereferenceable(12)) unnamed_addr #2 align 2

; Function Attrs: nounwind
declare void @_ZN6Common10StringViewD1Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6Common10StringViewC2ILm8EEERAT__Kc(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 1 dereferenceable(8)) unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6Common10StringViewC2ILm6EEERAT__Kc(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 1 dereferenceable(6)) unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6Common10StringViewC2ILm7EEERAT__Kc(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 1 dereferenceable(7)) unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6Common10StringViewC2ILm3EEERAT__Kc(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 1 dereferenceable(3)) unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6Common10StringViewC2ILm5EEERAT__Kc(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 1 dereferenceable(5)) unnamed_addr #2 align 2

declare noundef nonnull align 1 dereferenceable(128) ptr @_ZNK7DynexCN11AccountBase14getAccountKeysEv(ptr noundef nonnull align 8 dereferenceable(136)) #4

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32)) #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7DynexCN22WalletLegacySerializer11deserializeERSiRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERS7_(ptr noundef nonnull align 8 dereferenceable(20) %0, ptr noundef nonnull align 8 dereferenceable(16) %1, ptr noundef nonnull align 8 dereferenceable(32) %2, ptr noundef nonnull align 8 dereferenceable(32) %3) #5 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca %"class.Common::StdInputStream", align 8
  %10 = alloca %"class.DynexCN::BinaryInputStreamSerializer", align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca %"class.Common::StringView", align 8
  %14 = alloca i32, align 4
  %15 = alloca %"class.Common::StringView", align 8
  %16 = alloca %"struct.Crypto::chacha8_iv", align 1
  %17 = alloca %"class.Common::StringView", align 8
  %18 = alloca %"class.std::__cxx11::basic_string", align 8
  %19 = alloca %"class.Common::StringView", align 8
  %20 = alloca %"class.std::__cxx11::basic_string", align 8
  %21 = alloca %"struct.Crypto::chacha8_iv", align 1
  %22 = alloca %"class.Common::MemoryInputStream", align 8
  %23 = alloca %"class.DynexCN::BinaryInputStreamSerializer", align 8
  %24 = alloca %"class.std::__cxx11::basic_string", align 8
  %25 = alloca %"class.std::allocator", align 1
  %26 = alloca %"class.std::__cxx11::basic_string", align 8
  %27 = alloca %"class.std::allocator", align 1
  %28 = alloca %"class.std::error_code", align 8
  %29 = alloca i8, align 1
  %30 = alloca %"class.Common::StringView", align 8
  %31 = alloca %"class.Common::StringView", align 8
  %32 = alloca %"class.Common::StringView", align 8
  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 ptr %3, ptr %8, align 8, !tbaa !5
  %33 = load ptr, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %9) #8
  %34 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN6Common14StdInputStreamC1ERSi(ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef nonnull align 8 dereferenceable(16) %34)
  call void @llvm.lifetime.start.p0(i64 16, ptr %10) #8
  invoke void @_ZN7DynexCN27BinaryInputStreamSerializerC2ERN6Common12IInputStreamE(ptr noundef nonnull align 8 dereferenceable(16) %10, ptr noundef nonnull align 8 dereferenceable(8) %9)
          to label %35 unwind label %93

35:                                               ; preds = %4
  invoke void @_ZN6Common10StringViewC2ILm7EEERAT__Kc(ptr noundef nonnull align 8 dereferenceable(16) %13, ptr noundef nonnull align 1 dereferenceable(7) @.str.10)
          to label %36 unwind label %97

36:                                               ; preds = %35
  %37 = invoke noundef zeroext i1 @_ZN7DynexCN27BinaryInputStreamSerializer11beginObjectEN6Common10StringViewE(ptr noundef nonnull align 8 dereferenceable(16) %10, ptr noundef %13)
          to label %38 unwind label %101

38:                                               ; preds = %36
  call void @_ZN6Common10StringViewD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %13) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #8
  invoke void @_ZN6Common10StringViewC2ILm8EEERAT__Kc(ptr noundef nonnull align 8 dereferenceable(16) %15, ptr noundef nonnull align 1 dereferenceable(8) @.str.11)
          to label %39 unwind label %105

39:                                               ; preds = %38
  %40 = invoke noundef zeroext i1 @_ZN7DynexCN27BinaryInputStreamSerializerclERjN6Common10StringViewE(ptr noundef nonnull align 8 dereferenceable(16) %10, ptr noundef nonnull align 4 dereferenceable(4) %14, ptr noundef %15)
          to label %41 unwind label %109

41:                                               ; preds = %39
  call void @_ZN6Common10StringViewD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %15) #8
  %42 = load i32, ptr %14, align 4, !tbaa !9
  store i32 %42, ptr @_ZN7DynexCN35WALLET_LEGACY_SERIALIZATION_VERSIONE, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #8
  invoke void @_ZN6Common10StringViewC2ILm3EEERAT__Kc(ptr noundef nonnull align 8 dereferenceable(16) %17, ptr noundef nonnull align 1 dereferenceable(3) @.str.12)
          to label %43 unwind label %113

43:                                               ; preds = %41
  %44 = invoke noundef zeroext i1 @_ZN7DynexCN27BinaryInputStreamSerializerclIN6Crypto10chacha8_ivEEEbRT_N6Common10StringViewE(ptr noundef nonnull align 8 dereferenceable(16) %10, ptr noundef nonnull align 1 dereferenceable(8) %16, ptr noundef %17)
          to label %45 unwind label %117

45:                                               ; preds = %43
  call void @_ZN6Common10StringViewD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %17) #8
  call void @llvm.lifetime.start.p0(i64 32, ptr %18) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %18) #8
  invoke void @_ZN6Common10StringViewC2ILm5EEERAT__Kc(ptr noundef nonnull align 8 dereferenceable(16) %19, ptr noundef nonnull align 1 dereferenceable(5) @.str.13)
          to label %46 unwind label %121

46:                                               ; preds = %45
  %47 = invoke noundef zeroext i1 @_ZN7DynexCN27BinaryInputStreamSerializerclERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN6Common10StringViewE(ptr noundef nonnull align 8 dereferenceable(16) %10, ptr noundef nonnull align 8 dereferenceable(32) %18, ptr noundef %19)
          to label %48 unwind label %125

48:                                               ; preds = %46
  call void @_ZN6Common10StringViewD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %19) #8
  invoke void @_ZN7DynexCN27BinaryInputStreamSerializer9endObjectEv(ptr noundef nonnull align 8 dereferenceable(16) %10)
          to label %49 unwind label %121

49:                                               ; preds = %48
  call void @llvm.lifetime.start.p0(i64 32, ptr %20) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %20) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %21, ptr align 1 %16, i64 8, i1 false), !tbaa.struct !11
  %50 = load ptr, ptr %7, align 8, !tbaa !5
  %51 = getelementptr inbounds %"struct.Crypto::chacha8_iv", ptr %21, i32 0, i32 0
  %52 = load i64, ptr %51, align 1
  invoke void @_ZN7DynexCN22WalletLegacySerializer7decryptERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERS6_N6Crypto10chacha8_ivES8_(ptr noundef nonnull align 8 dereferenceable(20) %33, ptr noundef nonnull align 8 dereferenceable(32) %18, ptr noundef nonnull align 8 dereferenceable(32) %20, i64 %52, ptr noundef nonnull align 8 dereferenceable(32) %50)
          to label %53 unwind label %129

53:                                               ; preds = %49
  call void @llvm.lifetime.start.p0(i64 32, ptr %22) #8
  %54 = call noundef ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4dataEv(ptr noundef nonnull align 8 dereferenceable(32) %20) #8
  %55 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %20) #8
  invoke void @_ZN6Common17MemoryInputStreamC1EPKvm(ptr noundef nonnull align 8 dereferenceable(32) %22, ptr noundef %54, i64 noundef %55)
          to label %56 unwind label %133

56:                                               ; preds = %53
  call void @llvm.lifetime.start.p0(i64 16, ptr %23) #8
  invoke void @_ZN7DynexCN27BinaryInputStreamSerializerC2ERN6Common12IInputStreamE(ptr noundef nonnull align 8 dereferenceable(16) %23, ptr noundef nonnull align 8 dereferenceable(8) %22)
          to label %57 unwind label %137

57:                                               ; preds = %56
  invoke void @_ZN7DynexCN22WalletLegacySerializer8loadKeysERNS_11ISerializerE(ptr noundef nonnull align 8 dereferenceable(20) %33, ptr noundef nonnull align 8 dereferenceable(8) %23)
          to label %58 unwind label %141

58:                                               ; preds = %57
  %59 = getelementptr inbounds %"class.DynexCN::WalletLegacySerializer", ptr %33, i32 0, i32 0
  %60 = load ptr, ptr %59, align 8, !tbaa !13
  %61 = invoke noundef nonnull align 1 dereferenceable(128) ptr @_ZNK7DynexCN11AccountBase14getAccountKeysEv(ptr noundef nonnull align 8 dereferenceable(136) %60)
          to label %62 unwind label %141

62:                                               ; preds = %58
  %63 = getelementptr inbounds %"struct.DynexCN::AccountKeys", ptr %61, i32 0, i32 2
  %64 = getelementptr inbounds %"class.DynexCN::WalletLegacySerializer", ptr %33, i32 0, i32 0
  %65 = load ptr, ptr %64, align 8, !tbaa !13
  %66 = invoke noundef nonnull align 1 dereferenceable(128) ptr @_ZNK7DynexCN11AccountBase14getAccountKeysEv(ptr noundef nonnull align 8 dereferenceable(136) %65)
          to label %67 unwind label %141

67:                                               ; preds = %62
  %68 = getelementptr inbounds %"struct.DynexCN::AccountKeys", ptr %66, i32 0, i32 0
  %69 = getelementptr inbounds %"struct.DynexCN::AccountPublicAddress", ptr %68, i32 0, i32 1
  call void @llvm.lifetime.start.p0(i64 32, ptr %24) #8
  call void @llvm.lifetime.start.p0(i64 1, ptr %25) #8
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %25) #8
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %24, ptr noundef @.str.15, ptr noundef nonnull align 1 dereferenceable(1) %25)
          to label %70 unwind label %145

70:                                               ; preds = %67
  invoke void @_ZN7DynexCN20throwIfKeysMissmatchERKN6Crypto9SecretKeyERKNS0_9PublicKeyERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 1 dereferenceable(32) %63, ptr noundef nonnull align 1 dereferenceable(32) %69, ptr noundef nonnull align 8 dereferenceable(32) %24)
          to label %71 unwind label %149

71:                                               ; preds = %70
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %24) #8
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %25) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %25) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %24) #8
  %72 = getelementptr inbounds %"class.DynexCN::WalletLegacySerializer", ptr %33, i32 0, i32 0
  %73 = load ptr, ptr %72, align 8, !tbaa !13
  %74 = invoke noundef nonnull align 1 dereferenceable(128) ptr @_ZNK7DynexCN11AccountBase14getAccountKeysEv(ptr noundef nonnull align 8 dereferenceable(136) %73)
          to label %75 unwind label %141

75:                                               ; preds = %71
  %76 = getelementptr inbounds %"struct.DynexCN::AccountKeys", ptr %74, i32 0, i32 1
  %77 = invoke noundef zeroext i1 @_ZN6CryptoneERKNS_9SecretKeyES2_(ptr noundef nonnull align 1 dereferenceable(32) %76, ptr noundef nonnull align 1 dereferenceable(32) @_ZN7DynexCNL15NULL_SECRET_KEYE)
          to label %78 unwind label %141

78:                                               ; preds = %75
  br i1 %77, label %79, label %163

79:                                               ; preds = %78
  %80 = getelementptr inbounds %"class.DynexCN::WalletLegacySerializer", ptr %33, i32 0, i32 0
  %81 = load ptr, ptr %80, align 8, !tbaa !13
  %82 = invoke noundef nonnull align 1 dereferenceable(128) ptr @_ZNK7DynexCN11AccountBase14getAccountKeysEv(ptr noundef nonnull align 8 dereferenceable(136) %81)
          to label %83 unwind label %141

83:                                               ; preds = %79
  %84 = getelementptr inbounds %"struct.DynexCN::AccountKeys", ptr %82, i32 0, i32 1
  %85 = getelementptr inbounds %"class.DynexCN::WalletLegacySerializer", ptr %33, i32 0, i32 0
  %86 = load ptr, ptr %85, align 8, !tbaa !13
  %87 = invoke noundef nonnull align 1 dereferenceable(128) ptr @_ZNK7DynexCN11AccountBase14getAccountKeysEv(ptr noundef nonnull align 8 dereferenceable(136) %86)
          to label %88 unwind label %141

88:                                               ; preds = %83
  %89 = getelementptr inbounds %"struct.DynexCN::AccountKeys", ptr %87, i32 0, i32 0
  %90 = getelementptr inbounds %"struct.DynexCN::AccountPublicAddress", ptr %89, i32 0, i32 0
  call void @llvm.lifetime.start.p0(i64 32, ptr %26) #8
  call void @llvm.lifetime.start.p0(i64 1, ptr %27) #8
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %27) #8
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %26, ptr noundef @.str.15, ptr noundef nonnull align 1 dereferenceable(1) %27)
          to label %91 unwind label %154

91:                                               ; preds = %88
  invoke void @_ZN7DynexCN20throwIfKeysMissmatchERKN6Crypto9SecretKeyERKNS0_9PublicKeyERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 1 dereferenceable(32) %84, ptr noundef nonnull align 1 dereferenceable(32) %90, ptr noundef nonnull align 8 dereferenceable(32) %26)
          to label %92 unwind label %158

92:                                               ; preds = %91
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %26) #8
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %27) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %27) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %26) #8
  br label %190

93:                                               ; preds = %4
  %94 = landingpad { ptr, i32 }
          cleanup
  %95 = extractvalue { ptr, i32 } %94, 0
  store ptr %95, ptr %11, align 8
  %96 = extractvalue { ptr, i32 } %94, 1
  store i32 %96, ptr %12, align 4
  br label %232

97:                                               ; preds = %35
  %98 = landingpad { ptr, i32 }
          cleanup
  %99 = extractvalue { ptr, i32 } %98, 0
  store ptr %99, ptr %11, align 8
  %100 = extractvalue { ptr, i32 } %98, 1
  store i32 %100, ptr %12, align 4
  br label %231

101:                                              ; preds = %36
  %102 = landingpad { ptr, i32 }
          cleanup
  %103 = extractvalue { ptr, i32 } %102, 0
  store ptr %103, ptr %11, align 8
  %104 = extractvalue { ptr, i32 } %102, 1
  store i32 %104, ptr %12, align 4
  call void @_ZN6Common10StringViewD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %13) #8
  br label %231

105:                                              ; preds = %38
  %106 = landingpad { ptr, i32 }
          cleanup
  %107 = extractvalue { ptr, i32 } %106, 0
  store ptr %107, ptr %11, align 8
  %108 = extractvalue { ptr, i32 } %106, 1
  store i32 %108, ptr %12, align 4
  br label %230

109:                                              ; preds = %39
  %110 = landingpad { ptr, i32 }
          cleanup
  %111 = extractvalue { ptr, i32 } %110, 0
  store ptr %111, ptr %11, align 8
  %112 = extractvalue { ptr, i32 } %110, 1
  store i32 %112, ptr %12, align 4
  call void @_ZN6Common10StringViewD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %15) #8
  br label %230

113:                                              ; preds = %41
  %114 = landingpad { ptr, i32 }
          cleanup
  %115 = extractvalue { ptr, i32 } %114, 0
  store ptr %115, ptr %11, align 8
  %116 = extractvalue { ptr, i32 } %114, 1
  store i32 %116, ptr %12, align 4
  br label %229

117:                                              ; preds = %43
  %118 = landingpad { ptr, i32 }
          cleanup
  %119 = extractvalue { ptr, i32 } %118, 0
  store ptr %119, ptr %11, align 8
  %120 = extractvalue { ptr, i32 } %118, 1
  store i32 %120, ptr %12, align 4
  call void @_ZN6Common10StringViewD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %17) #8
  br label %229

121:                                              ; preds = %48, %45
  %122 = landingpad { ptr, i32 }
          cleanup
  %123 = extractvalue { ptr, i32 } %122, 0
  store ptr %123, ptr %11, align 8
  %124 = extractvalue { ptr, i32 } %122, 1
  store i32 %124, ptr %12, align 4
  br label %228

125:                                              ; preds = %46
  %126 = landingpad { ptr, i32 }
          cleanup
  %127 = extractvalue { ptr, i32 } %126, 0
  store ptr %127, ptr %11, align 8
  %128 = extractvalue { ptr, i32 } %126, 1
  store i32 %128, ptr %12, align 4
  call void @_ZN6Common10StringViewD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %19) #8
  br label %228

129:                                              ; preds = %49
  %130 = landingpad { ptr, i32 }
          cleanup
  %131 = extractvalue { ptr, i32 } %130, 0
  store ptr %131, ptr %11, align 8
  %132 = extractvalue { ptr, i32 } %130, 1
  store i32 %132, ptr %12, align 4
  br label %227

133:                                              ; preds = %53
  %134 = landingpad { ptr, i32 }
          cleanup
  %135 = extractvalue { ptr, i32 } %134, 0
  store ptr %135, ptr %11, align 8
  %136 = extractvalue { ptr, i32 } %134, 1
  store i32 %136, ptr %12, align 4
  br label %226

137:                                              ; preds = %56
  %138 = landingpad { ptr, i32 }
          cleanup
  %139 = extractvalue { ptr, i32 } %138, 0
  store ptr %139, ptr %11, align 8
  %140 = extractvalue { ptr, i32 } %138, 1
  store i32 %140, ptr %12, align 4
  br label %225

141:                                              ; preds = %184, %167, %163, %83, %79, %75, %71, %62, %58, %57
  %142 = landingpad { ptr, i32 }
          cleanup
  %143 = extractvalue { ptr, i32 } %142, 0
  store ptr %143, ptr %11, align 8
  %144 = extractvalue { ptr, i32 } %142, 1
  store i32 %144, ptr %12, align 4
  br label %224

145:                                              ; preds = %67
  %146 = landingpad { ptr, i32 }
          cleanup
  %147 = extractvalue { ptr, i32 } %146, 0
  store ptr %147, ptr %11, align 8
  %148 = extractvalue { ptr, i32 } %146, 1
  store i32 %148, ptr %12, align 4
  br label %153

149:                                              ; preds = %70
  %150 = landingpad { ptr, i32 }
          cleanup
  %151 = extractvalue { ptr, i32 } %150, 0
  store ptr %151, ptr %11, align 8
  %152 = extractvalue { ptr, i32 } %150, 1
  store i32 %152, ptr %12, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %24) #8
  br label %153

153:                                              ; preds = %149, %145
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %25) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %25) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %24) #8
  br label %224

154:                                              ; preds = %88
  %155 = landingpad { ptr, i32 }
          cleanup
  %156 = extractvalue { ptr, i32 } %155, 0
  store ptr %156, ptr %11, align 8
  %157 = extractvalue { ptr, i32 } %155, 1
  store i32 %157, ptr %12, align 4
  br label %162

158:                                              ; preds = %91
  %159 = landingpad { ptr, i32 }
          cleanup
  %160 = extractvalue { ptr, i32 } %159, 0
  store ptr %160, ptr %11, align 8
  %161 = extractvalue { ptr, i32 } %159, 1
  store i32 %161, ptr %12, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %26) #8
  br label %162

162:                                              ; preds = %158, %154
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %27) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %27) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %26) #8
  br label %224

163:                                              ; preds = %78
  %164 = getelementptr inbounds %"class.DynexCN::WalletLegacySerializer", ptr %33, i32 0, i32 0
  %165 = load ptr, ptr %164, align 8, !tbaa !13
  %166 = invoke noundef nonnull align 1 dereferenceable(128) ptr @_ZNK7DynexCN11AccountBase14getAccountKeysEv(ptr noundef nonnull align 8 dereferenceable(136) %165)
          to label %167 unwind label %141

167:                                              ; preds = %163
  %168 = getelementptr inbounds %"struct.DynexCN::AccountKeys", ptr %166, i32 0, i32 0
  %169 = getelementptr inbounds %"struct.DynexCN::AccountPublicAddress", ptr %168, i32 0, i32 0
  %170 = invoke noundef zeroext i1 @_ZN6Crypto9check_keyERKNS_9PublicKeyE(ptr noundef nonnull align 1 dereferenceable(32) %169)
          to label %171 unwind label %141

171:                                              ; preds = %167
  br i1 %170, label %189, label %172

172:                                              ; preds = %171
  %173 = call ptr @__cxa_allocate_exception(i64 32) #8
  %174 = invoke { i32, ptr } @_Z15make_error_codeN7DynexCN5error16WalletErrorCodesE(i32 noundef 4)
          to label %175 unwind label %185

175:                                              ; preds = %172
  %176 = getelementptr inbounds { i32, ptr }, ptr %28, i32 0, i32 0
  %177 = extractvalue { i32, ptr } %174, 0
  store i32 %177, ptr %176, align 8
  %178 = getelementptr inbounds { i32, ptr }, ptr %28, i32 0, i32 1
  %179 = extractvalue { i32, ptr } %174, 1
  store ptr %179, ptr %178, align 8
  %180 = getelementptr inbounds { i32, ptr }, ptr %28, i32 0, i32 0
  %181 = load i32, ptr %180, align 8
  %182 = getelementptr inbounds { i32, ptr }, ptr %28, i32 0, i32 1
  %183 = load ptr, ptr %182, align 8
  invoke void @_ZNSt12system_errorC2ESt10error_code(ptr noundef nonnull align 8 dereferenceable(32) %173, i32 %181, ptr %183)
          to label %184 unwind label %185

184:                                              ; preds = %175
  invoke void @__cxa_throw(ptr %173, ptr @_ZTISt12system_error, ptr @_ZNSt12system_errorD1Ev) #9
          to label %238 unwind label %141

185:                                              ; preds = %175, %172
  %186 = landingpad { ptr, i32 }
          cleanup
  %187 = extractvalue { ptr, i32 } %186, 0
  store ptr %187, ptr %11, align 8
  %188 = extractvalue { ptr, i32 } %186, 1
  store i32 %188, ptr %12, align 4
  call void @__cxa_free_exception(ptr %173) #8
  br label %224

189:                                              ; preds = %171
  br label %190

190:                                              ; preds = %189, %92
  call void @llvm.lifetime.start.p0(i64 1, ptr %29) #8
  invoke void @_ZN6Common10StringViewC2ILm12EEERAT__Kc(ptr noundef nonnull align 8 dereferenceable(16) %30, ptr noundef nonnull align 1 dereferenceable(12) @.str.7)
          to label %191 unwind label %202

191:                                              ; preds = %190
  %192 = invoke noundef zeroext i1 @_ZN7DynexCN27BinaryInputStreamSerializerclERbN6Common10StringViewE(ptr noundef nonnull align 8 dereferenceable(16) %23, ptr noundef nonnull align 1 dereferenceable(1) %29, ptr noundef %30)
          to label %193 unwind label %206

193:                                              ; preds = %191
  call void @_ZN6Common10StringViewD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %30) #8
  %194 = load i8, ptr %29, align 1, !tbaa !15, !range !17, !noundef !18
  %195 = trunc i8 %194 to i1
  br i1 %195, label %196, label %214

196:                                              ; preds = %193
  %197 = getelementptr inbounds %"class.DynexCN::WalletLegacySerializer", ptr %33, i32 0, i32 1
  %198 = load ptr, ptr %197, align 8, !tbaa !19
  invoke void @_ZN6Common10StringViewC2ILm8EEERAT__Kc(ptr noundef nonnull align 8 dereferenceable(16) %31, ptr noundef nonnull align 1 dereferenceable(8) @.str.8)
          to label %199 unwind label %202

199:                                              ; preds = %196
  %200 = invoke noundef zeroext i1 @_ZN7DynexCN27BinaryInputStreamSerializerclINS_27WalletUserTransactionsCacheEEEbRT_N6Common10StringViewE(ptr noundef nonnull align 8 dereferenceable(16) %23, ptr noundef nonnull align 8 dereferenceable(224) %198, ptr noundef %31)
          to label %201 unwind label %210

201:                                              ; preds = %199
  call void @_ZN6Common10StringViewD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %31) #8
  br label %214

202:                                              ; preds = %214, %196, %190
  %203 = landingpad { ptr, i32 }
          cleanup
  %204 = extractvalue { ptr, i32 } %203, 0
  store ptr %204, ptr %11, align 8
  %205 = extractvalue { ptr, i32 } %203, 1
  store i32 %205, ptr %12, align 4
  br label %223

206:                                              ; preds = %191
  %207 = landingpad { ptr, i32 }
          cleanup
  %208 = extractvalue { ptr, i32 } %207, 0
  store ptr %208, ptr %11, align 8
  %209 = extractvalue { ptr, i32 } %207, 1
  store i32 %209, ptr %12, align 4
  call void @_ZN6Common10StringViewD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %30) #8
  br label %223

210:                                              ; preds = %199
  %211 = landingpad { ptr, i32 }
          cleanup
  %212 = extractvalue { ptr, i32 } %211, 0
  store ptr %212, ptr %11, align 8
  %213 = extractvalue { ptr, i32 } %211, 1
  store i32 %213, ptr %12, align 4
  call void @_ZN6Common10StringViewD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %31) #8
  br label %223

214:                                              ; preds = %201, %193
  %215 = load ptr, ptr %8, align 8, !tbaa !5
  invoke void @_ZN6Common10StringViewC2ILm6EEERAT__Kc(ptr noundef nonnull align 8 dereferenceable(16) %32, ptr noundef nonnull align 1 dereferenceable(6) @.str.9)
          to label %216 unwind label %202

216:                                              ; preds = %214
  %217 = invoke noundef zeroext i1 @_ZN7DynexCN27BinaryInputStreamSerializer6binaryERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN6Common10StringViewE(ptr noundef nonnull align 8 dereferenceable(16) %23, ptr noundef nonnull align 8 dereferenceable(32) %215, ptr noundef %32)
          to label %218 unwind label %219

218:                                              ; preds = %216
  call void @_ZN6Common10StringViewD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %32) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %29) #8
  call void @_ZN7DynexCN11ISerializerD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %23) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %23) #8
  call void @_ZN6Common12IInputStreamD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %22) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %22) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %20) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %20) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %18) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %18) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #8
  call void @_ZN7DynexCN11ISerializerD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %10) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #8
  call void @_ZN6Common12IInputStreamD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %9) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #8
  ret void

219:                                              ; preds = %216
  %220 = landingpad { ptr, i32 }
          cleanup
  %221 = extractvalue { ptr, i32 } %220, 0
  store ptr %221, ptr %11, align 8
  %222 = extractvalue { ptr, i32 } %220, 1
  store i32 %222, ptr %12, align 4
  call void @_ZN6Common10StringViewD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %32) #8
  br label %223

223:                                              ; preds = %219, %210, %206, %202
  call void @llvm.lifetime.end.p0(i64 1, ptr %29) #8
  br label %224

224:                                              ; preds = %223, %185, %162, %153, %141
  call void @_ZN7DynexCN11ISerializerD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %23) #8
  br label %225

225:                                              ; preds = %224, %137
  call void @llvm.lifetime.end.p0(i64 16, ptr %23) #8
  call void @_ZN6Common12IInputStreamD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %22) #8
  br label %226

226:                                              ; preds = %225, %133
  call void @llvm.lifetime.end.p0(i64 32, ptr %22) #8
  br label %227

227:                                              ; preds = %226, %129
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %20) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %20) #8
  br label %228

228:                                              ; preds = %227, %125, %121
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %18) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %18) #8
  br label %229

229:                                              ; preds = %228, %117, %113
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #8
  br label %230

230:                                              ; preds = %229, %109, %105
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #8
  br label %231

231:                                              ; preds = %230, %101, %97
  call void @_ZN7DynexCN11ISerializerD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %10) #8
  br label %232

232:                                              ; preds = %231, %93
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #8
  call void @_ZN6Common12IInputStreamD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %9) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #8
  br label %233

233:                                              ; preds = %232
  %234 = load ptr, ptr %11, align 8
  %235 = load i32, ptr %12, align 4
  %236 = insertvalue { ptr, i32 } poison, ptr %234, 0
  %237 = insertvalue { ptr, i32 } %236, i32 %235, 1
  resume { ptr, i32 } %237

238:                                              ; preds = %184
  unreachable
}

declare void @_ZN6Common14StdInputStreamC1ERSi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7DynexCN27BinaryInputStreamSerializerC2ERN6Common12IInputStreamE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #2 align 2

declare noundef zeroext i1 @_ZN7DynexCN27BinaryInputStreamSerializer11beginObjectEN6Common10StringViewE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) unnamed_addr #4

declare noundef zeroext i1 @_ZN7DynexCN27BinaryInputStreamSerializerclERjN6Common10StringViewE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef) unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN7DynexCN27BinaryInputStreamSerializerclIN6Crypto10chacha8_ivEEEbRT_N6Common10StringViewE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 1 dereferenceable(8), ptr noundef) #5 align 2

declare noundef zeroext i1 @_ZN7DynexCN27BinaryInputStreamSerializerclERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN6Common10StringViewE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) unnamed_addr #4

declare void @_ZN7DynexCN27BinaryInputStreamSerializer9endObjectEv(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7DynexCN22WalletLegacySerializer7decryptERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERS6_N6Crypto10chacha8_ivES8_(ptr noundef nonnull align 8 dereferenceable(20), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32), i64, ptr noundef nonnull align 8 dereferenceable(32)) #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4dataEv(ptr noundef nonnull align 8 dereferenceable(32)) #2 align 2

declare void @_ZN6Common17MemoryInputStreamC1EPKvm(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, i64 noundef) unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7DynexCN22WalletLegacySerializer8loadKeysERNS_11ISerializerE(ptr noundef nonnull align 8 dereferenceable(20), ptr noundef nonnull align 8 dereferenceable(8)) #5 align 2

declare void @_ZN7DynexCN20throwIfKeysMissmatchERKN6Crypto9SecretKeyERKNS0_9PublicKeyERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 1 dereferenceable(32), ptr noundef nonnull align 1 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN6CryptoneERKNS_9SecretKeyES2_(ptr noundef nonnull align 1 dereferenceable(32), ptr noundef nonnull align 1 dereferenceable(32)) #6

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN6Crypto9check_keyERKNS_9PublicKeyE(ptr noundef nonnull align 1 dereferenceable(32)) #7

declare ptr @__cxa_allocate_exception(i64)

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local { i32, ptr } @_Z15make_error_codeN7DynexCN5error16WalletErrorCodesE(i32 noundef) #6

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt12system_errorC2ESt10error_code(ptr noundef nonnull align 8 dereferenceable(32), i32, ptr) unnamed_addr #5 align 2

declare void @__cxa_free_exception(ptr)

; Function Attrs: nounwind
declare void @_ZNSt12system_errorD1Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #3

declare void @__cxa_throw(ptr, ptr, ptr)

declare noundef zeroext i1 @_ZN7DynexCN27BinaryInputStreamSerializerclERbN6Common10StringViewE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 1 dereferenceable(1), ptr noundef) unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN7DynexCN27BinaryInputStreamSerializerclINS_27WalletUserTransactionsCacheEEEbRT_N6Common10StringViewE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(224), ptr noundef) #5 align 2

declare noundef zeroext i1 @_ZN7DynexCN27BinaryInputStreamSerializer6binaryERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN6Common10StringViewE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) unnamed_addr #4

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

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 = { 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 #4 = { "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 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 = { 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 #7 = { inlinehint 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 #8 = { nounwind }
attributes #9 = { noreturn }

!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 = !{i64 0, i64 8, !12}
!12 = !{!7, !7, i64 0}
!13 = !{!14, !6, i64 0}
!14 = !{!"_ZTSN7DynexCN22WalletLegacySerializerE", !6, i64 0, !6, i64 8, !10, i64 16}
!15 = !{!16, !16, i64 0}
!16 = !{!"bool", !7, i64 0}
!17 = !{i8 0, i8 2}
!18 = !{}
!19 = !{!14, !6, i64 8}


; 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.Crypto::SecretKey" = type { [32 x i8] }
%"class.Common::StdInputStream" = type { %"class.Common::IInputStream", ptr }
%"class.Common::IInputStream" = type { ptr }
%"class.DynexCN::BinaryInputStreamSerializer" = type { %"class.DynexCN::ISerializer", ptr }
%"class.DynexCN::ISerializer" = type { ptr }
%"class.Common::StringView" = type { ptr, i64 }
%"struct.Crypto::chacha8_iv" = type { [8 x i8] }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.Common::MemoryInputStream" = type { %"class.Common::IInputStream", ptr, i64, i64 }
%"class.std::allocator" = type { i8 }

@_ZN7DynexCNL15NULL_SECRET_KEYE = external hidden global %"struct.Crypto::SecretKey", align 1
@_ZN7DynexCN35WALLET_LEGACY_SERIALIZATION_VERSIONE = external dso_local local_unnamed_addr global i32, align 4
@.str.7 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [1 x i8], align 1
@_ZTISt12system_error = external constant ptr

; 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 nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6Common10StringViewC2ILm12EEERAT__Kc(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 1 dereferenceable(12)) unnamed_addr #1 align 2

; Function Attrs: nounwind
declare void @_ZN6Common10StringViewD1Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6Common10StringViewC2ILm8EEERAT__Kc(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 1 dereferenceable(8)) unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6Common10StringViewC2ILm6EEERAT__Kc(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 1 dereferenceable(6)) unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6Common10StringViewC2ILm7EEERAT__Kc(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 1 dereferenceable(7)) unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6Common10StringViewC2ILm3EEERAT__Kc(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 1 dereferenceable(3)) unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6Common10StringViewC2ILm5EEERAT__Kc(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 1 dereferenceable(5)) unnamed_addr #1 align 2

declare noundef nonnull align 1 dereferenceable(128) ptr @_ZNK7DynexCN11AccountBase14getAccountKeysEv(ptr noundef nonnull align 8 dereferenceable(136)) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7DynexCN22WalletLegacySerializer11deserializeERSiRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERS7_(ptr noundef nonnull align 8 dereferenceable(20) %0, ptr noundef nonnull align 8 dereferenceable(16) %1, ptr noundef nonnull align 8 dereferenceable(32) %2, ptr noundef nonnull align 8 dereferenceable(32) %3) local_unnamed_addr #4 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca %"class.Common::StdInputStream", align 8
  %6 = alloca %"class.DynexCN::BinaryInputStreamSerializer", align 8
  %7 = alloca %"class.Common::StringView", align 8
  %8 = alloca i32, align 4
  %9 = alloca %"class.Common::StringView", align 8
  %10 = alloca %"struct.Crypto::chacha8_iv", align 8
  %11 = alloca %"class.Common::StringView", align 8
  %12 = alloca %"class.std::__cxx11::basic_string", align 8
  %13 = alloca %"class.Common::StringView", align 8
  %14 = alloca %"class.std::__cxx11::basic_string", align 8
  %15 = alloca %"class.Common::MemoryInputStream", align 8
  %16 = alloca %"class.DynexCN::BinaryInputStreamSerializer", align 8
  %17 = alloca %"class.std::__cxx11::basic_string", align 8
  %18 = alloca %"class.std::allocator", align 1
  %19 = alloca %"class.std::__cxx11::basic_string", align 8
  %20 = alloca %"class.std::allocator", align 1
  %21 = alloca i8, align 1
  %22 = alloca %"class.Common::StringView", align 8
  %23 = alloca %"class.Common::StringView", align 8
  %24 = alloca %"class.Common::StringView", align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #7
  call void @_ZN6Common14StdInputStreamC1ERSi(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull align 8 dereferenceable(16) %1)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #7
  call void @_ZN7DynexCN27BinaryInputStreamSerializerC2ERN6Common12IInputStreamE(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull align 8 dereferenceable(8) %5)
  call void @_ZN6Common10StringViewC2ILm7EEERAT__Kc(ptr noundef nonnull align 8 dereferenceable(16) %7, ptr noundef nonnull align 1 dereferenceable(7) @.str.10)
  %25 = invoke noundef zeroext i1 @_ZN7DynexCN27BinaryInputStreamSerializer11beginObjectEN6Common10StringViewE(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull %7)
          to label %26 unwind label %65

26:                                               ; preds = %4
  call void @_ZN6Common10StringViewD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %7) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #7
  call void @_ZN6Common10StringViewC2ILm8EEERAT__Kc(ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef nonnull align 1 dereferenceable(8) @.str.11)
  %27 = invoke noundef zeroext i1 @_ZN7DynexCN27BinaryInputStreamSerializerclERjN6Common10StringViewE(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef nonnull %9)
          to label %28 unwind label %67

28:                                               ; preds = %26
  call void @_ZN6Common10StringViewD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %9) #7
  %29 = load i32, ptr %8, align 4, !tbaa !5
  store i32 %29, ptr @_ZN7DynexCN35WALLET_LEGACY_SERIALIZATION_VERSIONE, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #7
  call void @_ZN6Common10StringViewC2ILm3EEERAT__Kc(ptr noundef nonnull align 8 dereferenceable(16) %11, ptr noundef nonnull align 1 dereferenceable(3) @.str.12)
  %30 = invoke noundef zeroext i1 @_ZN7DynexCN27BinaryInputStreamSerializerclIN6Crypto10chacha8_ivEEEbRT_N6Common10StringViewE(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull align 1 dereferenceable(8) %10, ptr noundef nonnull %11)
          to label %31 unwind label %69

31:                                               ; preds = %28
  call void @_ZN6Common10StringViewD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %11) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %12) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #7
  call void @_ZN6Common10StringViewC2ILm5EEERAT__Kc(ptr noundef nonnull align 8 dereferenceable(16) %13, ptr noundef nonnull align 1 dereferenceable(5) @.str.13)
  %32 = invoke noundef zeroext i1 @_ZN7DynexCN27BinaryInputStreamSerializerclERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN6Common10StringViewE(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull align 8 dereferenceable(32) %12, ptr noundef nonnull %13)
          to label %33 unwind label %73

33:                                               ; preds = %31
  call void @_ZN6Common10StringViewD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %13) #7
  invoke void @_ZN7DynexCN27BinaryInputStreamSerializer9endObjectEv(ptr noundef nonnull align 8 dereferenceable(16) %6)
          to label %34 unwind label %71

34:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %14) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #7
  %.sroa.01.0.copyload = load i64, ptr %10, align 8, !tbaa !9
  invoke void @_ZN7DynexCN22WalletLegacySerializer7decryptERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERS6_N6Crypto10chacha8_ivES8_(ptr noundef nonnull align 8 dereferenceable(20) %0, ptr noundef nonnull align 8 dereferenceable(32) %12, ptr noundef nonnull align 8 dereferenceable(32) %14, i64 %.sroa.01.0.copyload, ptr noundef nonnull align 8 dereferenceable(32) %2)
          to label %35 unwind label %75

35:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %15) #7
  %36 = call noundef ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4dataEv(ptr noundef nonnull align 8 dereferenceable(32) %14) #7
  %37 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %14) #7
  invoke void @_ZN6Common17MemoryInputStreamC1EPKvm(ptr noundef nonnull align 8 dereferenceable(32) %15, ptr noundef %36, i64 noundef %37)
          to label %38 unwind label %77

38:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %16) #7
  call void @_ZN7DynexCN27BinaryInputStreamSerializerC2ERN6Common12IInputStreamE(ptr noundef nonnull align 8 dereferenceable(16) %16, ptr noundef nonnull align 8 dereferenceable(8) %15)
  invoke void @_ZN7DynexCN22WalletLegacySerializer8loadKeysERNS_11ISerializerE(ptr noundef nonnull align 8 dereferenceable(20) %0, ptr noundef nonnull align 8 dereferenceable(8) %16)
          to label %39 unwind label %79

39:                                               ; preds = %38
  %40 = load ptr, ptr %0, align 8, !tbaa !10
  %41 = invoke noundef nonnull align 1 dereferenceable(128) ptr @_ZNK7DynexCN11AccountBase14getAccountKeysEv(ptr noundef nonnull align 8 dereferenceable(136) %40)
          to label %42 unwind label %79

42:                                               ; preds = %39
  %43 = getelementptr inbounds i8, ptr %41, i64 96
  %44 = load ptr, ptr %0, align 8, !tbaa !10
  %45 = invoke noundef nonnull align 1 dereferenceable(128) ptr @_ZNK7DynexCN11AccountBase14getAccountKeysEv(ptr noundef nonnull align 8 dereferenceable(136) %44)
          to label %46 unwind label %79

46:                                               ; preds = %42
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %17) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %18) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %17, ptr noundef nonnull @.str.15, ptr noundef nonnull align 1 dereferenceable(1) %18)
          to label %47 unwind label %81

47:                                               ; preds = %46
  %48 = getelementptr inbounds i8, ptr %45, i64 32
  invoke void @_ZN7DynexCN20throwIfKeysMissmatchERKN6Crypto9SecretKeyERKNS0_9PublicKeyERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 1 dereferenceable(32) %43, ptr noundef nonnull align 1 dereferenceable(32) %48, ptr noundef nonnull align 8 dereferenceable(32) %17)
          to label %49 unwind label %83

49:                                               ; preds = %47
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %18) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %17) #7
  %50 = load ptr, ptr %0, align 8, !tbaa !10
  %51 = invoke noundef nonnull align 1 dereferenceable(128) ptr @_ZNK7DynexCN11AccountBase14getAccountKeysEv(ptr noundef nonnull align 8 dereferenceable(136) %50)
          to label %52 unwind label %79

52:                                               ; preds = %49
  %53 = getelementptr inbounds i8, ptr %51, i64 64
  %54 = call noundef zeroext i1 @_ZN6CryptoneERKNS_9SecretKeyES2_(ptr noundef nonnull align 1 dereferenceable(32) %53, ptr noundef nonnull align 1 dereferenceable(32) @_ZN7DynexCNL15NULL_SECRET_KEYE)
  %55 = load ptr, ptr %0, align 8, !tbaa !10
  br i1 %54, label %56, label %91

56:                                               ; preds = %52
  %57 = invoke noundef nonnull align 1 dereferenceable(128) ptr @_ZNK7DynexCN11AccountBase14getAccountKeysEv(ptr noundef nonnull align 8 dereferenceable(136) %55)
          to label %58 unwind label %79

58:                                               ; preds = %56
  %59 = getelementptr inbounds i8, ptr %57, i64 64
  %60 = load ptr, ptr %0, align 8, !tbaa !10
  %61 = invoke noundef nonnull align 1 dereferenceable(128) ptr @_ZNK7DynexCN11AccountBase14getAccountKeysEv(ptr noundef nonnull align 8 dereferenceable(136) %60)
          to label %62 unwind label %79

62:                                               ; preds = %58
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %19) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %20) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %20) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %19, ptr noundef nonnull @.str.15, ptr noundef nonnull align 1 dereferenceable(1) %20)
          to label %63 unwind label %86

63:                                               ; preds = %62
  invoke void @_ZN7DynexCN20throwIfKeysMissmatchERKN6Crypto9SecretKeyERKNS0_9PublicKeyERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 1 dereferenceable(32) %59, ptr noundef nonnull align 1 dereferenceable(32) %61, ptr noundef nonnull align 8 dereferenceable(32) %19)
          to label %64 unwind label %88

64:                                               ; preds = %63
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %20) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %20) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %19) #7
  br label %104

65:                                               ; preds = %4
  %66 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN6Common10StringViewD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %7) #7
  br label %130

67:                                               ; preds = %26
  %68 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN6Common10StringViewD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %9) #7
  br label %129

69:                                               ; preds = %28
  %70 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN6Common10StringViewD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %11) #7
  br label %128

71:                                               ; preds = %33
  %72 = landingpad { ptr, i32 }
          cleanup
  br label %127

73:                                               ; preds = %31
  %74 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN6Common10StringViewD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %13) #7
  br label %127

75:                                               ; preds = %34
  %76 = landingpad { ptr, i32 }
          cleanup
  br label %126

77:                                               ; preds = %35
  %78 = landingpad { ptr, i32 }
          cleanup
  br label %125

79:                                               ; preds = %101, %93, %91, %58, %56, %49, %42, %39, %38
  %80 = landingpad { ptr, i32 }
          cleanup
  br label %124

81:                                               ; preds = %46
  %82 = landingpad { ptr, i32 }
          cleanup
  br label %85

83:                                               ; preds = %47
  %84 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #7
  br label %85

85:                                               ; preds = %83, %81
  %.pn = phi { ptr, i32 } [ %84, %83 ], [ %82, %81 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %18) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %17) #7
  br label %124

86:                                               ; preds = %62
  %87 = landingpad { ptr, i32 }
          cleanup
  br label %90

88:                                               ; preds = %63
  %89 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #7
  br label %90

90:                                               ; preds = %88, %86
  %.pn17 = phi { ptr, i32 } [ %89, %88 ], [ %87, %86 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %20) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %20) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %19) #7
  br label %124

91:                                               ; preds = %52
  %92 = invoke noundef nonnull align 1 dereferenceable(128) ptr @_ZNK7DynexCN11AccountBase14getAccountKeysEv(ptr noundef nonnull align 8 dereferenceable(136) %55)
          to label %93 unwind label %79

93:                                               ; preds = %91
  %94 = invoke noundef zeroext i1 @_ZN6Crypto9check_keyERKNS_9PublicKeyE(ptr noundef nonnull align 1 dereferenceable(32) %92)
          to label %95 unwind label %79

95:                                               ; preds = %93
  br i1 %94, label %104, label %96

96:                                               ; preds = %95
  %97 = call ptr @__cxa_allocate_exception(i64 32) #7
  %98 = call { i32, ptr } @_Z15make_error_codeN7DynexCN5error16WalletErrorCodesE(i32 noundef 4)
  %99 = extractvalue { i32, ptr } %98, 0
  %100 = extractvalue { i32, ptr } %98, 1
  invoke void @_ZNSt12system_errorC2ESt10error_code(ptr noundef nonnull align 8 dereferenceable(32) %97, i32 %99, ptr %100)
          to label %101 unwind label %102

101:                                              ; preds = %96
  invoke void @__cxa_throw(ptr nonnull %97, ptr nonnull @_ZTISt12system_error, ptr nonnull @_ZNSt12system_errorD1Ev) #8
          to label %131 unwind label %79

102:                                              ; preds = %96
  %103 = landingpad { ptr, i32 }
          cleanup
  call void @__cxa_free_exception(ptr %97) #7
  br label %124

104:                                              ; preds = %95, %64
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %21) #7
  call void @_ZN6Common10StringViewC2ILm12EEERAT__Kc(ptr noundef nonnull align 8 dereferenceable(16) %22, ptr noundef nonnull align 1 dereferenceable(12) @.str.7)
  %105 = invoke noundef zeroext i1 @_ZN7DynexCN27BinaryInputStreamSerializerclERbN6Common10StringViewE(ptr noundef nonnull align 8 dereferenceable(16) %16, ptr noundef nonnull align 1 dereferenceable(1) %21, ptr noundef nonnull %22)
          to label %106 unwind label %114

106:                                              ; preds = %104
  call void @_ZN6Common10StringViewD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %22) #7
  %107 = load i8, ptr %21, align 1, !tbaa !13, !range !15, !noundef !16
  %108 = trunc nuw i8 %107 to i1
  br i1 %108, label %109, label %118

109:                                              ; preds = %106
  %110 = getelementptr inbounds i8, ptr %0, i64 8
  %111 = load ptr, ptr %110, align 8, !tbaa !17
  call void @_ZN6Common10StringViewC2ILm8EEERAT__Kc(ptr noundef nonnull align 8 dereferenceable(16) %23, ptr noundef nonnull align 1 dereferenceable(8) @.str.8)
  %112 = invoke noundef zeroext i1 @_ZN7DynexCN27BinaryInputStreamSerializerclINS_27WalletUserTransactionsCacheEEEbRT_N6Common10StringViewE(ptr noundef nonnull align 8 dereferenceable(16) %16, ptr noundef nonnull align 8 dereferenceable(224) %111, ptr noundef nonnull %23)
          to label %113 unwind label %116

113:                                              ; preds = %109
  call void @_ZN6Common10StringViewD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %23) #7
  br label %118

114:                                              ; preds = %104
  %115 = landingpad { ptr, i32 }
          cleanup
  br label %123

116:                                              ; preds = %109
  %117 = landingpad { ptr, i32 }
          cleanup
  br label %123

118:                                              ; preds = %113, %106
  call void @_ZN6Common10StringViewC2ILm6EEERAT__Kc(ptr noundef nonnull align 8 dereferenceable(16) %24, ptr noundef nonnull align 1 dereferenceable(6) @.str.9)
  %119 = invoke noundef zeroext i1 @_ZN7DynexCN27BinaryInputStreamSerializer6binaryERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN6Common10StringViewE(ptr noundef nonnull align 8 dereferenceable(16) %16, ptr noundef nonnull align 8 dereferenceable(32) %3, ptr noundef nonnull %24)
          to label %120 unwind label %121

120:                                              ; preds = %118
  call void @_ZN6Common10StringViewD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %24) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %21) #7
  call void @_ZN7DynexCN11ISerializerD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %16) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %16) #7
  call void @_ZN6Common12IInputStreamD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %15) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %14) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %12) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #7
  call void @_ZN7DynexCN11ISerializerD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %6) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #7
  call void @_ZN6Common12IInputStreamD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %5) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #7
  ret void

121:                                              ; preds = %118
  %122 = landingpad { ptr, i32 }
          cleanup
  br label %123

123:                                              ; preds = %121, %116, %114
  %.sink = phi ptr [ %24, %121 ], [ %23, %116 ], [ %22, %114 ]
  %.pn19 = phi { ptr, i32 } [ %122, %121 ], [ %117, %116 ], [ %115, %114 ]
  call void @_ZN6Common10StringViewD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %.sink) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %21) #7
  br label %124

124:                                              ; preds = %123, %102, %90, %85, %79
  %.pn19.pn = phi { ptr, i32 } [ %.pn19, %123 ], [ %.pn17, %90 ], [ %80, %79 ], [ %103, %102 ], [ %.pn, %85 ]
  call void @_ZN7DynexCN11ISerializerD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %16) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %16) #7
  call void @_ZN6Common12IInputStreamD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #7
  br label %125

125:                                              ; preds = %124, %77
  %.pn19.pn.pn = phi { ptr, i32 } [ %.pn19.pn, %124 ], [ %78, %77 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %15) #7
  br label %126

126:                                              ; preds = %125, %75
  %.pn19.pn.pn.pn = phi { ptr, i32 } [ %.pn19.pn.pn, %125 ], [ %76, %75 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %14) #7
  br label %127

127:                                              ; preds = %126, %73, %71
  %.pn19.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn19.pn.pn.pn, %126 ], [ %72, %71 ], [ %74, %73 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %12) #7
  br label %128

128:                                              ; preds = %127, %69
  %.pn19.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn19.pn.pn.pn.pn, %127 ], [ %70, %69 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #7
  br label %129

129:                                              ; preds = %128, %67
  %.pn19.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn19.pn.pn.pn.pn.pn, %128 ], [ %68, %67 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #7
  br label %130

130:                                              ; preds = %129, %65
  %.pn19.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn19.pn.pn.pn.pn.pn.pn, %129 ], [ %66, %65 ]
  call void @_ZN7DynexCN11ISerializerD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %6) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #7
  call void @_ZN6Common12IInputStreamD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %5) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #7
  resume { ptr, i32 } %.pn19.pn.pn.pn.pn.pn.pn.pn

131:                                              ; preds = %101
  unreachable
}

declare void @_ZN6Common14StdInputStreamC1ERSi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7DynexCN27BinaryInputStreamSerializerC2ERN6Common12IInputStreamE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #1 align 2

declare noundef zeroext i1 @_ZN7DynexCN27BinaryInputStreamSerializer11beginObjectEN6Common10StringViewE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) unnamed_addr #3

declare noundef zeroext i1 @_ZN7DynexCN27BinaryInputStreamSerializerclERjN6Common10StringViewE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef) unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN7DynexCN27BinaryInputStreamSerializerclIN6Crypto10chacha8_ivEEEbRT_N6Common10StringViewE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 1 dereferenceable(8), ptr noundef) local_unnamed_addr #4 align 2

declare noundef zeroext i1 @_ZN7DynexCN27BinaryInputStreamSerializerclERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN6Common10StringViewE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) unnamed_addr #3

declare void @_ZN7DynexCN27BinaryInputStreamSerializer9endObjectEv(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7DynexCN22WalletLegacySerializer7decryptERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERS6_N6Crypto10chacha8_ivES8_(ptr noundef nonnull align 8 dereferenceable(20), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32), i64, ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4dataEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #1 align 2

declare void @_ZN6Common17MemoryInputStreamC1EPKvm(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, i64 noundef) unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7DynexCN22WalletLegacySerializer8loadKeysERNS_11ISerializerE(ptr noundef nonnull align 8 dereferenceable(20), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #4 align 2

declare void @_ZN7DynexCN20throwIfKeysMissmatchERKN6Crypto9SecretKeyERKNS0_9PublicKeyERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 1 dereferenceable(32), ptr noundef nonnull align 1 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN6CryptoneERKNS_9SecretKeyES2_(ptr noundef nonnull align 1 dereferenceable(32), ptr noundef nonnull align 1 dereferenceable(32)) local_unnamed_addr #5

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN6Crypto9check_keyERKNS_9PublicKeyE(ptr noundef nonnull align 1 dereferenceable(32)) local_unnamed_addr #6

declare ptr @__cxa_allocate_exception(i64) local_unnamed_addr

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local { i32, ptr } @_Z15make_error_codeN7DynexCN5error16WalletErrorCodesE(i32 noundef) local_unnamed_addr #5

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt12system_errorC2ESt10error_code(ptr noundef nonnull align 8 dereferenceable(32), i32, ptr) unnamed_addr #4 align 2

declare void @__cxa_free_exception(ptr) local_unnamed_addr

; Function Attrs: nounwind
declare void @_ZNSt12system_errorD1Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #2

declare void @__cxa_throw(ptr, ptr, ptr) local_unnamed_addr

declare noundef zeroext i1 @_ZN7DynexCN27BinaryInputStreamSerializerclERbN6Common10StringViewE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 1 dereferenceable(1), ptr noundef) unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN7DynexCN27BinaryInputStreamSerializerclINS_27WalletUserTransactionsCacheEEEbRT_N6Common10StringViewE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(224), ptr noundef) local_unnamed_addr #4 align 2

declare noundef zeroext i1 @_ZN7DynexCN27BinaryInputStreamSerializer6binaryERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN6Common10StringViewE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) unnamed_addr #3

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

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

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

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

!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 = !{!7, !7, i64 0}
!10 = !{!11, !12, i64 0}
!11 = !{!"_ZTSN7DynexCN22WalletLegacySerializerE", !12, i64 0, !12, i64 8, !6, i64 16}
!12 = !{!"any pointer", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"bool", !7, i64 0}
!15 = !{i8 0, i8 2}
!16 = !{}
!17 = !{!11, !12, i64 8}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,SROAPass,SimplifyCFGPass