; LLVM IR from dynexcoin/Dynex :: src/GreenWallet (CommandImplementations)

; 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.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { 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] }
%"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.SuccessMsg = type { %class.ColouredMsg.base, [7 x i8] }
%class.ColouredMsg.base = type <{ %"class.std::__cxx11::basic_string", i8, [3 x i8], i32, i8 }>
%class.WarningMsg = type { %class.ColouredMsg.base, [7 x i8] }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.83 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.84 = external hidden unnamed_addr constant [14 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: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZlsRSoRK11ColouredMsg(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(41)) #2

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #3

declare void @_Z12formatAmountB5cxx11m(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8, i64 noundef) #4

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef, ptr noundef nonnull align 8 dereferenceable(32)) #3

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z13listTransfersbbRN7DynexCN11WalletGreenERNS_5INodeE(i1 noundef zeroext %0, i1 noundef zeroext %1, ptr noundef nonnull align 8 dereferenceable(1872) %2, ptr noundef nonnull align 8 dereferenceable(8) %3) #2 personality ptr @__gxx_personality_v0 {
  %5 = alloca i8, align 1
  %6 = alloca i8, align 1
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca %"struct.DynexCN::WalletTransaction", align 8
  %14 = alloca %"struct.DynexCN::WalletTransaction", align 8
  %15 = alloca ptr, align 8
  %16 = alloca i32, align 4
  %17 = alloca %"struct.DynexCN::WalletTransaction", align 8
  %18 = alloca %class.SuccessMsg, align 8
  %19 = alloca %"class.std::__cxx11::basic_string", align 8
  %20 = alloca %"class.std::__cxx11::basic_string", align 8
  %21 = alloca %class.WarningMsg, align 8
  %22 = alloca %"class.std::__cxx11::basic_string", align 8
  %23 = alloca %"class.std::__cxx11::basic_string", align 8
  %24 = zext i1 %0 to i8
  store i8 %24, ptr %5, align 1, !tbaa !5
  %25 = zext i1 %1 to i8
  store i8 %25, ptr %6, align 1, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !9
  store ptr %3, ptr %8, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  %26 = load ptr, ptr %7, align 8, !tbaa !9
  %27 = load ptr, ptr %26, align 8, !tbaa !11
  %28 = getelementptr inbounds ptr, ptr %27, i64 34
  %29 = load ptr, ptr %28, align 8
  %30 = call noundef i64 %29(ptr noundef nonnull align 8 dereferenceable(1872) %26)
  store i64 %30, ptr %9, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  store i64 0, ptr %10, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  store i64 0, ptr %11, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  store i64 0, ptr %12, align 8, !tbaa !13
  br label %31

31:                                               ; preds = %86, %4
  %32 = load i64, ptr %12, align 8, !tbaa !13
  %33 = load i64, ptr %9, align 8, !tbaa !13
  %34 = icmp ult i64 %32, %33
  br i1 %34, label %36, label %35

35:                                               ; preds = %31
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  br label %90

36:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 160, ptr %13) #6
  %37 = load ptr, ptr %7, align 8, !tbaa !9
  %38 = load i64, ptr %12, align 8, !tbaa !13
  %39 = load ptr, ptr %37, align 8, !tbaa !11
  %40 = getelementptr inbounds ptr, ptr %39, i64 35
  %41 = load ptr, ptr %40, align 8
  call void %41(ptr dead_on_unwind writable sret(%"struct.DynexCN::WalletTransaction") align 8 %13, ptr noundef nonnull align 8 dereferenceable(1872) %37, i64 noundef %38)
  %42 = getelementptr inbounds %"struct.DynexCN::WalletTransaction", ptr %13, i32 0, i32 7
  %43 = load i64, ptr %42, align 8, !tbaa !15
  %44 = icmp slt i64 %43, 0
  br i1 %44, label %45, label %65

45:                                               ; preds = %36
  %46 = load i8, ptr %6, align 1, !tbaa !5, !range !25, !noundef !26
  %47 = trunc i8 %46 to i1
  br i1 %47, label %48, label %65

48:                                               ; preds = %45
  invoke void @_ZN7DynexCN17WalletTransactionC2ERKS0_(ptr noundef nonnull align 8 dereferenceable(153) %14, ptr noundef nonnull align 8 dereferenceable(153) %13)
          to label %49 unwind label %57

49:                                               ; preds = %48
  %50 = load ptr, ptr %8, align 8, !tbaa !9
  invoke void @_Z21printOutgoingTransferN7DynexCN17WalletTransactionERNS_5INodeE(ptr noundef %14, ptr noundef nonnull align 8 dereferenceable(8) %50)
          to label %51 unwind label %61

51:                                               ; preds = %49
  call void @_ZN7DynexCN17WalletTransactionD2Ev(ptr noundef nonnull align 8 dereferenceable(153) %14) #6
  %52 = getelementptr inbounds %"struct.DynexCN::WalletTransaction", ptr %13, i32 0, i32 7
  %53 = load i64, ptr %52, align 8, !tbaa !15
  %54 = sub nsw i64 0, %53
  %55 = load i64, ptr %10, align 8, !tbaa !13
  %56 = add nsw i64 %55, %54
  store i64 %56, ptr %10, align 8, !tbaa !13
  br label %85

57:                                               ; preds = %72, %48
  %58 = landingpad { ptr, i32 }
          cleanup
  %59 = extractvalue { ptr, i32 } %58, 0
  store ptr %59, ptr %15, align 8
  %60 = extractvalue { ptr, i32 } %58, 1
  store i32 %60, ptr %16, align 4
  br label %89

61:                                               ; preds = %49
  %62 = landingpad { ptr, i32 }
          cleanup
  %63 = extractvalue { ptr, i32 } %62, 0
  store ptr %63, ptr %15, align 8
  %64 = extractvalue { ptr, i32 } %62, 1
  store i32 %64, ptr %16, align 4
  call void @_ZN7DynexCN17WalletTransactionD2Ev(ptr noundef nonnull align 8 dereferenceable(153) %14) #6
  br label %89

65:                                               ; preds = %45, %36
  %66 = getelementptr inbounds %"struct.DynexCN::WalletTransaction", ptr %13, i32 0, i32 7
  %67 = load i64, ptr %66, align 8, !tbaa !15
  %68 = icmp sgt i64 %67, 0
  br i1 %68, label %69, label %84

69:                                               ; preds = %65
  %70 = load i8, ptr %5, align 1, !tbaa !5, !range !25, !noundef !26
  %71 = trunc i8 %70 to i1
  br i1 %71, label %72, label %84

72:                                               ; preds = %69
  invoke void @_ZN7DynexCN17WalletTransactionC2ERKS0_(ptr noundef nonnull align 8 dereferenceable(153) %17, ptr noundef nonnull align 8 dereferenceable(153) %13)
          to label %73 unwind label %57

73:                                               ; preds = %72
  %74 = load ptr, ptr %8, align 8, !tbaa !9
  invoke void @_Z21printIncomingTransferN7DynexCN17WalletTransactionERNS_5INodeE(ptr noundef %17, ptr noundef nonnull align 8 dereferenceable(8) %74)
          to label %75 unwind label %80

75:                                               ; preds = %73
  call void @_ZN7DynexCN17WalletTransactionD2Ev(ptr noundef nonnull align 8 dereferenceable(153) %17) #6
  %76 = getelementptr inbounds %"struct.DynexCN::WalletTransaction", ptr %13, i32 0, i32 7
  %77 = load i64, ptr %76, align 8, !tbaa !15
  %78 = load i64, ptr %11, align 8, !tbaa !13
  %79 = add nsw i64 %78, %77
  store i64 %79, ptr %11, align 8, !tbaa !13
  br label %84

80:                                               ; preds = %73
  %81 = landingpad { ptr, i32 }
          cleanup
  %82 = extractvalue { ptr, i32 } %81, 0
  store ptr %82, ptr %15, align 8
  %83 = extractvalue { ptr, i32 } %81, 1
  store i32 %83, ptr %16, align 4
  call void @_ZN7DynexCN17WalletTransactionD2Ev(ptr noundef nonnull align 8 dereferenceable(153) %17) #6
  br label %89

84:                                               ; preds = %75, %69, %65
  br label %85

85:                                               ; preds = %84, %51
  call void @_ZN7DynexCN17WalletTransactionD2Ev(ptr noundef nonnull align 8 dereferenceable(153) %13) #6
  call void @llvm.lifetime.end.p0(i64 160, ptr %13) #6
  br label %86

86:                                               ; preds = %85
  %87 = load i64, ptr %12, align 8, !tbaa !13
  %88 = add i64 %87, 1
  store i64 %88, ptr %12, align 8, !tbaa !13
  br label %31, !llvm.loop !27

89:                                               ; preds = %80, %61, %57
  call void @_ZN7DynexCN17WalletTransactionD2Ev(ptr noundef nonnull align 8 dereferenceable(153) %13) #6
  call void @llvm.lifetime.end.p0(i64 160, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  br label %141

90:                                               ; preds = %35
  %91 = load i8, ptr %5, align 1, !tbaa !5, !range !25, !noundef !26
  %92 = trunc i8 %91 to i1
  br i1 %92, label %93, label %115

93:                                               ; preds = %90
  call void @llvm.lifetime.start.p0(i64 48, ptr %18) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr %20) #6
  %94 = load i64, ptr %11, align 8, !tbaa !13
  call void @_Z12formatAmountB5cxx11m(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %20, i64 noundef %94)
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %19, ptr noundef @.str.83, ptr noundef nonnull align 8 dereferenceable(32) %20)
          to label %95 unwind label %101

95:                                               ; preds = %93
  invoke void @_ZN10SuccessMsgC2ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(41) %18, ptr noundef %19)
          to label %96 unwind label %105

96:                                               ; preds = %95
  %97 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZlsRSoRK11ColouredMsg(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull align 8 dereferenceable(41) %18)
          to label %98 unwind label %109

98:                                               ; preds = %96
  %99 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %97, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %100 unwind label %109

100:                                              ; preds = %98
  call void @_ZN11ColouredMsgD2Ev(ptr noundef nonnull align 8 dereferenceable(41) %18) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %20) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr %18) #6
  br label %115

101:                                              ; preds = %93
  %102 = landingpad { ptr, i32 }
          cleanup
  %103 = extractvalue { ptr, i32 } %102, 0
  store ptr %103, ptr %15, align 8
  %104 = extractvalue { ptr, i32 } %102, 1
  store i32 %104, ptr %16, align 4
  br label %114

105:                                              ; preds = %95
  %106 = landingpad { ptr, i32 }
          cleanup
  %107 = extractvalue { ptr, i32 } %106, 0
  store ptr %107, ptr %15, align 8
  %108 = extractvalue { ptr, i32 } %106, 1
  store i32 %108, ptr %16, align 4
  br label %113

109:                                              ; preds = %98, %96
  %110 = landingpad { ptr, i32 }
          cleanup
  %111 = extractvalue { ptr, i32 } %110, 0
  store ptr %111, ptr %15, align 8
  %112 = extractvalue { ptr, i32 } %110, 1
  store i32 %112, ptr %16, align 4
  call void @_ZN11ColouredMsgD2Ev(ptr noundef nonnull align 8 dereferenceable(41) %18) #6
  br label %113

113:                                              ; preds = %109, %105
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #6
  br label %114

114:                                              ; preds = %113, %101
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %20) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr %18) #6
  br label %141

115:                                              ; preds = %100, %90
  %116 = load i8, ptr %6, align 1, !tbaa !5, !range !25, !noundef !26
  %117 = trunc i8 %116 to i1
  br i1 %117, label %118, label %140

118:                                              ; preds = %115
  call void @llvm.lifetime.start.p0(i64 48, ptr %21) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr %23) #6
  %119 = load i64, ptr %10, align 8, !tbaa !13
  call void @_Z12formatAmountB5cxx11m(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %23, i64 noundef %119)
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %22, ptr noundef @.str.84, ptr noundef nonnull align 8 dereferenceable(32) %23)
          to label %120 unwind label %126

120:                                              ; preds = %118
  invoke void @_ZN10WarningMsgC2ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(41) %21, ptr noundef %22)
          to label %121 unwind label %130

121:                                              ; preds = %120
  %122 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZlsRSoRK11ColouredMsg(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull align 8 dereferenceable(41) %21)
          to label %123 unwind label %134

123:                                              ; preds = %121
  %124 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %122, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %125 unwind label %134

125:                                              ; preds = %123
  call void @_ZN11ColouredMsgD2Ev(ptr noundef nonnull align 8 dereferenceable(41) %21) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %22) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %23) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %23) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr %21) #6
  br label %140

126:                                              ; preds = %118
  %127 = landingpad { ptr, i32 }
          cleanup
  %128 = extractvalue { ptr, i32 } %127, 0
  store ptr %128, ptr %15, align 8
  %129 = extractvalue { ptr, i32 } %127, 1
  store i32 %129, ptr %16, align 4
  br label %139

130:                                              ; preds = %120
  %131 = landingpad { ptr, i32 }
          cleanup
  %132 = extractvalue { ptr, i32 } %131, 0
  store ptr %132, ptr %15, align 8
  %133 = extractvalue { ptr, i32 } %131, 1
  store i32 %133, ptr %16, align 4
  br label %138

134:                                              ; preds = %123, %121
  %135 = landingpad { ptr, i32 }
          cleanup
  %136 = extractvalue { ptr, i32 } %135, 0
  store ptr %136, ptr %15, align 8
  %137 = extractvalue { ptr, i32 } %135, 1
  store i32 %137, ptr %16, align 4
  call void @_ZN11ColouredMsgD2Ev(ptr noundef nonnull align 8 dereferenceable(41) %21) #6
  br label %138

138:                                              ; preds = %134, %130
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %22) #6
  br label %139

139:                                              ; preds = %138, %126
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %23) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %23) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr %21) #6
  br label %141

140:                                              ; preds = %125, %115
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  ret void

141:                                              ; preds = %139, %114, %89
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  br label %142

142:                                              ; preds = %141
  %143 = load ptr, ptr %15, align 8
  %144 = load i32, ptr %16, align 4
  %145 = insertvalue { ptr, i32 } poison, ptr %143, 0
  %146 = insertvalue { ptr, i32 } %145, i32 %144, 1
  resume { ptr, i32 } %146
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN7DynexCN17WalletTransactionC2ERKS0_(ptr noundef nonnull align 8 dereferenceable(153), ptr noundef nonnull align 8 dereferenceable(153)) unnamed_addr #3 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 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { inlinehint mustprogress 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 = { "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 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"bool", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"vtable pointer", !8, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"long", !7, i64 0}
!15 = !{!16, !14, i64 88}
!16 = !{!"_ZTSN7DynexCN17WalletTransactionE", !17, i64 0, !14, i64 8, !18, i64 16, !19, i64 20, !20, i64 52, !14, i64 88, !14, i64 96, !14, i64 104, !14, i64 112, !23, i64 120, !6, i64 152}
!17 = !{!"_ZTSN7DynexCN22WalletTransactionStateE", !7, i64 0}
!18 = !{!"int", !7, i64 0}
!19 = !{!"_ZTSN6Crypto4HashE", !7, i64 0}
!20 = !{!"_ZTSN5boost8optionalIN6Crypto9SecretKeyEEE", !21, i64 0}
!21 = !{!"_ZTSN5boost15optional_detail13optional_baseIN6Crypto9SecretKeyEEE", !6, i64 0, !22, i64 1}
!22 = !{!"_ZTSN5boost15optional_detail15aligned_storageIN6Crypto9SecretKeyEEE", !7, i64 0}
!23 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !24, i64 0, !14, i64 8, !7, i64 16}
!24 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !10, i64 0}
!25 = !{i8 0, i8 2}
!26 = !{}
!27 = distinct !{!27, !28}
!28 = !{!"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.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { 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] }
%"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.SuccessMsg = type { %class.ColouredMsg.base, [7 x i8] }
%class.ColouredMsg.base = type <{ %"class.std::__cxx11::basic_string", i8, [3 x i8], i32, i8 }>
%class.WarningMsg = type { %class.ColouredMsg.base, [7 x i8] }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.83 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.84 = external hidden unnamed_addr constant [14 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 uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZlsRSoRK11ColouredMsg(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(41)) local_unnamed_addr #2

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #3

declare void @_Z12formatAmountB5cxx11m(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8, i64 noundef) local_unnamed_addr #4

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef, ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #3

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z13listTransfersbbRN7DynexCN11WalletGreenERNS_5INodeE(i1 noundef zeroext %0, i1 noundef zeroext %1, ptr noundef nonnull align 8 dereferenceable(1872) %2, ptr noundef nonnull align 8 dereferenceable(8) %3) local_unnamed_addr #2 personality ptr @__gxx_personality_v0 {
  %5 = alloca %"struct.DynexCN::WalletTransaction", align 8
  %6 = alloca %"struct.DynexCN::WalletTransaction", align 8
  %7 = alloca %"struct.DynexCN::WalletTransaction", align 8
  %8 = alloca %class.SuccessMsg, align 8
  %9 = alloca %"class.std::__cxx11::basic_string", align 8
  %10 = alloca %"class.std::__cxx11::basic_string", align 8
  %11 = alloca %class.WarningMsg, align 8
  %12 = alloca %"class.std::__cxx11::basic_string", align 8
  %13 = alloca %"class.std::__cxx11::basic_string", align 8
  %14 = load ptr, ptr %2, align 8, !tbaa !5
  %15 = getelementptr inbounds i8, ptr %14, i64 272
  %16 = load ptr, ptr %15, align 8
  %17 = tail call noundef i64 %16(ptr noundef nonnull align 8 dereferenceable(1872) %2)
  %.not = icmp eq i64 %17, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %4
  %18 = getelementptr inbounds i8, ptr %5, i64 88
  br i1 %1, label %.lr.ph.split, label %.lr.ph.split.us

.lr.ph.split.us:                                  ; preds = %.lr.ph
  br i1 %0, label %.lr.ph.split.us.split, label %.lr.ph.split.us.split.us

.lr.ph.split.us.split.us:                         ; preds = %.lr.ph.split.us, %.lr.ph.split.us.split.us
  %.02348.us.us = phi i64 [ %22, %.lr.ph.split.us.split.us ], [ 0, %.lr.ph.split.us ]
  call void @llvm.lifetime.start.p0(i64 160, ptr nonnull %5) #6
  %19 = load ptr, ptr %2, align 8, !tbaa !5
  %20 = getelementptr inbounds i8, ptr %19, i64 280
  %21 = load ptr, ptr %20, align 8
  call void %21(ptr dead_on_unwind nonnull writable sret(%"struct.DynexCN::WalletTransaction") align 8 %5, ptr noundef nonnull align 8 dereferenceable(1872) %2, i64 noundef %.02348.us.us)
  call void @_ZN7DynexCN17WalletTransactionD2Ev(ptr noundef nonnull align 8 dereferenceable(153) %5) #6
  call void @llvm.lifetime.end.p0(i64 160, ptr nonnull %5) #6
  %22 = add nuw i64 %.02348.us.us, 1
  %exitcond.not = icmp eq i64 %22, %17
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph.split.us.split.us, !llvm.loop !8

.lr.ph.split.us.split:                            ; preds = %.lr.ph.split.us, %33
  %.02348.us = phi i64 [ %34, %33 ], [ 0, %.lr.ph.split.us ]
  %.02447.us = phi i64 [ %.125.us, %33 ], [ 0, %.lr.ph.split.us ]
  call void @llvm.lifetime.start.p0(i64 160, ptr nonnull %5) #6
  %23 = load ptr, ptr %2, align 8, !tbaa !5
  %24 = getelementptr inbounds i8, ptr %23, i64 280
  %25 = load ptr, ptr %24, align 8
  call void %25(ptr dead_on_unwind nonnull writable sret(%"struct.DynexCN::WalletTransaction") align 8 %5, ptr noundef nonnull align 8 dereferenceable(1872) %2, i64 noundef %.02348.us)
  %26 = load i64, ptr %18, align 8, !tbaa !10
  %27 = icmp sgt i64 %26, 0
  br i1 %27, label %28, label %33

28:                                               ; preds = %.lr.ph.split.us.split
  invoke void @_ZN7DynexCN17WalletTransactionC2ERKS0_(ptr noundef nonnull align 8 dereferenceable(153) %7, ptr noundef nonnull align 8 dereferenceable(153) %5)
          to label %29 unwind label %.split.us

29:                                               ; preds = %28
  invoke void @_Z21printIncomingTransferN7DynexCN17WalletTransactionERNS_5INodeE(ptr noundef nonnull %7, ptr noundef nonnull align 8 dereferenceable(8) %3)
          to label %30 unwind label %.split51.us

30:                                               ; preds = %29
  call void @_ZN7DynexCN17WalletTransactionD2Ev(ptr noundef nonnull align 8 dereferenceable(153) %7) #6
  %31 = load i64, ptr %18, align 8, !tbaa !10
  %32 = add nsw i64 %31, %.02447.us
  br label %33

33:                                               ; preds = %30, %.lr.ph.split.us.split
  %.125.us = phi i64 [ %32, %30 ], [ %.02447.us, %.lr.ph.split.us.split ]
  call void @_ZN7DynexCN17WalletTransactionD2Ev(ptr noundef nonnull align 8 dereferenceable(153) %5) #6
  call void @llvm.lifetime.end.p0(i64 160, ptr nonnull %5) #6
  %34 = add nuw i64 %.02348.us, 1
  %exitcond75.not = icmp eq i64 %34, %17
  br i1 %exitcond75.not, label %._crit_edge, label %.lr.ph.split.us.split, !llvm.loop !8

.split.us:                                        ; preds = %28
  %35 = landingpad { ptr, i32 }
          cleanup
  br label %.split

.split51.us:                                      ; preds = %29
  %36 = landingpad { ptr, i32 }
          cleanup
  br label %71

.lr.ph.split:                                     ; preds = %.lr.ph
  br i1 %0, label %.lr.ph.split.split, label %.lr.ph.split.split.us

.lr.ph.split.split.us:                            ; preds = %.lr.ph.split, %47
  %.02348.us55 = phi i64 [ %48, %47 ], [ 0, %.lr.ph.split ]
  %.02646.us57 = phi i64 [ %.127.us59, %47 ], [ 0, %.lr.ph.split ]
  call void @llvm.lifetime.start.p0(i64 160, ptr nonnull %5) #6
  %37 = load ptr, ptr %2, align 8, !tbaa !5
  %38 = getelementptr inbounds i8, ptr %37, i64 280
  %39 = load ptr, ptr %38, align 8
  call void %39(ptr dead_on_unwind nonnull writable sret(%"struct.DynexCN::WalletTransaction") align 8 %5, ptr noundef nonnull align 8 dereferenceable(1872) %2, i64 noundef %.02348.us55)
  %40 = load i64, ptr %18, align 8, !tbaa !10
  %41 = icmp slt i64 %40, 0
  br i1 %41, label %42, label %47

42:                                               ; preds = %.lr.ph.split.split.us
  invoke void @_ZN7DynexCN17WalletTransactionC2ERKS0_(ptr noundef nonnull align 8 dereferenceable(153) %6, ptr noundef nonnull align 8 dereferenceable(153) %5)
          to label %43 unwind label %.split.split.us

43:                                               ; preds = %42
  invoke void @_Z21printOutgoingTransferN7DynexCN17WalletTransactionERNS_5INodeE(ptr noundef nonnull %6, ptr noundef nonnull align 8 dereferenceable(8) %3)
          to label %44 unwind label %.split63.us

44:                                               ; preds = %43
  call void @_ZN7DynexCN17WalletTransactionD2Ev(ptr noundef nonnull align 8 dereferenceable(153) %6) #6
  %45 = load i64, ptr %18, align 8, !tbaa !10
  %46 = sub i64 %.02646.us57, %45
  br label %47

47:                                               ; preds = %.lr.ph.split.split.us, %44
  %.127.us59 = phi i64 [ %46, %44 ], [ %.02646.us57, %.lr.ph.split.split.us ]
  call void @_ZN7DynexCN17WalletTransactionD2Ev(ptr noundef nonnull align 8 dereferenceable(153) %5) #6
  call void @llvm.lifetime.end.p0(i64 160, ptr nonnull %5) #6
  %48 = add nuw i64 %.02348.us55, 1
  %exitcond76.not = icmp eq i64 %48, %17
  br i1 %exitcond76.not, label %._crit_edge, label %.lr.ph.split.split.us, !llvm.loop !8

.split.split.us:                                  ; preds = %42
  %49 = landingpad { ptr, i32 }
          cleanup
  br label %.split

.split63.us:                                      ; preds = %43
  %50 = landingpad { ptr, i32 }
          cleanup
  br label %63

._crit_edge:                                      ; preds = %.lr.ph.split.us.split.us, %33, %47, %72, %4
  %.026.lcssa = phi i64 [ 0, %4 ], [ %.127, %72 ], [ %.127.us59, %47 ], [ 0, %33 ], [ 0, %.lr.ph.split.us.split.us ]
  %.024.lcssa = phi i64 [ 0, %4 ], [ %.125, %72 ], [ 0, %47 ], [ %.125.us, %33 ], [ 0, %.lr.ph.split.us.split.us ]
  br i1 %0, label %74, label %89

.lr.ph.split.split:                               ; preds = %.lr.ph.split, %72
  %.02348 = phi i64 [ %73, %72 ], [ 0, %.lr.ph.split ]
  %.02447 = phi i64 [ %.125, %72 ], [ 0, %.lr.ph.split ]
  %.02646 = phi i64 [ %.127, %72 ], [ 0, %.lr.ph.split ]
  call void @llvm.lifetime.start.p0(i64 160, ptr nonnull %5) #6
  %51 = load ptr, ptr %2, align 8, !tbaa !5
  %52 = getelementptr inbounds i8, ptr %51, i64 280
  %53 = load ptr, ptr %52, align 8
  call void %53(ptr dead_on_unwind nonnull writable sret(%"struct.DynexCN::WalletTransaction") align 8 %5, ptr noundef nonnull align 8 dereferenceable(1872) %2, i64 noundef %.02348)
  %54 = load i64, ptr %18, align 8, !tbaa !10
  %55 = icmp slt i64 %54, 0
  br i1 %55, label %56, label %64

56:                                               ; preds = %.lr.ph.split.split
  invoke void @_ZN7DynexCN17WalletTransactionC2ERKS0_(ptr noundef nonnull align 8 dereferenceable(153) %6, ptr noundef nonnull align 8 dereferenceable(153) %5)
          to label %57 unwind label %.split.split

57:                                               ; preds = %56
  invoke void @_Z21printOutgoingTransferN7DynexCN17WalletTransactionERNS_5INodeE(ptr noundef nonnull %6, ptr noundef nonnull align 8 dereferenceable(8) %3)
          to label %58 unwind label %.split63

58:                                               ; preds = %57
  call void @_ZN7DynexCN17WalletTransactionD2Ev(ptr noundef nonnull align 8 dereferenceable(153) %6) #6
  %59 = load i64, ptr %18, align 8, !tbaa !10
  %60 = sub i64 %.02646, %59
  br label %72

.split.split:                                     ; preds = %65, %56
  %61 = landingpad { ptr, i32 }
          cleanup
  br label %.split

.split63:                                         ; preds = %57
  %62 = landingpad { ptr, i32 }
          cleanup
  br label %63

63:                                               ; preds = %.split63.us, %.split63
  %.us-phi64 = phi { ptr, i32 } [ %62, %.split63 ], [ %50, %.split63.us ]
  call void @_ZN7DynexCN17WalletTransactionD2Ev(ptr noundef nonnull align 8 dereferenceable(153) %6) #6
  br label %.split

64:                                               ; preds = %.lr.ph.split.split
  %.not71 = icmp eq i64 %54, 0
  br i1 %.not71, label %72, label %65

65:                                               ; preds = %64
  invoke void @_ZN7DynexCN17WalletTransactionC2ERKS0_(ptr noundef nonnull align 8 dereferenceable(153) %7, ptr noundef nonnull align 8 dereferenceable(153) %5)
          to label %66 unwind label %.split.split

66:                                               ; preds = %65
  invoke void @_Z21printIncomingTransferN7DynexCN17WalletTransactionERNS_5INodeE(ptr noundef nonnull %7, ptr noundef nonnull align 8 dereferenceable(8) %3)
          to label %67 unwind label %.split51

67:                                               ; preds = %66
  call void @_ZN7DynexCN17WalletTransactionD2Ev(ptr noundef nonnull align 8 dereferenceable(153) %7) #6
  %68 = load i64, ptr %18, align 8, !tbaa !10
  %69 = add nsw i64 %68, %.02447
  br label %72

.split51:                                         ; preds = %66
  %70 = landingpad { ptr, i32 }
          cleanup
  br label %71

71:                                               ; preds = %.split51.us, %.split51
  %.us-phi52 = phi { ptr, i32 } [ %70, %.split51 ], [ %36, %.split51.us ]
  call void @_ZN7DynexCN17WalletTransactionD2Ev(ptr noundef nonnull align 8 dereferenceable(153) %7) #6
  br label %.split

72:                                               ; preds = %64, %67, %58
  %.127 = phi i64 [ %60, %58 ], [ %.02646, %67 ], [ %.02646, %64 ]
  %.125 = phi i64 [ %.02447, %58 ], [ %69, %67 ], [ %.02447, %64 ]
  call void @_ZN7DynexCN17WalletTransactionD2Ev(ptr noundef nonnull align 8 dereferenceable(153) %5) #6
  call void @llvm.lifetime.end.p0(i64 160, ptr nonnull %5) #6
  %73 = add nuw i64 %.02348, 1
  %exitcond77.not = icmp eq i64 %73, %17
  br i1 %exitcond77.not, label %._crit_edge, label %.lr.ph.split.split, !llvm.loop !8

.split:                                           ; preds = %.split.us, %.split.split.us, %.split.split, %71, %63
  %.pn33 = phi { ptr, i32 } [ %.us-phi64, %63 ], [ %.us-phi52, %71 ], [ %35, %.split.us ], [ %61, %.split.split ], [ %49, %.split.split.us ]
  call void @_ZN7DynexCN17WalletTransactionD2Ev(ptr noundef nonnull align 8 dereferenceable(153) %5) #6
  call void @llvm.lifetime.end.p0(i64 160, ptr nonnull %5) #6
  br label %106

74:                                               ; preds = %._crit_edge
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %8) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %10) #6
  call void @_Z12formatAmountB5cxx11m(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %10, i64 noundef %.024.lcssa)
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %9, ptr noundef nonnull @.str.83, ptr noundef nonnull align 8 dereferenceable(32) %10)
          to label %75 unwind label %81

75:                                               ; preds = %74
  invoke void @_ZN10SuccessMsgC2ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(41) %8, ptr noundef nonnull %9)
          to label %76 unwind label %83

76:                                               ; preds = %75
  %77 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZlsRSoRK11ColouredMsg(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull align 8 dereferenceable(41) %8)
          to label %78 unwind label %85

78:                                               ; preds = %76
  %79 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %77, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %80 unwind label %85

80:                                               ; preds = %78
  call void @_ZN11ColouredMsgD2Ev(ptr noundef nonnull align 8 dereferenceable(41) %8) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %8) #6
  br label %89

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

83:                                               ; preds = %75
  %84 = landingpad { ptr, i32 }
          cleanup
  br label %87

85:                                               ; preds = %78, %76
  %86 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN11ColouredMsgD2Ev(ptr noundef nonnull align 8 dereferenceable(41) %8) #6
  br label %87

87:                                               ; preds = %85, %83
  %.pn = phi { ptr, i32 } [ %86, %85 ], [ %84, %83 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #6
  br label %88

88:                                               ; preds = %87, %81
  %.pn.pn = phi { ptr, i32 } [ %.pn, %87 ], [ %82, %81 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %8) #6
  br label %106

89:                                               ; preds = %80, %._crit_edge
  br i1 %1, label %90, label %105

90:                                               ; preds = %89
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %11) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %13) #6
  call void @_Z12formatAmountB5cxx11m(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %13, i64 noundef %.026.lcssa)
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %12, ptr noundef nonnull @.str.84, ptr noundef nonnull align 8 dereferenceable(32) %13)
          to label %91 unwind label %97

91:                                               ; preds = %90
  invoke void @_ZN10WarningMsgC2ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(41) %11, ptr noundef nonnull %12)
          to label %92 unwind label %99

92:                                               ; preds = %91
  %93 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZlsRSoRK11ColouredMsg(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull align 8 dereferenceable(41) %11)
          to label %94 unwind label %101

94:                                               ; preds = %92
  %95 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %93, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %96 unwind label %101

96:                                               ; preds = %94
  call void @_ZN11ColouredMsgD2Ev(ptr noundef nonnull align 8 dereferenceable(41) %11) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %13) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %11) #6
  br label %105

97:                                               ; preds = %90
  %98 = landingpad { ptr, i32 }
          cleanup
  br label %104

99:                                               ; preds = %91
  %100 = landingpad { ptr, i32 }
          cleanup
  br label %103

101:                                              ; preds = %94, %92
  %102 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN11ColouredMsgD2Ev(ptr noundef nonnull align 8 dereferenceable(41) %11) #6
  br label %103

103:                                              ; preds = %101, %99
  %.pn30 = phi { ptr, i32 } [ %102, %101 ], [ %100, %99 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #6
  br label %104

104:                                              ; preds = %103, %97
  %.pn30.pn = phi { ptr, i32 } [ %.pn30, %103 ], [ %98, %97 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %13) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %11) #6
  br label %106

105:                                              ; preds = %96, %89
  ret void

106:                                              ; preds = %104, %88, %.split
  %.pn33.pn = phi { ptr, i32 } [ %.pn33, %.split ], [ %.pn30.pn, %104 ], [ %.pn.pn, %88 ]
  resume { ptr, i32 } %.pn33.pn
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN7DynexCN17WalletTransactionC2ERKS0_(ptr noundef nonnull align 8 dereferenceable(153), ptr noundef nonnull align 8 dereferenceable(153)) unnamed_addr #3 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 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { inlinehint mustprogress 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 = { "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 = { 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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = distinct !{!8, !9}
!9 = !{!"llvm.loop.mustprogress"}
!10 = !{!11, !14, i64 88}
!11 = !{!"_ZTSN7DynexCN17WalletTransactionE", !12, i64 0, !14, i64 8, !15, i64 16, !16, i64 20, !17, i64 52, !14, i64 88, !14, i64 96, !14, i64 104, !14, i64 112, !21, i64 120, !19, i64 152}
!12 = !{!"_ZTSN7DynexCN22WalletTransactionStateE", !13, i64 0}
!13 = !{!"omnipotent char", !7, i64 0}
!14 = !{!"long", !13, i64 0}
!15 = !{!"int", !13, i64 0}
!16 = !{!"_ZTSN6Crypto4HashE", !13, i64 0}
!17 = !{!"_ZTSN5boost8optionalIN6Crypto9SecretKeyEEE", !18, i64 0}
!18 = !{!"_ZTSN5boost15optional_detail13optional_baseIN6Crypto9SecretKeyEEE", !19, i64 0, !20, i64 1}
!19 = !{!"bool", !13, i64 0}
!20 = !{!"_ZTSN5boost15optional_detail15aligned_storageIN6Crypto9SecretKeyEEE", !13, i64 0}
!21 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !22, i64 0, !14, i64 8, !13, i64 16}
!22 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !23, i64 0}
!23 = !{!"any pointer", !13, i64 0}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass