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

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.__gnu_cxx::__normal_iterator.96" = type { ptr }
%"struct.DynexCN::WalletTransaction" = type <{ i8, [7 x i8], i64, i32, %"struct.Crypto::Hash", %"class.boost::optional", [3 x i8], i64, i64, i64, i64, %"class.std::__cxx11::basic_string", i8, [7 x i8] }>
%"struct.Crypto::Hash" = type { [32 x i8] }
%"class.boost::optional" = type { %"class.boost::optional_detail::optional_base" }
%"class.boost::optional_detail::optional_base" = type { i8, %"class.boost::optional_detail::aligned_storage" }
%"class.boost::optional_detail::aligned_storage" = type { %"union.boost::optional_detail::aligned_storage<Crypto::SecretKey>::dummy_u" }
%"union.boost::optional_detail::aligned_storage<Crypto::SecretKey>::dummy_u" = type { [32 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] }
%"struct.std::pair.93" = type <{ %"class.boost::multi_index::detail::rnd_node_iterator.73", i8, [7 x i8] }>
%"class.boost::multi_index::detail::rnd_node_iterator.73" = type { ptr }
%"class.std::error_code" = type { i32, ptr }
%"struct.DynexCN::WalletTransfer" = type { i8, %"class.std::__cxx11::basic_string", i64 }
%"struct.std::pair.90" = type { i64, %"struct.DynexCN::WalletTransfer" }
%"class.DynexCN::WalletSerializerV1" = type <{ ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, [4 x i8] }>
%"struct.DynexCN::WalletLegacyTransaction" = type <{ i64, i64, i64, i64, i64, i64, %"struct.Crypto::Hash", %"class.boost::optional", i8, [2 x i8], i32, i64, %"class.std::__cxx11::basic_string", i8, [7 x i8] }>

@_ZTISt12system_error = external constant ptr

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

declare ptr @__cxa_allocate_exception(i64)

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt12system_errorC2ESt10error_code(ptr noundef nonnull align 8 dereferenceable(32), i32, ptr) unnamed_addr #2 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)

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7DynexCN18WalletSerializerV118addWalletV1DetailsERKSt6vectorINS_23WalletLegacyTransactionESaIS2_EERKS1_INS_20WalletLegacyTransferESaIS7_EE(ptr noundef nonnull align 8 dereferenceable(92) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(24) %2) #2 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i64, align 8
  %8 = alloca ptr, align 8
  %9 = alloca %"class.__gnu_cxx::__normal_iterator.96", align 8
  %10 = alloca %"class.__gnu_cxx::__normal_iterator.96", align 8
  %11 = alloca ptr, align 8
  %12 = alloca %"struct.DynexCN::WalletTransaction", align 8
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca %"struct.std::pair.93", align 8
  %16 = alloca i64, align 8
  %17 = alloca i64, align 8
  %18 = alloca %"class.std::error_code", align 8
  %19 = alloca %"struct.DynexCN::WalletTransfer", align 8
  %20 = alloca %"struct.std::pair.90", align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  %21 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  store i64 0, ptr %7, align 8, !tbaa !9
  %22 = getelementptr inbounds %"class.DynexCN::WalletSerializerV1", ptr %21, i32 0, i32 9
  %23 = load ptr, ptr %22, align 8, !tbaa !11
  %24 = load ptr, ptr %6, align 8, !tbaa !5
  %25 = call noundef i64 @_ZNKSt6vectorIN7DynexCN20WalletLegacyTransferESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %24) #5
  call void @_ZNSt6vectorISt4pairImN7DynexCN14WalletTransferEESaIS3_EE7reserveEm(ptr noundef nonnull align 8 dereferenceable(24) %23, i64 noundef %25)
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  %26 = load ptr, ptr %5, align 8, !tbaa !5
  store ptr %26, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %27 = load ptr, ptr %8, align 8, !tbaa !5
  %28 = call ptr @_ZNKSt6vectorIN7DynexCN23WalletLegacyTransactionESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %27) #5
  %29 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.96", ptr %9, i32 0, i32 0
  store ptr %28, ptr %29, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  %30 = load ptr, ptr %8, align 8, !tbaa !5
  %31 = call ptr @_ZNKSt6vectorIN7DynexCN23WalletLegacyTransactionESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %30) #5
  %32 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.96", ptr %10, i32 0, i32 0
  store ptr %31, ptr %32, align 8
  br label %33

33:                                               ; preds = %131, %3
  %34 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKN7DynexCN23WalletLegacyTransactionESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %10) #5
  br i1 %34, label %36, label %35

35:                                               ; preds = %33
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  br label %134

36:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  %37 = call noundef nonnull align 8 dereferenceable(161) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKN7DynexCN23WalletLegacyTransactionESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #5
  store ptr %37, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 160, ptr %12) #5
  %38 = load ptr, ptr %11, align 8, !tbaa !5
  call void @_ZN12_GLOBAL__N_17convertERKN7DynexCN23WalletLegacyTransactionE(ptr dead_on_unwind writable sret(%"struct.DynexCN::WalletTransaction") align 8 %12, ptr noundef nonnull align 8 dereferenceable(161) %38)
  %39 = getelementptr inbounds %"class.DynexCN::WalletSerializerV1", ptr %21, i32 0, i32 8
  %40 = load ptr, ptr %39, align 8, !tbaa !14
  %41 = call noundef nonnull align 8 dereferenceable(96) ptr @_ZN5boost11multi_index21multi_index_containerIN7DynexCN17WalletTransactionENS0_10indexed_byINS0_13random_accessINS0_3tagINS2_17RandomAccessIndexEN4mpl_2naES9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_EEEENS0_13hashed_uniqueINS6_INS2_16TransactionIndexES9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_EENS0_6memberIS3_N6Crypto4HashEXadL_ZNS3_4hashEEEEES9_S9_EENS0_18ordered_non_uniqueINS6_INS2_16BlockHeightIndexES9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_EENSF_IS3_jXadL_ZNS3_11blockHeightEEEEES9_EES9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_EESaIS3_EE3getIS7_EERNSR_5indexIT_E4typeEv(ptr noundef nonnull align 8 dereferenceable(120) %40) #5
  %42 = invoke { ptr, i8 } @_ZN5boost11multi_index6detail19random_access_indexINS1_9nth_layerILi1EN7DynexCN17WalletTransactionENS0_10indexed_byINS0_13random_accessINS0_3tagINS4_17RandomAccessIndexEN4mpl_2naESB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_EEEENS0_13hashed_uniqueINS8_INS4_16TransactionIndexESB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_EENS0_6memberIS5_N6Crypto4HashEXadL_ZNS5_4hashEEEEESB_SB_EENS0_18ordered_non_uniqueINS8_INS4_16BlockHeightIndexESB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_EENSH_IS5_jXadL_ZNS5_11blockHeightEEEEESB_EESB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_EESaIS5_EEENS_3mpl6v_itemIS9_NSU_7vector0ISB_EELi0EEEE9push_backEOS5_(ptr noundef nonnull align 8 dereferenceable(96) %41, ptr noundef nonnull align 8 dereferenceable(153) %12)
          to label %43 unwind label %83

43:                                               ; preds = %36
  %44 = getelementptr inbounds { ptr, i8 }, ptr %15, i32 0, i32 0
  %45 = extractvalue { ptr, i8 } %42, 0
  store ptr %45, ptr %44, align 8
  %46 = getelementptr inbounds { ptr, i8 }, ptr %15, i32 0, i32 1
  %47 = extractvalue { ptr, i8 } %42, 1
  store i8 %47, ptr %46, align 8
  %48 = load ptr, ptr %11, align 8, !tbaa !5
  %49 = getelementptr inbounds %"struct.DynexCN::WalletLegacyTransaction", ptr %48, i32 0, i32 0
  %50 = load i64, ptr %49, align 8, !tbaa !15
  %51 = icmp ne i64 %50, -1
  br i1 %51, label %52, label %128

52:                                               ; preds = %43
  %53 = load ptr, ptr %11, align 8, !tbaa !5
  %54 = getelementptr inbounds %"struct.DynexCN::WalletLegacyTransaction", ptr %53, i32 0, i32 1
  %55 = load i64, ptr %54, align 8, !tbaa !25
  %56 = icmp ne i64 %55, 0
  br i1 %56, label %57, label %128

57:                                               ; preds = %52
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  %58 = load ptr, ptr %11, align 8, !tbaa !5
  %59 = getelementptr inbounds %"struct.DynexCN::WalletLegacyTransaction", ptr %58, i32 0, i32 0
  %60 = load i64, ptr %59, align 8, !tbaa !15
  store i64 %60, ptr %16, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  %61 = load i64, ptr %16, align 8, !tbaa !9
  %62 = load ptr, ptr %11, align 8, !tbaa !5
  %63 = getelementptr inbounds %"struct.DynexCN::WalletLegacyTransaction", ptr %62, i32 0, i32 1
  %64 = load i64, ptr %63, align 8, !tbaa !25
  %65 = add i64 %61, %64
  store i64 %65, ptr %17, align 8, !tbaa !9
  %66 = load i64, ptr %17, align 8, !tbaa !9
  %67 = load ptr, ptr %6, align 8, !tbaa !5
  %68 = call noundef i64 @_ZNKSt6vectorIN7DynexCN20WalletLegacyTransferESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %67) #5
  %69 = icmp ugt i64 %66, %68
  br i1 %69, label %70, label %95

70:                                               ; preds = %57
  %71 = call ptr @__cxa_allocate_exception(i64 32) #5
  %72 = invoke { i32, ptr } @_Z15make_error_codeN7DynexCN5error16WalletErrorCodesE(i32 noundef 5)
          to label %73 unwind label %87

73:                                               ; preds = %70
  %74 = getelementptr inbounds { i32, ptr }, ptr %18, i32 0, i32 0
  %75 = extractvalue { i32, ptr } %72, 0
  store i32 %75, ptr %74, align 8
  %76 = getelementptr inbounds { i32, ptr }, ptr %18, i32 0, i32 1
  %77 = extractvalue { i32, ptr } %72, 1
  store ptr %77, ptr %76, align 8
  %78 = getelementptr inbounds { i32, ptr }, ptr %18, i32 0, i32 0
  %79 = load i32, ptr %78, align 8
  %80 = getelementptr inbounds { i32, ptr }, ptr %18, i32 0, i32 1
  %81 = load ptr, ptr %80, align 8
  invoke void @_ZNSt12system_errorC2ESt10error_code(ptr noundef nonnull align 8 dereferenceable(32) %71, i32 %79, ptr %81)
          to label %82 unwind label %87

82:                                               ; preds = %73
  invoke void @__cxa_throw(ptr %71, ptr @_ZTISt12system_error, ptr @_ZNSt12system_errorD1Ev) #6
          to label %140 unwind label %91

83:                                               ; preds = %36
  %84 = landingpad { ptr, i32 }
          cleanup
  %85 = extractvalue { ptr, i32 } %84, 0
  store ptr %85, ptr %13, align 8
  %86 = extractvalue { ptr, i32 } %84, 1
  store i32 %86, ptr %14, align 4
  br label %133

87:                                               ; preds = %73, %70
  %88 = landingpad { ptr, i32 }
          cleanup
  %89 = extractvalue { ptr, i32 } %88, 0
  store ptr %89, ptr %13, align 8
  %90 = extractvalue { ptr, i32 } %88, 1
  store i32 %90, ptr %14, align 4
  call void @__cxa_free_exception(ptr %71) #5
  br label %127

91:                                               ; preds = %82
  %92 = landingpad { ptr, i32 }
          cleanup
  %93 = extractvalue { ptr, i32 } %92, 0
  store ptr %93, ptr %13, align 8
  %94 = extractvalue { ptr, i32 } %92, 1
  store i32 %94, ptr %14, align 4
  br label %127

95:                                               ; preds = %57
  br label %96

96:                                               ; preds = %109, %95
  %97 = load i64, ptr %16, align 8, !tbaa !9
  %98 = load i64, ptr %17, align 8, !tbaa !9
  %99 = icmp ult i64 %97, %98
  br i1 %99, label %100, label %126

100:                                              ; preds = %96
  call void @llvm.lifetime.start.p0(i64 48, ptr %19) #5
  %101 = load ptr, ptr %6, align 8, !tbaa !5
  %102 = load i64, ptr %16, align 8, !tbaa !9
  %103 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNKSt6vectorIN7DynexCN20WalletLegacyTransferESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %101, i64 noundef %102) #5
  invoke void @_ZN12_GLOBAL__N_17convertERKN7DynexCN20WalletLegacyTransferE(ptr dead_on_unwind writable sret(%"struct.DynexCN::WalletTransfer") align 8 %19, ptr noundef nonnull align 8 dereferenceable(40) %103)
          to label %104 unwind label %112

104:                                              ; preds = %100
  %105 = getelementptr inbounds %"class.DynexCN::WalletSerializerV1", ptr %21, i32 0, i32 9
  %106 = load ptr, ptr %105, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 56, ptr %20) #5
  invoke void @_ZSt9make_pairIRmRN7DynexCN14WalletTransferEESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS5_INS6_IT0_E4typeEE6__typeEEOS7_OSC_(ptr dead_on_unwind writable sret(%"struct.std::pair.90") align 8 %20, ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(48) %19)
          to label %107 unwind label %116

107:                                              ; preds = %104
  invoke void @_ZNSt6vectorISt4pairImN7DynexCN14WalletTransferEESaIS3_EE9push_backEOS3_(ptr noundef nonnull align 8 dereferenceable(24) %106, ptr noundef nonnull align 8 dereferenceable(56) %20)
          to label %108 unwind label %120

108:                                              ; preds = %107
  call void @_ZNSt4pairImN7DynexCN14WalletTransferEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %20) #5
  call void @llvm.lifetime.end.p0(i64 56, ptr %20) #5
  call void @_ZN7DynexCN14WalletTransferD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %19) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr %19) #5
  br label %109

109:                                              ; preds = %108
  %110 = load i64, ptr %16, align 8, !tbaa !9
  %111 = add i64 %110, 1
  store i64 %111, ptr %16, align 8, !tbaa !9
  br label %96, !llvm.loop !26

112:                                              ; preds = %100
  %113 = landingpad { ptr, i32 }
          cleanup
  %114 = extractvalue { ptr, i32 } %113, 0
  store ptr %114, ptr %13, align 8
  %115 = extractvalue { ptr, i32 } %113, 1
  store i32 %115, ptr %14, align 4
  br label %125

116:                                              ; preds = %104
  %117 = landingpad { ptr, i32 }
          cleanup
  %118 = extractvalue { ptr, i32 } %117, 0
  store ptr %118, ptr %13, align 8
  %119 = extractvalue { ptr, i32 } %117, 1
  store i32 %119, ptr %14, align 4
  br label %124

120:                                              ; preds = %107
  %121 = landingpad { ptr, i32 }
          cleanup
  %122 = extractvalue { ptr, i32 } %121, 0
  store ptr %122, ptr %13, align 8
  %123 = extractvalue { ptr, i32 } %121, 1
  store i32 %123, ptr %14, align 4
  call void @_ZNSt4pairImN7DynexCN14WalletTransferEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %20) #5
  br label %124

124:                                              ; preds = %120, %116
  call void @llvm.lifetime.end.p0(i64 56, ptr %20) #5
  call void @_ZN7DynexCN14WalletTransferD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %19) #5
  br label %125

125:                                              ; preds = %124, %112
  call void @llvm.lifetime.end.p0(i64 48, ptr %19) #5
  br label %127

126:                                              ; preds = %96
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  br label %128

127:                                              ; preds = %125, %91, %87
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  br label %133

128:                                              ; preds = %126, %52, %43
  %129 = load i64, ptr %7, align 8, !tbaa !9
  %130 = add i64 %129, 1
  store i64 %130, ptr %7, align 8, !tbaa !9
  call void @_ZN7DynexCN17WalletTransactionD2Ev(ptr noundef nonnull align 8 dereferenceable(153) %12) #5
  call void @llvm.lifetime.end.p0(i64 160, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  br label %131

131:                                              ; preds = %128
  %132 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPKN7DynexCN23WalletLegacyTransactionESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #5
  br label %33

133:                                              ; preds = %127, %83
  call void @_ZN7DynexCN17WalletTransactionD2Ev(ptr noundef nonnull align 8 dereferenceable(153) %12) #5
  call void @llvm.lifetime.end.p0(i64 160, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  br label %135

134:                                              ; preds = %35
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  ret void

135:                                              ; preds = %133
  %136 = load ptr, ptr %13, align 8
  %137 = load i32, ptr %14, align 4
  %138 = insertvalue { ptr, i32 } poison, ptr %136, 0
  %139 = insertvalue { ptr, i32 } %138, i32 %137, 1
  resume { ptr, i32 } %139

140:                                              ; preds = %82
  unreachable
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(96) ptr @_ZN5boost11multi_index21multi_index_containerIN7DynexCN17WalletTransactionENS0_10indexed_byINS0_13random_accessINS0_3tagINS2_17RandomAccessIndexEN4mpl_2naES9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_EEEENS0_13hashed_uniqueINS6_INS2_16TransactionIndexES9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_EENS0_6memberIS3_N6Crypto4HashEXadL_ZNS3_4hashEEEEES9_S9_EENS0_18ordered_non_uniqueINS6_INS2_16BlockHeightIndexES9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_EENSF_IS3_jXadL_ZNS3_11blockHeightEEEEES9_EES9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_EESaIS3_EE3getIS7_EERNSR_5indexIT_E4typeEv(ptr noundef nonnull align 8 dereferenceable(120)) #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i8 } @_ZN5boost11multi_index6detail19random_access_indexINS1_9nth_layerILi1EN7DynexCN17WalletTransactionENS0_10indexed_byINS0_13random_accessINS0_3tagINS4_17RandomAccessIndexEN4mpl_2naESB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_EEEENS0_13hashed_uniqueINS8_INS4_16TransactionIndexESB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_EENS0_6memberIS5_N6Crypto4HashEXadL_ZNS5_4hashEEEEESB_SB_EENS0_18ordered_non_uniqueINS8_INS4_16BlockHeightIndexESB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_EENSH_IS5_jXadL_ZNS5_11blockHeightEEEEESB_EESB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_EESaIS5_EEENS_3mpl6v_itemIS9_NSU_7vector0ISB_EELi0EEEE9push_backEOS5_(ptr noundef nonnull align 8 dereferenceable(96), ptr noundef nonnull align 8 dereferenceable(153)) #2 align 2

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZSt9make_pairIRmRN7DynexCN14WalletTransferEESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS5_INS6_IT0_E4typeEE6__typeEEOS7_OSC_(ptr dead_on_unwind noalias writable sret(%"struct.std::pair.90") align 8, ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(48)) #2

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(161) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKN7DynexCN23WalletLegacyTransactionESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) #4 align 2

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN12_GLOBAL__N_17convertERKN7DynexCN23WalletLegacyTransactionE(ptr dead_on_unwind noalias writable sret(%"struct.DynexCN::WalletTransaction") align 8, ptr noundef nonnull align 8 dereferenceable(161)) #2

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN12_GLOBAL__N_17convertERKN7DynexCN20WalletLegacyTransferE(ptr dead_on_unwind noalias writable sret(%"struct.DynexCN::WalletTransfer") align 8, ptr noundef nonnull align 8 dereferenceable(40)) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(40) ptr @_ZNKSt6vectorIN7DynexCN20WalletLegacyTransferESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #4 align 2

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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 = { 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 #5 = { nounwind }
attributes #6 = { 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 = !{!"long", !7, i64 0}
!11 = !{!12, !6, i64 72}
!12 = !{!"_ZTSN7DynexCN18WalletSerializerV1E", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !13, i64 88}
!13 = !{!"int", !7, i64 0}
!14 = !{!12, !6, i64 64}
!15 = !{!16, !10, i64 0}
!16 = !{!"_ZTSN7DynexCN23WalletLegacyTransactionE", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !17, i64 48, !18, i64 80, !20, i64 113, !13, i64 116, !10, i64 120, !22, i64 128, !24, i64 160}
!17 = !{!"_ZTSN6Crypto4HashE", !7, i64 0}
!18 = !{!"_ZTSN5boost8optionalIN6Crypto9SecretKeyEEE", !19, i64 0}
!19 = !{!"_ZTSN5boost15optional_detail13optional_baseIN6Crypto9SecretKeyEEE", !20, i64 0, !21, i64 1}
!20 = !{!"bool", !7, i64 0}
!21 = !{!"_ZTSN5boost15optional_detail15aligned_storageIN6Crypto9SecretKeyEEE", !7, i64 0}
!22 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !23, i64 0, !10, i64 8, !7, i64 16}
!23 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!24 = !{!"_ZTSN7DynexCN28WalletLegacyTransactionStateE", !7, i64 0}
!25 = !{!16, !10, i64 8}
!26 = distinct !{!26, !27}
!27 = !{!"llvm.loop.mustprogress"}


; 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"

%"class.__gnu_cxx::__normal_iterator.96" = type { ptr }
%"struct.DynexCN::WalletTransaction" = type <{ i8, [7 x i8], i64, i32, %"struct.Crypto::Hash", %"class.boost::optional", [3 x i8], i64, i64, i64, i64, %"class.std::__cxx11::basic_string", i8, [7 x i8] }>
%"struct.Crypto::Hash" = type { [32 x i8] }
%"class.boost::optional" = type { %"class.boost::optional_detail::optional_base" }
%"class.boost::optional_detail::optional_base" = type { i8, %"class.boost::optional_detail::aligned_storage" }
%"class.boost::optional_detail::aligned_storage" = type { %"union.boost::optional_detail::aligned_storage<Crypto::SecretKey>::dummy_u" }
%"union.boost::optional_detail::aligned_storage<Crypto::SecretKey>::dummy_u" = type { [32 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] }
%"struct.DynexCN::WalletTransfer" = type { i8, %"class.std::__cxx11::basic_string", i64 }
%"struct.std::pair.90" = type { i64, %"struct.DynexCN::WalletTransfer" }

@_ZTISt12system_error = external constant ptr

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

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 #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt12system_errorC2ESt10error_code(ptr noundef nonnull align 8 dereferenceable(32), i32, ptr) unnamed_addr #2 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 #3

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7DynexCN18WalletSerializerV118addWalletV1DetailsERKSt6vectorINS_23WalletLegacyTransactionESaIS2_EERKS1_INS_20WalletLegacyTransferESaIS7_EE(ptr nocapture noundef nonnull readonly align 8 dereferenceable(92) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(24) %2) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca i64, align 8
  %5 = alloca %"class.__gnu_cxx::__normal_iterator.96", align 8
  %6 = alloca %"class.__gnu_cxx::__normal_iterator.96", align 8
  %7 = alloca %"struct.DynexCN::WalletTransaction", align 8
  %8 = alloca %"struct.DynexCN::WalletTransfer", align 8
  %9 = alloca %"struct.std::pair.90", align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #5
  store i64 0, ptr %4, align 8, !tbaa !5
  %10 = getelementptr inbounds i8, ptr %0, i64 72
  %11 = load ptr, ptr %10, align 8, !tbaa !9
  %12 = tail call noundef i64 @_ZNKSt6vectorIN7DynexCN20WalletLegacyTransferESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #5
  tail call void @_ZNSt6vectorISt4pairImN7DynexCN14WalletTransferEESaIS3_EE7reserveEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %12)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #5
  %13 = tail call ptr @_ZNKSt6vectorIN7DynexCN23WalletLegacyTransactionESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #5
  store ptr %13, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #5
  %14 = tail call ptr @_ZNKSt6vectorIN7DynexCN23WalletLegacyTransactionESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #5
  store ptr %14, ptr %6, align 8
  %15 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKN7DynexCN23WalletLegacyTransactionESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6) #5
  br i1 %15, label %.lr.ph34, label %._crit_edge

.lr.ph34:                                         ; preds = %3
  %16 = getelementptr inbounds i8, ptr %0, i64 64
  br label %17

._crit_edge:                                      ; preds = %.loopexit, %3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #5
  ret void

17:                                               ; preds = %.lr.ph34, %.loopexit
  %18 = call noundef nonnull align 8 dereferenceable(161) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKN7DynexCN23WalletLegacyTransactionESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #5
  call void @llvm.lifetime.start.p0(i64 160, ptr nonnull %7) #5
  call void @_ZN12_GLOBAL__N_17convertERKN7DynexCN23WalletLegacyTransactionE(ptr dead_on_unwind nonnull writable sret(%"struct.DynexCN::WalletTransaction") align 8 %7, ptr noundef nonnull align 8 dereferenceable(161) %18)
  %19 = load ptr, ptr %16, align 8, !tbaa !13
  %20 = call noundef nonnull align 8 dereferenceable(96) ptr @_ZN5boost11multi_index21multi_index_containerIN7DynexCN17WalletTransactionENS0_10indexed_byINS0_13random_accessINS0_3tagINS2_17RandomAccessIndexEN4mpl_2naES9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_EEEENS0_13hashed_uniqueINS6_INS2_16TransactionIndexES9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_EENS0_6memberIS3_N6Crypto4HashEXadL_ZNS3_4hashEEEEES9_S9_EENS0_18ordered_non_uniqueINS6_INS2_16BlockHeightIndexES9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_EENSF_IS3_jXadL_ZNS3_11blockHeightEEEEES9_EES9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_EESaIS3_EE3getIS7_EERNSR_5indexIT_E4typeEv(ptr noundef nonnull align 8 dereferenceable(120) %19) #5
  %21 = invoke { ptr, i8 } @_ZN5boost11multi_index6detail19random_access_indexINS1_9nth_layerILi1EN7DynexCN17WalletTransactionENS0_10indexed_byINS0_13random_accessINS0_3tagINS4_17RandomAccessIndexEN4mpl_2naESB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_EEEENS0_13hashed_uniqueINS8_INS4_16TransactionIndexESB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_EENS0_6memberIS5_N6Crypto4HashEXadL_ZNS5_4hashEEEEESB_SB_EENS0_18ordered_non_uniqueINS8_INS4_16BlockHeightIndexESB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_EENSH_IS5_jXadL_ZNS5_11blockHeightEEEEESB_EESB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_EESaIS5_EEENS_3mpl6v_itemIS9_NSU_7vector0ISB_EELi0EEEE9push_backEOS5_(ptr noundef nonnull align 8 dereferenceable(96) %20, ptr noundef nonnull align 8 dereferenceable(153) %7)
          to label %22 unwind label %38

22:                                               ; preds = %17
  %23 = load i64, ptr %18, align 8, !tbaa !14
  %.not = icmp eq i64 %23, -1
  br i1 %.not, label %.loopexit, label %24

24:                                               ; preds = %22
  %25 = getelementptr inbounds i8, ptr %18, i64 8
  %26 = load i64, ptr %25, align 8, !tbaa !24
  %.not27 = icmp eq i64 %26, 0
  br i1 %.not27, label %.loopexit, label %27

27:                                               ; preds = %24
  %28 = add i64 %26, %23
  %29 = call noundef i64 @_ZNKSt6vectorIN7DynexCN20WalletLegacyTransferESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #5
  %30 = icmp ugt i64 %28, %29
  br i1 %30, label %32, label %.preheader

.preheader:                                       ; preds = %27
  %31 = icmp ult i64 %23, %28
  br i1 %31, label %.lr.ph, label %.loopexit

32:                                               ; preds = %27
  %33 = call ptr @__cxa_allocate_exception(i64 32) #5
  %34 = call { i32, ptr } @_Z15make_error_codeN7DynexCN5error16WalletErrorCodesE(i32 noundef 5)
  %35 = extractvalue { i32, ptr } %34, 0
  %36 = extractvalue { i32, ptr } %34, 1
  invoke void @_ZNSt12system_errorC2ESt10error_code(ptr noundef nonnull align 8 dereferenceable(32) %33, i32 %35, ptr %36)
          to label %37 unwind label %40

37:                                               ; preds = %32
  invoke void @__cxa_throw(ptr nonnull %33, ptr nonnull @_ZTISt12system_error, ptr nonnull @_ZNSt12system_errorD1Ev) #6
          to label %63 unwind label %42

38:                                               ; preds = %17
  %39 = landingpad { ptr, i32 }
          cleanup
  br label %62

40:                                               ; preds = %32
  %41 = landingpad { ptr, i32 }
          cleanup
  call void @__cxa_free_exception(ptr %33) #5
  br label %62

42:                                               ; preds = %37
  %43 = landingpad { ptr, i32 }
          cleanup
  br label %62

.lr.ph:                                           ; preds = %.preheader, %48
  %.02433 = phi i64 [ %49, %48 ], [ %23, %.preheader ]
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %8) #5
  %44 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNKSt6vectorIN7DynexCN20WalletLegacyTransferESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %.02433) #5
  invoke void @_ZN12_GLOBAL__N_17convertERKN7DynexCN20WalletLegacyTransferE(ptr dead_on_unwind nonnull writable sret(%"struct.DynexCN::WalletTransfer") align 8 %8, ptr noundef nonnull align 8 dereferenceable(40) %44)
          to label %45 unwind label %50

45:                                               ; preds = %.lr.ph
  %46 = load ptr, ptr %10, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %9) #5
  invoke void @_ZSt9make_pairIRmRN7DynexCN14WalletTransferEESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS5_INS6_IT0_E4typeEE6__typeEEOS7_OSC_(ptr dead_on_unwind nonnull writable sret(%"struct.std::pair.90") align 8 %9, ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(48) %8)
          to label %47 unwind label %52

47:                                               ; preds = %45
  invoke void @_ZNSt6vectorISt4pairImN7DynexCN14WalletTransferEESaIS3_EE9push_backEOS3_(ptr noundef nonnull align 8 dereferenceable(24) %46, ptr noundef nonnull align 8 dereferenceable(56) %9)
          to label %48 unwind label %54

48:                                               ; preds = %47
  call void @_ZNSt4pairImN7DynexCN14WalletTransferEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %9) #5
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %9) #5
  call void @_ZN7DynexCN14WalletTransferD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %8) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %8) #5
  %49 = add i64 %.02433, 1
  %exitcond.not = icmp eq i64 %49, %28
  br i1 %exitcond.not, label %.loopexit, label %.lr.ph, !llvm.loop !25

50:                                               ; preds = %.lr.ph
  %51 = landingpad { ptr, i32 }
          cleanup
  br label %57

52:                                               ; preds = %45
  %53 = landingpad { ptr, i32 }
          cleanup
  br label %56

54:                                               ; preds = %47
  %55 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt4pairImN7DynexCN14WalletTransferEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %9) #5
  br label %56

56:                                               ; preds = %54, %52
  %.pn = phi { ptr, i32 } [ %55, %54 ], [ %53, %52 ]
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %9) #5
  call void @_ZN7DynexCN14WalletTransferD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %8) #5
  br label %57

57:                                               ; preds = %56, %50
  %.pn.pn = phi { ptr, i32 } [ %.pn, %56 ], [ %51, %50 ]
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %8) #5
  br label %62

.loopexit:                                        ; preds = %48, %.preheader, %24, %22
  %58 = load i64, ptr %4, align 8, !tbaa !5
  %59 = add i64 %58, 1
  store i64 %59, ptr %4, align 8, !tbaa !5
  call void @_ZN7DynexCN17WalletTransactionD2Ev(ptr noundef nonnull align 8 dereferenceable(153) %7) #5
  call void @llvm.lifetime.end.p0(i64 160, ptr nonnull %7) #5
  %60 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPKN7DynexCN23WalletLegacyTransactionESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #5
  %61 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKN7DynexCN23WalletLegacyTransactionESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6) #5
  br i1 %61, label %17, label %._crit_edge

62:                                               ; preds = %40, %42, %57, %38
  %.pn30.pn = phi { ptr, i32 } [ %39, %38 ], [ %43, %42 ], [ %41, %40 ], [ %.pn.pn, %57 ]
  call void @_ZN7DynexCN17WalletTransactionD2Ev(ptr noundef nonnull align 8 dereferenceable(153) %7) #5
  call void @llvm.lifetime.end.p0(i64 160, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #5
  resume { ptr, i32 } %.pn30.pn

63:                                               ; preds = %37
  unreachable
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(96) ptr @_ZN5boost11multi_index21multi_index_containerIN7DynexCN17WalletTransactionENS0_10indexed_byINS0_13random_accessINS0_3tagINS2_17RandomAccessIndexEN4mpl_2naES9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_EEEENS0_13hashed_uniqueINS6_INS2_16TransactionIndexES9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_EENS0_6memberIS3_N6Crypto4HashEXadL_ZNS3_4hashEEEEES9_S9_EENS0_18ordered_non_uniqueINS6_INS2_16BlockHeightIndexES9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_EENSF_IS3_jXadL_ZNS3_11blockHeightEEEEES9_EES9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_S9_EESaIS3_EE3getIS7_EERNSR_5indexIT_E4typeEv(ptr noundef nonnull align 8 dereferenceable(120)) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i8 } @_ZN5boost11multi_index6detail19random_access_indexINS1_9nth_layerILi1EN7DynexCN17WalletTransactionENS0_10indexed_byINS0_13random_accessINS0_3tagINS4_17RandomAccessIndexEN4mpl_2naESB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_EEEENS0_13hashed_uniqueINS8_INS4_16TransactionIndexESB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_EENS0_6memberIS5_N6Crypto4HashEXadL_ZNS5_4hashEEEEESB_SB_EENS0_18ordered_non_uniqueINS8_INS4_16BlockHeightIndexESB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_EENSH_IS5_jXadL_ZNS5_11blockHeightEEEEESB_EESB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_SB_EESaIS5_EEENS_3mpl6v_itemIS9_NSU_7vector0ISB_EELi0EEEE9push_backEOS5_(ptr noundef nonnull align 8 dereferenceable(96), ptr noundef nonnull align 8 dereferenceable(153)) local_unnamed_addr #2 align 2

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZSt9make_pairIRmRN7DynexCN14WalletTransferEESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS5_INS6_IT0_E4typeEE6__typeEEOS7_OSC_(ptr dead_on_unwind noalias writable sret(%"struct.std::pair.90") align 8, ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #2

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(161) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKN7DynexCN23WalletLegacyTransactionESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN12_GLOBAL__N_17convertERKN7DynexCN23WalletLegacyTransactionE(ptr dead_on_unwind noalias writable sret(%"struct.DynexCN::WalletTransaction") align 8, ptr noundef nonnull align 8 dereferenceable(161)) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN12_GLOBAL__N_17convertERKN7DynexCN20WalletLegacyTransferE(ptr dead_on_unwind noalias writable sret(%"struct.DynexCN::WalletTransfer") align 8, ptr noundef nonnull align 8 dereferenceable(40)) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(40) ptr @_ZNKSt6vectorIN7DynexCN20WalletLegacyTransferESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #4 align 2

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress 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 = { 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 #5 = { nounwind }
attributes #6 = { 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 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !11, i64 72}
!10 = !{!"_ZTSN7DynexCN18WalletSerializerV1E", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24, !11, i64 32, !11, i64 40, !11, i64 48, !11, i64 56, !11, i64 64, !11, i64 72, !11, i64 80, !12, i64 88}
!11 = !{!"any pointer", !7, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!10, !11, i64 64}
!14 = !{!15, !6, i64 0}
!15 = !{!"_ZTSN7DynexCN23WalletLegacyTransactionE", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !16, i64 48, !17, i64 80, !19, i64 113, !12, i64 116, !6, i64 120, !21, i64 128, !23, i64 160}
!16 = !{!"_ZTSN6Crypto4HashE", !7, i64 0}
!17 = !{!"_ZTSN5boost8optionalIN6Crypto9SecretKeyEEE", !18, i64 0}
!18 = !{!"_ZTSN5boost15optional_detail13optional_baseIN6Crypto9SecretKeyEEE", !19, i64 0, !20, i64 1}
!19 = !{!"bool", !7, i64 0}
!20 = !{!"_ZTSN5boost15optional_detail15aligned_storageIN6Crypto9SecretKeyEEE", !7, i64 0}
!21 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !22, i64 0, !6, i64 8, !7, i64 16}
!22 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !11, i64 0}
!23 = !{!"_ZTSN7DynexCN28WalletLegacyTransactionStateE", !7, i64 0}
!24 = !{!15, !6, i64 8}
!25 = distinct !{!25, !26}
!26 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass