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

; 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::chacha8_iv" = type { [8 x i8] }
%"class.std::vector.135" = type { %"struct.std::_Vector_base.136" }
%"struct.std::_Vector_base.136" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"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::StringOutputStream" = type { %"class.Common::IOutputStream", ptr }
%"class.Common::IOutputStream" = type { ptr }
%"class.DynexCN::BinaryOutputStreamSerializer" = type { %"class.DynexCN::ISerializer", ptr }
%"class.DynexCN::ISerializer" = type { ptr }
%"class.Common::StringView" = type { ptr, i64 }
%"class.__gnu_cxx::__normal_iterator.218" = type { ptr }
%"struct.DynexCN::WalletGreen::ContainerStoragePrefix" = type { i8, %"struct.Crypto::chacha8_iv", %"struct.DynexCN::EncryptedWalletRecord" }
%"struct.DynexCN::EncryptedWalletRecord" = type { %"struct.Crypto::chacha8_iv", [72 x i8] }

@.str.53 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.54 = external hidden unnamed_addr constant [19 x i8], align 1

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

; 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: 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) #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: inlinehint mustprogress uwtable
declare dso_local void @_ZN6Crypto7chacha8EPKvmRKNS_11chacha8_keyERKNS_10chacha8_ivEPc(ptr noundef, i64 noundef, ptr noundef nonnull align 1 dereferenceable(32), ptr noundef nonnull align 1 dereferenceable(8), ptr noundef) #3

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

declare void @_ZN6Common18StringOutputStreamC1ERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #5

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

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

; 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 @_ZN7DynexCN11WalletGreen5incIvERN6Crypto10chacha8_ivE(ptr noundef nonnull align 1 dereferenceable(8)) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN6Common16FileMappedVectorIN7DynexCN21EncryptedWalletRecordEE6prefixEv(ptr noundef nonnull align 8 dereferenceable(105)) #6 align 2

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7DynexCN11WalletGreen27encryptAndSaveContainerDataERN6Common16FileMappedVectorINS_21EncryptedWalletRecordEEERKN6Crypto11chacha8_keyEPKvm(ptr noundef nonnull align 8 dereferenceable(105) %0, ptr noundef nonnull align 1 dereferenceable(32) %1, ptr noundef %2, i64 noundef %3) #6 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i64, align 8
  %9 = alloca ptr, align 8
  %10 = alloca %"struct.Crypto::chacha8_iv", align 1
  %11 = alloca %"class.std::vector.135", align 8
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca %"class.std::__cxx11::basic_string", align 8
  %15 = alloca %"class.Common::StringOutputStream", align 8
  %16 = alloca %"class.DynexCN::BinaryOutputStreamSerializer", align 8
  %17 = alloca %"class.Common::StringView", align 8
  %18 = alloca %"class.Common::StringView", align 8
  %19 = alloca %"class.__gnu_cxx::__normal_iterator.218", align 8
  %20 = alloca %"class.__gnu_cxx::__normal_iterator.218", 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 i64 %3, ptr %8, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  %21 = load ptr, ptr %5, align 8, !tbaa !5
  %22 = call noundef ptr @_ZN6Common16FileMappedVectorIN7DynexCN21EncryptedWalletRecordEE6prefixEv(ptr noundef nonnull align 8 dereferenceable(105) %21)
  store ptr %22, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  %23 = load ptr, ptr %9, align 8, !tbaa !5
  %24 = getelementptr inbounds %"struct.DynexCN::WalletGreen::ContainerStoragePrefix", ptr %23, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %10, ptr align 1 %24, i64 8, i1 false), !tbaa.struct !11
  %25 = load ptr, ptr %9, align 8, !tbaa !5
  %26 = getelementptr inbounds %"struct.DynexCN::WalletGreen::ContainerStoragePrefix", ptr %25, i32 0, i32 1
  call void @_ZN7DynexCN11WalletGreen5incIvERN6Crypto10chacha8_ivE(ptr noundef nonnull align 1 dereferenceable(8) %26)
  call void @llvm.lifetime.start.p0(i64 24, ptr %11) #7
  call void @_ZNSt6vectorIhSaIhEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #7
  %27 = load i64, ptr %8, align 8, !tbaa !9
  invoke void @_ZNSt6vectorIhSaIhEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %27)
          to label %28 unwind label %58

28:                                               ; preds = %4
  %29 = load ptr, ptr %7, align 8, !tbaa !5
  %30 = load i64, ptr %8, align 8, !tbaa !9
  %31 = load ptr, ptr %6, align 8, !tbaa !5
  %32 = call noundef ptr @_ZNSt6vectorIhSaIhEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #7
  invoke void @_ZN6Crypto7chacha8EPKvmRKNS_11chacha8_keyERKNS_10chacha8_ivEPc(ptr noundef %29, i64 noundef %30, ptr noundef nonnull align 1 dereferenceable(32) %31, ptr noundef nonnull align 1 dereferenceable(8) %10, ptr noundef %32)
          to label %33 unwind label %58

33:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 32, ptr %14) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %15) #7
  invoke void @_ZN6Common18StringOutputStreamC1ERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(16) %15, ptr noundef nonnull align 8 dereferenceable(32) %14)
          to label %34 unwind label %62

34:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 16, ptr %16) #7
  invoke void @_ZN7DynexCN28BinaryOutputStreamSerializerC2ERN6Common13IOutputStreamE(ptr noundef nonnull align 8 dereferenceable(16) %16, ptr noundef nonnull align 8 dereferenceable(8) %15)
          to label %35 unwind label %66

35:                                               ; preds = %34
  invoke void @_ZN6Common10StringViewC2ILm9EEERAT__Kc(ptr noundef nonnull align 8 dereferenceable(16) %17, ptr noundef nonnull align 1 dereferenceable(9) @.str.53)
          to label %36 unwind label %70

36:                                               ; preds = %35
  %37 = invoke noundef zeroext i1 @_ZN7DynexCN28BinaryOutputStreamSerializerclIN6Crypto10chacha8_ivEEEbRT_N6Common10StringViewE(ptr noundef nonnull align 8 dereferenceable(16) %16, ptr noundef nonnull align 1 dereferenceable(8) %10, ptr noundef %17)
          to label %38 unwind label %74

38:                                               ; preds = %36
  call void @_ZN6Common10StringViewD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %17) #7
  invoke void @_ZN6Common10StringViewC2ILm19EEERAT__Kc(ptr noundef nonnull align 8 dereferenceable(16) %18, ptr noundef nonnull align 1 dereferenceable(19) @.str.54)
          to label %39 unwind label %70

39:                                               ; preds = %38
  %40 = invoke noundef zeroext i1 @_ZN7DynexCN28BinaryOutputStreamSerializerclISt6vectorIhSaIhEEEEbRT_N6Common10StringViewE(ptr noundef nonnull align 8 dereferenceable(16) %16, ptr noundef nonnull align 8 dereferenceable(24) %11, ptr noundef %18)
          to label %41 unwind label %78

41:                                               ; preds = %39
  call void @_ZN6Common10StringViewD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %18) #7
  %42 = load ptr, ptr %5, align 8, !tbaa !5
  %43 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %14) #7
  invoke void @_ZN6Common16FileMappedVectorIN7DynexCN21EncryptedWalletRecordEE12resizeSuffixEm(ptr noundef nonnull align 8 dereferenceable(105) %42, i64 noundef %43)
          to label %44 unwind label %70

44:                                               ; preds = %41
  %45 = call ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5beginEv(ptr noundef nonnull align 8 dereferenceable(32) %14) #7
  %46 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.218", ptr %19, i32 0, i32 0
  store ptr %45, ptr %46, align 8
  %47 = call ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE3endEv(ptr noundef nonnull align 8 dereferenceable(32) %14) #7
  %48 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.218", ptr %20, i32 0, i32 0
  store ptr %47, ptr %48, align 8
  %49 = load ptr, ptr %5, align 8, !tbaa !5
  %50 = invoke noundef ptr @_ZN6Common16FileMappedVectorIN7DynexCN21EncryptedWalletRecordEE6suffixEv(ptr noundef nonnull align 8 dereferenceable(105) %49)
          to label %51 unwind label %70

51:                                               ; preds = %44
  %52 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.218", ptr %19, i32 0, i32 0
  %53 = load ptr, ptr %52, align 8
  %54 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.218", ptr %20, i32 0, i32 0
  %55 = load ptr, ptr %54, align 8
  %56 = invoke noundef ptr @_ZSt4copyIN9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEPhET0_T_SC_SB_(ptr %53, ptr %55, ptr noundef %50)
          to label %57 unwind label %70

57:                                               ; preds = %51
  call void @_ZN7DynexCN11ISerializerD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %16) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #7
  call void @_ZN6Common13IOutputStreamD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %15) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %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 %14) #7
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  ret void

58:                                               ; preds = %28, %4
  %59 = landingpad { ptr, i32 }
          cleanup
  %60 = extractvalue { ptr, i32 } %59, 0
  store ptr %60, ptr %12, align 8
  %61 = extractvalue { ptr, i32 } %59, 1
  store i32 %61, ptr %13, align 4
  br label %85

62:                                               ; preds = %33
  %63 = landingpad { ptr, i32 }
          cleanup
  %64 = extractvalue { ptr, i32 } %63, 0
  store ptr %64, ptr %12, align 8
  %65 = extractvalue { ptr, i32 } %63, 1
  store i32 %65, ptr %13, align 4
  br label %84

66:                                               ; preds = %34
  %67 = landingpad { ptr, i32 }
          cleanup
  %68 = extractvalue { ptr, i32 } %67, 0
  store ptr %68, ptr %12, align 8
  %69 = extractvalue { ptr, i32 } %67, 1
  store i32 %69, ptr %13, align 4
  br label %83

70:                                               ; preds = %51, %44, %41, %38, %35
  %71 = landingpad { ptr, i32 }
          cleanup
  %72 = extractvalue { ptr, i32 } %71, 0
  store ptr %72, ptr %12, align 8
  %73 = extractvalue { ptr, i32 } %71, 1
  store i32 %73, ptr %13, align 4
  br label %82

74:                                               ; preds = %36
  %75 = landingpad { ptr, i32 }
          cleanup
  %76 = extractvalue { ptr, i32 } %75, 0
  store ptr %76, ptr %12, align 8
  %77 = extractvalue { ptr, i32 } %75, 1
  store i32 %77, ptr %13, align 4
  call void @_ZN6Common10StringViewD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %17) #7
  br label %82

78:                                               ; preds = %39
  %79 = landingpad { ptr, i32 }
          cleanup
  %80 = extractvalue { ptr, i32 } %79, 0
  store ptr %80, ptr %12, align 8
  %81 = extractvalue { ptr, i32 } %79, 1
  store i32 %81, ptr %13, align 4
  call void @_ZN6Common10StringViewD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %18) #7
  br label %82

82:                                               ; preds = %78, %74, %70
  call void @_ZN7DynexCN11ISerializerD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %16) #7
  br label %83

83:                                               ; preds = %82, %66
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #7
  call void @_ZN6Common13IOutputStreamD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %15) #7
  br label %84

84:                                               ; preds = %83, %62
  call void @llvm.lifetime.end.p0(i64 16, ptr %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 %14) #7
  br label %85

85:                                               ; preds = %84, %58
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  br label %86

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIhSaIhEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #6 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN7DynexCN28BinaryOutputStreamSerializerclISt6vectorIhSaIhEEEEbRT_N6Common10StringViewE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef) #6 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6Common16FileMappedVectorIN7DynexCN21EncryptedWalletRecordEE12resizeSuffixEm(ptr noundef nonnull align 8 dereferenceable(105), i64 noundef) #6 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZSt4copyIN9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEPhET0_T_SC_SB_(ptr, ptr, ptr noundef) #3

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN6Common16FileMappedVectorIN7DynexCN21EncryptedWalletRecordEE6suffixEv(ptr noundef nonnull align 8 dereferenceable(105)) #6 align 2

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

attributes #0 = { 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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #4 = { 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 #5 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { mustprogress 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 }

!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 = !{!"long", !7, i64 0}
!11 = !{i64 0, i64 8, !12}
!12 = !{!7, !7, i64 0}


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

%"struct.Crypto::chacha8_iv" = type { [8 x i8] }
%"class.std::vector.135" = type { %"struct.std::_Vector_base.136" }
%"struct.std::_Vector_base.136" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"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::StringOutputStream" = type { %"class.Common::IOutputStream", ptr }
%"class.Common::IOutputStream" = type { ptr }
%"class.DynexCN::BinaryOutputStreamSerializer" = type { %"class.DynexCN::ISerializer", ptr }
%"class.DynexCN::ISerializer" = type { ptr }
%"class.Common::StringView" = type { ptr, i64 }

@.str.53 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.54 = external hidden unnamed_addr constant [19 x i8], align 1

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

; 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 void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #1 align 2

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7DynexCN28BinaryOutputStreamSerializerC2ERN6Common13IOutputStreamE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #1 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 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 @_ZN7DynexCN11WalletGreen5incIvERN6Crypto10chacha8_ivE(ptr noundef nonnull align 1 dereferenceable(8)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN6Common16FileMappedVectorIN7DynexCN21EncryptedWalletRecordEE6prefixEv(ptr noundef nonnull align 8 dereferenceable(105)) local_unnamed_addr #5 align 2

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7DynexCN11WalletGreen27encryptAndSaveContainerDataERN6Common16FileMappedVectorINS_21EncryptedWalletRecordEEERKN6Crypto11chacha8_keyEPKvm(ptr noundef nonnull align 8 dereferenceable(105) %0, ptr noundef nonnull align 1 dereferenceable(32) %1, ptr noundef %2, i64 noundef %3) local_unnamed_addr #5 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca %"struct.Crypto::chacha8_iv", align 8
  %6 = alloca %"class.std::vector.135", align 8
  %7 = alloca %"class.std::__cxx11::basic_string", align 8
  %8 = alloca %"class.Common::StringOutputStream", align 8
  %9 = alloca %"class.DynexCN::BinaryOutputStreamSerializer", align 8
  %10 = alloca %"class.Common::StringView", align 8
  %11 = alloca %"class.Common::StringView", align 8
  %12 = tail call noundef ptr @_ZN6Common16FileMappedVectorIN7DynexCN21EncryptedWalletRecordEE6prefixEv(ptr noundef nonnull align 8 dereferenceable(105) %0)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #6
  %13 = getelementptr inbounds i8, ptr %12, i64 1
  %14 = load i64, ptr %13, align 1, !tbaa !5
  store i64 %14, ptr %5, align 8, !tbaa !5
  tail call void @_ZN7DynexCN11WalletGreen5incIvERN6Crypto10chacha8_ivE(ptr noundef nonnull align 1 dereferenceable(8) %13)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #6
  call void @_ZNSt6vectorIhSaIhEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #6
  invoke void @_ZNSt6vectorIhSaIhEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %3)
          to label %15 unwind label %31

15:                                               ; preds = %4
  %16 = call noundef ptr @_ZNSt6vectorIhSaIhEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #6
  invoke void @_ZN6Crypto7chacha8EPKvmRKNS_11chacha8_keyERKNS_10chacha8_ivEPc(ptr noundef %2, i64 noundef %3, ptr noundef nonnull align 1 dereferenceable(32) %1, ptr noundef nonnull align 1 dereferenceable(8) %5, ptr noundef %16)
          to label %17 unwind label %31

17:                                               ; preds = %15
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #6
  invoke void @_ZN6Common18StringOutputStreamC1ERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(16) %8, ptr noundef nonnull align 8 dereferenceable(32) %7)
          to label %18 unwind label %33

18:                                               ; preds = %17
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #6
  call void @_ZN7DynexCN28BinaryOutputStreamSerializerC2ERN6Common13IOutputStreamE(ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef nonnull align 8 dereferenceable(8) %8)
  call void @_ZN6Common10StringViewC2ILm9EEERAT__Kc(ptr noundef nonnull align 8 dereferenceable(16) %10, ptr noundef nonnull align 1 dereferenceable(9) @.str.53)
  %19 = invoke noundef zeroext i1 @_ZN7DynexCN28BinaryOutputStreamSerializerclIN6Crypto10chacha8_ivEEEbRT_N6Common10StringViewE(ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef nonnull align 1 dereferenceable(8) %5, ptr noundef nonnull %10)
          to label %20 unwind label %37

20:                                               ; preds = %18
  call void @_ZN6Common10StringViewD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %10) #6
  call void @_ZN6Common10StringViewC2ILm19EEERAT__Kc(ptr noundef nonnull align 8 dereferenceable(16) %11, ptr noundef nonnull align 1 dereferenceable(19) @.str.54)
  %21 = invoke noundef zeroext i1 @_ZN7DynexCN28BinaryOutputStreamSerializerclISt6vectorIhSaIhEEEEbRT_N6Common10StringViewE(ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull %11)
          to label %22 unwind label %39

22:                                               ; preds = %20
  call void @_ZN6Common10StringViewD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %11) #6
  %23 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %7) #6
  invoke void @_ZN6Common16FileMappedVectorIN7DynexCN21EncryptedWalletRecordEE12resizeSuffixEm(ptr noundef nonnull align 8 dereferenceable(105) %0, i64 noundef %23)
          to label %24 unwind label %35

24:                                               ; preds = %22
  %25 = call ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5beginEv(ptr noundef nonnull align 8 dereferenceable(32) %7) #6
  %26 = call ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE3endEv(ptr noundef nonnull align 8 dereferenceable(32) %7) #6
  %27 = invoke noundef ptr @_ZN6Common16FileMappedVectorIN7DynexCN21EncryptedWalletRecordEE6suffixEv(ptr noundef nonnull align 8 dereferenceable(105) %0)
          to label %28 unwind label %35

28:                                               ; preds = %24
  %29 = invoke noundef ptr @_ZSt4copyIN9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEPhET0_T_SC_SB_(ptr %25, ptr %26, ptr noundef %27)
          to label %30 unwind label %35

30:                                               ; preds = %28
  call void @_ZN7DynexCN11ISerializerD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %9) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #6
  call void @_ZN6Common13IOutputStreamD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %8) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #6
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  ret void

31:                                               ; preds = %15, %4
  %32 = landingpad { ptr, i32 }
          cleanup
  br label %43

33:                                               ; preds = %17
  %34 = landingpad { ptr, i32 }
          cleanup
  br label %42

35:                                               ; preds = %28, %24, %22
  %36 = landingpad { ptr, i32 }
          cleanup
  br label %41

37:                                               ; preds = %18
  %38 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN6Common10StringViewD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %10) #6
  br label %41

39:                                               ; preds = %20
  %40 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN6Common10StringViewD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %11) #6
  br label %41

41:                                               ; preds = %39, %37, %35
  %.pn = phi { ptr, i32 } [ %36, %35 ], [ %40, %39 ], [ %38, %37 ]
  call void @_ZN7DynexCN11ISerializerD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %9) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #6
  call void @_ZN6Common13IOutputStreamD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %8) #6
  br label %42

42:                                               ; preds = %41, %33
  %.pn.pn = phi { ptr, i32 } [ %.pn, %41 ], [ %34, %33 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #6
  br label %43

43:                                               ; preds = %42, %31
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %42 ], [ %32, %31 ]
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  resume { ptr, i32 } %.pn.pn.pn
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIhSaIhEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #5 align 2

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6Common16FileMappedVectorIN7DynexCN21EncryptedWalletRecordEE12resizeSuffixEm(ptr noundef nonnull align 8 dereferenceable(105), i64 noundef) local_unnamed_addr #5 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZSt4copyIN9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEPhET0_T_SC_SB_(ptr, ptr, ptr noundef) local_unnamed_addr #2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN6Common16FileMappedVectorIN7DynexCN21EncryptedWalletRecordEE6suffixEv(ptr noundef nonnull align 8 dereferenceable(105)) local_unnamed_addr #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6Common13IOutputStreamD2Ev(ptr noundef nonnull align 8 dereferenceable(8)) 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 = { 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 #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 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}


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