; LLVM IR from dynexcoin/Dynex :: src/PaymentGate (WalletService)

; 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::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.Logging::LoggerMessage" = type <{ %"class.std::basic_ostream.base", %"class.std::basic_streambuf", ptr, %"class.std::__cxx11::basic_string", i32, [4 x i8], %"class.std::__cxx11::basic_string", %"class.boost::posix_time::ptime", i8, [7 x i8], %"class.std::basic_ios" }>
%"class.std::basic_ostream.base" = type { ptr }
%"class.std::basic_streambuf" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, %"class.std::locale" }
%"class.std::locale" = type { ptr }
%"class.boost::posix_time::ptime" = type { %"class.boost::date_time::base_time" }
%"class.boost::date_time::base_time" = type { %"struct.boost::date_time::counted_time_rep" }
%"struct.boost::date_time::counted_time_rep" = type { %"class.boost::date_time::int_adapter" }
%"class.boost::date_time::int_adapter" = type { i64 }
%"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::error_code" = type { i32, ptr }
%"class.System::EventLock" = type { ptr }
%"class.std::allocator" = type { i8 }
%"class.PaymentService::WalletService" = type { ptr, ptr, ptr, ptr, ptr, ptr, i8, %"class.Logging::LoggerRef", ptr, %"class.System::Event", %"class.System::ContextGroup", %"class.std::map.237" }
%"class.Logging::LoggerRef" = type { ptr, %"class.std::__cxx11::basic_string" }
%"class.System::Event" = type { ptr, i8, ptr, ptr }
%"class.System::ContextGroup" = type { ptr, %"struct.System::NativeContextGroup" }
%"struct.System::NativeContextGroup" = type { ptr, ptr, ptr, ptr }
%"class.std::map.237" = type { %"class.std::_Rb_tree.238" }
%"class.std::_Rb_tree.238" = type { %"struct.std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, unsigned long>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, unsigned long>>, std::less<std::__cxx11::basic_string<char>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, unsigned long>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, unsigned long>>, std::less<std::__cxx11::basic_string<char>>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }

@.str.47 = external hidden unnamed_addr constant [1 x i8], align 1
@_ZTISt12system_error = external constant ptr
@_ZTISt9exception = external constant ptr
@_ZN7Logging13BRIGHT_YELLOWB5cxx11E = external global %"class.std::__cxx11::basic_string", align 8
@.str.101 = external hidden unnamed_addr constant [45 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 nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #1

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: noinline noreturn nounwind uwtable
declare hidden void @__clang_call_terminate(ptr noundef) #2

declare ptr @__cxa_begin_catch(ptr)

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

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

declare void @__cxa_end_catch()

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

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

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

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

declare void @_ZNK7Logging9LoggerRefclENS_5LevelERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr dead_on_unwind writable sret(%"class.Logging::LoggerMessage") align 8, ptr noundef nonnull align 8 dereferenceable(40), i32 noundef, ptr noundef nonnull align 8 dereferenceable(32)) #5

; Function Attrs: nounwind
declare void @_ZN7Logging13LoggerMessageD1Ev(ptr noundef nonnull align 8 dereferenceable(161)) unnamed_addr #6

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

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

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

; Function Attrs: nounwind
declare void @_ZN6System9EventLockD1Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #6

; Function Attrs: nounwind memory(none)
declare i32 @llvm.eh.typeid.for.p0(ptr) #8

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(161) ptr @_ZStlsIN7Logging13LoggerMessageEPKcEOT_S5_RKT0_(ptr noundef nonnull align 8 dereferenceable(161), ptr noundef nonnull align 8 dereferenceable(8)) #9

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(161) ptr @_ZStlsIN7Logging13LoggerMessageEA45_cEOT_S4_RKT0_(ptr noundef nonnull align 8 dereferenceable(161), ptr noundef nonnull align 1 dereferenceable(45)) #9

; Function Attrs: mustprogress uwtable
define dso_local { i32, ptr } @_ZN14PaymentService13WalletService15getReserveProofERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKS6_S9_RKm(ptr noundef nonnull align 8 dereferenceable(224) %0, ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull align 8 dereferenceable(32) %2, ptr noundef nonnull align 8 dereferenceable(32) %3, ptr noundef nonnull align 8 dereferenceable(8) %4) #4 align 2 personality ptr @__gxx_personality_v0 {
  %6 = alloca %"class.std::error_code", align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca %"class.System::EventLock", align 8
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca i64, align 8
  %16 = alloca i32, align 4
  %17 = alloca %"class.std::__cxx11::basic_string", align 8
  %18 = alloca %"class.std::__cxx11::basic_string", align 8
  %19 = alloca %"class.std::allocator", align 1
  %20 = alloca i1, align 1
  %21 = alloca i1, align 1
  %22 = alloca ptr, align 8
  %23 = alloca %"class.Logging::LoggerMessage", align 8
  %24 = alloca ptr, align 8
  %25 = alloca ptr, align 8
  %26 = alloca %"class.Logging::LoggerMessage", align 8
  %27 = alloca ptr, align 8
  store ptr %0, ptr %7, align 8, !tbaa !5
  store ptr %1, ptr %8, align 8, !tbaa !5
  store ptr %2, ptr %9, align 8, !tbaa !5
  store ptr %3, ptr %10, align 8, !tbaa !5
  store ptr %4, ptr %11, align 8, !tbaa !5
  %28 = load ptr, ptr %7, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #10
  %29 = getelementptr inbounds %"class.PaymentService::WalletService", ptr %28, i32 0, i32 9
  invoke void @_ZN6System9EventLockC1ERNS_5EventE(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(32) %29)
          to label %30 unwind label %54

30:                                               ; preds = %5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #10
  %31 = getelementptr inbounds %"class.PaymentService::WalletService", ptr %28, i32 0, i32 2
  %32 = load ptr, ptr %31, align 8, !tbaa !9
  %33 = load ptr, ptr %9, align 8, !tbaa !5
  %34 = load ptr, ptr %32, align 8, !tbaa !27
  %35 = getelementptr inbounds ptr, ptr %34, i64 31
  %36 = load ptr, ptr %35, align 8
  %37 = invoke noundef i64 %36(ptr noundef nonnull align 8 dereferenceable(8) %32, ptr noundef nonnull align 8 dereferenceable(32) %33)
          to label %38 unwind label %58

38:                                               ; preds = %30
  store i64 %37, ptr %15, align 8, !tbaa !29
  %39 = load ptr, ptr %11, align 8, !tbaa !5
  %40 = load i64, ptr %39, align 8, !tbaa !29
  %41 = icmp ne i64 %40, 0
  br i1 %41, label %42, label %62

42:                                               ; preds = %38
  %43 = load i64, ptr %15, align 8, !tbaa !29
  %44 = load ptr, ptr %11, align 8, !tbaa !5
  %45 = load i64, ptr %44, align 8, !tbaa !29
  %46 = icmp ult i64 %43, %45
  br i1 %46, label %47, label %62

47:                                               ; preds = %42
  %48 = invoke { i32, ptr } @_Z15make_error_codeN7DynexCN5error16WalletErrorCodesE(i32 noundef 9)
          to label %49 unwind label %58

49:                                               ; preds = %47
  %50 = getelementptr inbounds { i32, ptr }, ptr %6, i32 0, i32 0
  %51 = extractvalue { i32, ptr } %48, 0
  store i32 %51, ptr %50, align 8
  %52 = getelementptr inbounds { i32, ptr }, ptr %6, i32 0, i32 1
  %53 = extractvalue { i32, ptr } %48, 1
  store ptr %53, ptr %52, align 8
  store i32 1, ptr %16, align 4
  br label %94

54:                                               ; preds = %5
  %55 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt12system_error
          catch ptr @_ZTISt9exception
  %56 = extractvalue { ptr, i32 } %55, 0
  store ptr %56, ptr %13, align 8
  %57 = extractvalue { ptr, i32 } %55, 1
  store i32 %57, ptr %14, align 4
  br label %118

58:                                               ; preds = %47, %30
  %59 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt12system_error
          catch ptr @_ZTISt9exception
  %60 = extractvalue { ptr, i32 } %59, 0
  store ptr %60, ptr %13, align 8
  %61 = extractvalue { ptr, i32 } %59, 1
  store i32 %61, ptr %14, align 4
  br label %117

62:                                               ; preds = %42, %38
  call void @llvm.lifetime.start.p0(i64 32, ptr %17) #10
  %63 = getelementptr inbounds %"class.PaymentService::WalletService", ptr %28, i32 0, i32 2
  %64 = load ptr, ptr %63, align 8, !tbaa !9
  %65 = load ptr, ptr %11, align 8, !tbaa !5
  %66 = load i64, ptr %65, align 8, !tbaa !29
  %67 = icmp ne i64 %66, 0
  br i1 %67, label %68, label %70

68:                                               ; preds = %62
  %69 = load ptr, ptr %11, align 8, !tbaa !5
  br label %71

70:                                               ; preds = %62
  br label %71

71:                                               ; preds = %70, %68
  %72 = phi ptr [ %69, %68 ], [ %15, %70 ]
  %73 = load ptr, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %18) #10
  %74 = load ptr, ptr %10, align 8, !tbaa !5
  %75 = call noundef zeroext i1 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32) %74) #10
  store i1 false, ptr %20, align 1
  store i1 false, ptr %21, align 1
  br i1 %75, label %79, label %76

76:                                               ; preds = %71
  %77 = load ptr, ptr %10, align 8, !tbaa !5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %18, ptr noundef nonnull align 8 dereferenceable(32) %77)
          to label %78 unwind label %97

78:                                               ; preds = %76
  br label %81

79:                                               ; preds = %71
  call void @llvm.lifetime.start.p0(i64 1, ptr %19) #10
  store i1 true, ptr %20, align 1
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %19) #10
  store i1 true, ptr %21, align 1
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %18, ptr noundef @.str.47, ptr noundef nonnull align 1 dereferenceable(1) %19)
          to label %80 unwind label %101

80:                                               ; preds = %79
  br label %81

81:                                               ; preds = %80, %78
  %82 = load ptr, ptr %64, align 8, !tbaa !27
  %83 = getelementptr inbounds ptr, ptr %82, i64 49
  %84 = load ptr, ptr %83, align 8
  invoke void %84(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %17, ptr noundef nonnull align 8 dereferenceable(8) %64, ptr noundef nonnull align 8 dereferenceable(8) %72, ptr noundef nonnull align 8 dereferenceable(32) %73, ptr noundef nonnull align 8 dereferenceable(32) %18)
          to label %85 unwind label %105

85:                                               ; preds = %81
  %86 = load ptr, ptr %8, align 8, !tbaa !5
  %87 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(32) %86, ptr noundef nonnull align 8 dereferenceable(32) %17) #10
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #10
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %18) #10
  %88 = load i1, ptr %21, align 1
  br i1 %88, label %89, label %90

89:                                               ; preds = %85
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %19) #10
  br label %90

90:                                               ; preds = %89, %85
  %91 = load i1, ptr %20, align 1
  br i1 %91, label %92, label %93

92:                                               ; preds = %90
  call void @llvm.lifetime.end.p0(i64 1, ptr %19) #10
  br label %93

93:                                               ; preds = %92, %90
  call void @llvm.lifetime.end.p0(i64 32, ptr %18) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr %17) #10
  store i32 0, ptr %16, align 4
  br label %94

94:                                               ; preds = %93, %49
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #10
  call void @_ZN6System9EventLockD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %12) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #10
  %95 = load i32, ptr %16, align 4
  switch i32 %95, label %208 [
    i32 0, label %96
    i32 1, label %198
  ]

96:                                               ; preds = %94
  br label %197

97:                                               ; preds = %76
  %98 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt12system_error
          catch ptr @_ZTISt9exception
  %99 = extractvalue { ptr, i32 } %98, 0
  store ptr %99, ptr %13, align 8
  %100 = extractvalue { ptr, i32 } %98, 1
  store i32 %100, ptr %14, align 4
  br label %116

101:                                              ; preds = %79
  %102 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt12system_error
          catch ptr @_ZTISt9exception
  %103 = extractvalue { ptr, i32 } %102, 0
  store ptr %103, ptr %13, align 8
  %104 = extractvalue { ptr, i32 } %102, 1
  store i32 %104, ptr %14, align 4
  br label %109

105:                                              ; preds = %81
  %106 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt12system_error
          catch ptr @_ZTISt9exception
  %107 = extractvalue { ptr, i32 } %106, 0
  store ptr %107, ptr %13, align 8
  %108 = extractvalue { ptr, i32 } %106, 1
  store i32 %108, ptr %14, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %18) #10
  br label %109

109:                                              ; preds = %105, %101
  %110 = load i1, ptr %21, align 1
  br i1 %110, label %111, label %112

111:                                              ; preds = %109
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %19) #10
  br label %112

112:                                              ; preds = %111, %109
  %113 = load i1, ptr %20, align 1
  br i1 %113, label %114, label %115

114:                                              ; preds = %112
  call void @llvm.lifetime.end.p0(i64 1, ptr %19) #10
  br label %115

115:                                              ; preds = %114, %112
  br label %116

116:                                              ; preds = %115, %97
  call void @llvm.lifetime.end.p0(i64 32, ptr %18) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr %17) #10
  br label %117

117:                                              ; preds = %116, %58
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #10
  call void @_ZN6System9EventLockD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %12) #10
  br label %118

118:                                              ; preds = %117, %54
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #10
  br label %119

119:                                              ; preds = %118
  %120 = load i32, ptr %14, align 4
  %121 = call i32 @llvm.eh.typeid.for.p0(ptr @_ZTISt12system_error) #10
  %122 = icmp eq i32 %120, %121
  br i1 %122, label %123, label %139

123:                                              ; preds = %119
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #10
  %124 = load ptr, ptr %13, align 8
  %125 = call ptr @__cxa_begin_catch(ptr %124) #10
  store ptr %125, ptr %25, align 8
  call void @llvm.lifetime.start.p0(i64 432, ptr %26) #10
  %126 = getelementptr inbounds %"class.PaymentService::WalletService", ptr %28, i32 0, i32 7
  invoke void @_ZNK7Logging9LoggerRefclENS_5LevelERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr dead_on_unwind writable sret(%"class.Logging::LoggerMessage") align 8 %26, ptr noundef nonnull align 8 dereferenceable(40) %126, i32 noundef 2, ptr noundef nonnull align 8 dereferenceable(32) @_ZN7Logging13BRIGHT_YELLOWB5cxx11E)
          to label %127 unwind label %182

127:                                              ; preds = %123
  %128 = invoke noundef nonnull align 8 dereferenceable(161) ptr @_ZStlsIN7Logging13LoggerMessageEA45_cEOT_S4_RKT0_(ptr noundef nonnull align 8 dereferenceable(161) %26, ptr noundef nonnull align 1 dereferenceable(45) @.str.101)
          to label %129 unwind label %186

129:                                              ; preds = %127
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #10
  %130 = load ptr, ptr %25, align 8, !tbaa !5
  %131 = load ptr, ptr %130, align 8, !tbaa !27
  %132 = getelementptr inbounds ptr, ptr %131, i64 2
  %133 = load ptr, ptr %132, align 8
  %134 = call noundef ptr %133(ptr noundef nonnull align 8 dereferenceable(16) %130) #10
  store ptr %134, ptr %27, align 8, !tbaa !5
  %135 = invoke noundef nonnull align 8 dereferenceable(161) ptr @_ZStlsIN7Logging13LoggerMessageEPKcEOT_S5_RKT0_(ptr noundef nonnull align 8 dereferenceable(161) %128, ptr noundef nonnull align 8 dereferenceable(8) %27)
          to label %136 unwind label %190

136:                                              ; preds = %129
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #10
  call void @_ZN7Logging13LoggerMessageD1Ev(ptr noundef nonnull align 8 dereferenceable(161) %26) #10
  call void @llvm.lifetime.end.p0(i64 432, ptr %26) #10
  %137 = load ptr, ptr %25, align 8, !tbaa !5
  %138 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt12system_error4codeEv(ptr noundef nonnull align 8 dereferenceable(32) %137) #10
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %6, ptr align 8 %138, i64 16, i1 false), !tbaa.struct !30
  store i32 1, ptr %16, align 4
  call void @__cxa_end_catch()
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #10
  br label %198

139:                                              ; preds = %119
  %140 = call i32 @llvm.eh.typeid.for.p0(ptr @_ZTISt9exception) #10
  %141 = icmp eq i32 %120, %140
  br i1 %141, label %142, label %200

142:                                              ; preds = %139
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #10
  %143 = load ptr, ptr %13, align 8
  %144 = call ptr @__cxa_begin_catch(ptr %143) #10
  store ptr %144, ptr %22, align 8
  call void @llvm.lifetime.start.p0(i64 432, ptr %23) #10
  %145 = getelementptr inbounds %"class.PaymentService::WalletService", ptr %28, i32 0, i32 7
  invoke void @_ZNK7Logging9LoggerRefclENS_5LevelERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr dead_on_unwind writable sret(%"class.Logging::LoggerMessage") align 8 %23, ptr noundef nonnull align 8 dereferenceable(40) %145, i32 noundef 2, ptr noundef nonnull align 8 dereferenceable(32) @_ZN7Logging13BRIGHT_YELLOWB5cxx11E)
          to label %146 unwind label %162

146:                                              ; preds = %142
  %147 = invoke noundef nonnull align 8 dereferenceable(161) ptr @_ZStlsIN7Logging13LoggerMessageEA45_cEOT_S4_RKT0_(ptr noundef nonnull align 8 dereferenceable(161) %23, ptr noundef nonnull align 1 dereferenceable(45) @.str.101)
          to label %148 unwind label %166

148:                                              ; preds = %146
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #10
  %149 = load ptr, ptr %22, align 8, !tbaa !5
  %150 = load ptr, ptr %149, align 8, !tbaa !27
  %151 = getelementptr inbounds ptr, ptr %150, i64 2
  %152 = load ptr, ptr %151, align 8
  %153 = call noundef ptr %152(ptr noundef nonnull align 8 dereferenceable(8) %149) #10
  store ptr %153, ptr %24, align 8, !tbaa !5
  %154 = invoke noundef nonnull align 8 dereferenceable(161) ptr @_ZStlsIN7Logging13LoggerMessageEPKcEOT_S5_RKT0_(ptr noundef nonnull align 8 dereferenceable(161) %147, ptr noundef nonnull align 8 dereferenceable(8) %24)
          to label %155 unwind label %170

155:                                              ; preds = %148
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #10
  call void @_ZN7Logging13LoggerMessageD1Ev(ptr noundef nonnull align 8 dereferenceable(161) %23) #10
  call void @llvm.lifetime.end.p0(i64 432, ptr %23) #10
  %156 = invoke { i32, ptr } @_Z15make_error_codeN7DynexCN5error16WalletErrorCodesE(i32 noundef 5)
          to label %157 unwind label %176

157:                                              ; preds = %155
  %158 = getelementptr inbounds { i32, ptr }, ptr %6, i32 0, i32 0
  %159 = extractvalue { i32, ptr } %156, 0
  store i32 %159, ptr %158, align 8
  %160 = getelementptr inbounds { i32, ptr }, ptr %6, i32 0, i32 1
  %161 = extractvalue { i32, ptr } %156, 1
  store ptr %161, ptr %160, align 8
  store i32 1, ptr %16, align 4
  call void @__cxa_end_catch()
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #10
  br label %198

162:                                              ; preds = %142
  %163 = landingpad { ptr, i32 }
          cleanup
  %164 = extractvalue { ptr, i32 } %163, 0
  store ptr %164, ptr %13, align 8
  %165 = extractvalue { ptr, i32 } %163, 1
  store i32 %165, ptr %14, align 4
  br label %175

166:                                              ; preds = %146
  %167 = landingpad { ptr, i32 }
          cleanup
  %168 = extractvalue { ptr, i32 } %167, 0
  store ptr %168, ptr %13, align 8
  %169 = extractvalue { ptr, i32 } %167, 1
  store i32 %169, ptr %14, align 4
  br label %174

170:                                              ; preds = %148
  %171 = landingpad { ptr, i32 }
          cleanup
  %172 = extractvalue { ptr, i32 } %171, 0
  store ptr %172, ptr %13, align 8
  %173 = extractvalue { ptr, i32 } %171, 1
  store i32 %173, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #10
  br label %174

174:                                              ; preds = %170, %166
  call void @_ZN7Logging13LoggerMessageD1Ev(ptr noundef nonnull align 8 dereferenceable(161) %23) #10
  br label %175

175:                                              ; preds = %174, %162
  call void @llvm.lifetime.end.p0(i64 432, ptr %23) #10
  br label %180

176:                                              ; preds = %155
  %177 = landingpad { ptr, i32 }
          cleanup
  %178 = extractvalue { ptr, i32 } %177, 0
  store ptr %178, ptr %13, align 8
  %179 = extractvalue { ptr, i32 } %177, 1
  store i32 %179, ptr %14, align 4
  br label %180

180:                                              ; preds = %176, %175
  invoke void @__cxa_end_catch()
          to label %181 unwind label %205

181:                                              ; preds = %180
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #10
  br label %200

182:                                              ; preds = %123
  %183 = landingpad { ptr, i32 }
          cleanup
  %184 = extractvalue { ptr, i32 } %183, 0
  store ptr %184, ptr %13, align 8
  %185 = extractvalue { ptr, i32 } %183, 1
  store i32 %185, ptr %14, align 4
  br label %195

186:                                              ; preds = %127
  %187 = landingpad { ptr, i32 }
          cleanup
  %188 = extractvalue { ptr, i32 } %187, 0
  store ptr %188, ptr %13, align 8
  %189 = extractvalue { ptr, i32 } %187, 1
  store i32 %189, ptr %14, align 4
  br label %194

190:                                              ; preds = %129
  %191 = landingpad { ptr, i32 }
          cleanup
  %192 = extractvalue { ptr, i32 } %191, 0
  store ptr %192, ptr %13, align 8
  %193 = extractvalue { ptr, i32 } %191, 1
  store i32 %193, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #10
  br label %194

194:                                              ; preds = %190, %186
  call void @_ZN7Logging13LoggerMessageD1Ev(ptr noundef nonnull align 8 dereferenceable(161) %26) #10
  br label %195

195:                                              ; preds = %194, %182
  call void @llvm.lifetime.end.p0(i64 432, ptr %26) #10
  invoke void @__cxa_end_catch()
          to label %196 unwind label %205

196:                                              ; preds = %195
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #10
  br label %200

197:                                              ; preds = %96
  call void @_ZNSt10error_codeC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %6) #10
  br label %198

198:                                              ; preds = %197, %157, %136, %94
  %199 = load { i32, ptr }, ptr %6, align 8
  ret { i32, ptr } %199

200:                                              ; preds = %196, %181, %139
  %201 = load ptr, ptr %13, align 8
  %202 = load i32, ptr %14, align 4
  %203 = insertvalue { ptr, i32 } poison, ptr %201, 0
  %204 = insertvalue { ptr, i32 } %203, i32 %202, 1
  resume { ptr, i32 } %204

205:                                              ; preds = %195, %180
  %206 = landingpad { ptr, i32 }
          catch ptr null
  %207 = extractvalue { ptr, i32 } %206, 0
  call void @__clang_call_terminate(ptr %207) #11
  unreachable

208:                                              ; preds = %94
  unreachable
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { noinline noreturn nounwind uwtable "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 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { "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 "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { inlinehint mustprogress 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 #8 = { nounwind memory(none) }
attributes #9 = { 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 #10 = { nounwind }
attributes #11 = { noreturn nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !6, i64 16}
!10 = !{!"_ZTSN14PaymentService13WalletServiceE", !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !11, i64 48, !12, i64 56, !6, i64 96, !16, i64 104, !17, i64 136, !19, i64 176}
!11 = !{!"bool", !7, i64 0}
!12 = !{!"_ZTSN7Logging9LoggerRefE", !6, i64 0, !13, i64 8}
!13 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !14, i64 0, !15, i64 8, !7, i64 16}
!14 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!15 = !{!"long", !7, i64 0}
!16 = !{!"_ZTSN6System5EventE", !6, i64 0, !11, i64 8, !6, i64 16, !6, i64 24}
!17 = !{!"_ZTSN6System12ContextGroupE", !6, i64 0, !18, i64 8}
!18 = !{!"_ZTSN6System18NativeContextGroupE", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!19 = !{!"_ZTSSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmSt4lessIS5_ESaISt4pairIKS5_mEEE", !20, i64 0}
!20 = !{!"_ZTSSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_mESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EE", !21, i64 0}
!21 = !{!"_ZTSNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_mESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EE13_Rb_tree_implISC_Lb1EEE", !22, i64 0, !24, i64 8}
!22 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEE", !23, i64 0}
!23 = !{!"_ZTSSt4lessINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE"}
!24 = !{!"_ZTSSt15_Rb_tree_header", !25, i64 0, !15, i64 32}
!25 = !{!"_ZTSSt18_Rb_tree_node_base", !26, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!26 = !{!"_ZTSSt14_Rb_tree_color", !7, i64 0}
!27 = !{!28, !28, i64 0}
!28 = !{!"vtable pointer", !8, i64 0}
!29 = !{!15, !15, i64 0}
!30 = !{i64 0, i64 4, !31, i64 8, i64 8, !5}
!31 = !{!32, !32, i64 0}
!32 = !{!"int", !7, i64 0}


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

%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.Logging::LoggerMessage" = type <{ %"class.std::basic_ostream.base", %"class.std::basic_streambuf", ptr, %"class.std::__cxx11::basic_string", i32, [4 x i8], %"class.std::__cxx11::basic_string", %"class.boost::posix_time::ptime", i8, [7 x i8], %"class.std::basic_ios" }>
%"class.std::basic_ostream.base" = type { ptr }
%"class.std::basic_streambuf" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, %"class.std::locale" }
%"class.std::locale" = type { ptr }
%"class.boost::posix_time::ptime" = type { %"class.boost::date_time::base_time" }
%"class.boost::date_time::base_time" = type { %"struct.boost::date_time::counted_time_rep" }
%"struct.boost::date_time::counted_time_rep" = type { %"class.boost::date_time::int_adapter" }
%"class.boost::date_time::int_adapter" = type { i64 }
%"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::error_code" = type { i32, ptr }
%"class.System::EventLock" = type { ptr }
%"class.std::allocator" = type { i8 }

@.str.47 = external hidden unnamed_addr constant [1 x i8], align 1
@_ZTISt12system_error = external constant ptr
@_ZTISt9exception = external constant ptr
@_ZN7Logging13BRIGHT_YELLOWB5cxx11E = external global %"class.std::__cxx11::basic_string", align 8
@.str.101 = external hidden unnamed_addr constant [45 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 nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #1

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: noinline noreturn nounwind uwtable
declare hidden void @__clang_call_terminate(ptr noundef) local_unnamed_addr #2

declare ptr @__cxa_begin_catch(ptr) local_unnamed_addr

; Function Attrs: mustprogress nounwind uwtable
declare noundef zeroext i1 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #3 align 2

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

declare void @__cxa_end_catch() local_unnamed_addr

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

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

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

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

declare void @_ZNK7Logging9LoggerRefclENS_5LevelERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr dead_on_unwind writable sret(%"class.Logging::LoggerMessage") align 8, ptr noundef nonnull align 8 dereferenceable(40), i32 noundef, ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #5

; Function Attrs: nounwind
declare void @_ZN7Logging13LoggerMessageD1Ev(ptr noundef nonnull align 8 dereferenceable(161)) unnamed_addr #6

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

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

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

; Function Attrs: nounwind
declare void @_ZN6System9EventLockD1Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #6

; Function Attrs: nofree nosync nounwind memory(none)
declare i32 @llvm.eh.typeid.for.p0(ptr) #8

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(161) ptr @_ZStlsIN7Logging13LoggerMessageEPKcEOT_S5_RKT0_(ptr noundef nonnull align 8 dereferenceable(161), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #9

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt12system_error4codeEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #3 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(161) ptr @_ZStlsIN7Logging13LoggerMessageEA45_cEOT_S4_RKT0_(ptr noundef nonnull align 8 dereferenceable(161), ptr noundef nonnull align 1 dereferenceable(45)) local_unnamed_addr #9

; Function Attrs: mustprogress uwtable
define dso_local { i32, ptr } @_ZN14PaymentService13WalletService15getReserveProofERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKS6_S9_RKm(ptr noundef nonnull align 8 dereferenceable(224) %0, ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull align 8 dereferenceable(32) %2, ptr noundef nonnull align 8 dereferenceable(32) %3, ptr noundef nonnull align 8 dereferenceable(8) %4) local_unnamed_addr #4 align 2 personality ptr @__gxx_personality_v0 {
  %6 = alloca %"class.std::error_code", align 8
  %7 = alloca %"class.System::EventLock", align 8
  %8 = alloca i64, align 8
  %9 = alloca %"class.std::__cxx11::basic_string", align 8
  %10 = alloca %"class.std::__cxx11::basic_string", align 8
  %11 = alloca %"class.std::allocator", align 1
  %12 = alloca %"class.Logging::LoggerMessage", align 8
  %13 = alloca ptr, align 8
  %14 = alloca %"class.Logging::LoggerMessage", align 8
  %15 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #10
  %16 = getelementptr inbounds i8, ptr %0, i64 104
  invoke void @_ZN6System9EventLockC1ERNS_5EventE(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(32) %16)
          to label %17 unwind label %27

17:                                               ; preds = %5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #10
  %18 = getelementptr inbounds i8, ptr %0, i64 16
  %19 = load ptr, ptr %18, align 8, !tbaa !5
  %20 = load ptr, ptr %19, align 8, !tbaa !26
  %21 = getelementptr inbounds i8, ptr %20, i64 248
  %22 = load ptr, ptr %21, align 8
  %23 = invoke noundef i64 %22(ptr noundef nonnull align 8 dereferenceable(8) %19, ptr noundef nonnull align 8 dereferenceable(32) %2)
          to label %24 unwind label %29

24:                                               ; preds = %17
  store i64 %23, ptr %8, align 8, !tbaa !28
  %25 = load i64, ptr %4, align 8, !tbaa !28
  %26 = icmp ult i64 %23, %25
  br i1 %26, label %44, label %31

27:                                               ; preds = %5
  %28 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt12system_error
          catch ptr @_ZTISt9exception
  br label %56

29:                                               ; preds = %17
  %30 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt12system_error
          catch ptr @_ZTISt9exception
  br label %55

31:                                               ; preds = %24
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %9) #10
  %32 = load ptr, ptr %18, align 8, !tbaa !5
  %.not37 = icmp eq i64 %25, 0
  %33 = select i1 %.not37, ptr %8, ptr %4
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %10) #10
  %34 = call noundef zeroext i1 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32) %3) #10
  br i1 %34, label %36, label %35

35:                                               ; preds = %31
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %10, ptr noundef nonnull align 8 dereferenceable(32) %3)
          to label %37 unwind label %49

36:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %11) #10
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #10
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %10, ptr noundef nonnull @.str.47, ptr noundef nonnull align 1 dereferenceable(1) %11)
          to label %37 unwind label %.thread52

37:                                               ; preds = %36, %35
  %38 = load ptr, ptr %32, align 8, !tbaa !26
  %39 = getelementptr inbounds i8, ptr %38, i64 392
  %40 = load ptr, ptr %39, align 8
  invoke void %40(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %9, ptr noundef nonnull align 8 dereferenceable(8) %32, ptr noundef nonnull align 8 dereferenceable(8) %33, ptr noundef nonnull align 8 dereferenceable(32) %2, ptr noundef nonnull align 8 dereferenceable(32) %10)
          to label %41 unwind label %52

41:                                               ; preds = %37
  %42 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull align 8 dereferenceable(32) %9) #10
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #10
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #10
  br i1 %34, label %43, label %107

43:                                               ; preds = %41
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %11) #10
  br label %107

44:                                               ; preds = %24
  %45 = call { i32, ptr } @_Z15make_error_codeN7DynexCN5error16WalletErrorCodesE(i32 noundef 9)
  %46 = extractvalue { i32, ptr } %45, 0
  store i32 %46, ptr %6, align 8
  %47 = getelementptr inbounds i8, ptr %6, i64 8
  %48 = extractvalue { i32, ptr } %45, 1
  store ptr %48, ptr %47, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #10
  call void @_ZN6System9EventLockD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %7) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #10
  br label %108

49:                                               ; preds = %35
  %50 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt12system_error
          catch ptr @_ZTISt9exception
  br label %.critedge49

.thread52:                                        ; preds = %36
  %51 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt12system_error
          catch ptr @_ZTISt9exception
  br label %54

52:                                               ; preds = %37
  %53 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt12system_error
          catch ptr @_ZTISt9exception
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #10
  br i1 %34, label %54, label %.critedge49

54:                                               ; preds = %.thread52, %52
  %.pn55 = phi { ptr, i32 } [ %51, %.thread52 ], [ %53, %52 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %11) #10
  br label %.critedge49

.critedge49:                                      ; preds = %52, %54, %49
  %.pn.pn = phi { ptr, i32 } [ %.pn55, %54 ], [ %50, %49 ], [ %53, %52 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #10
  br label %55

55:                                               ; preds = %.critedge49, %29
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %.critedge49 ], [ %30, %29 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #10
  call void @_ZN6System9EventLockD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %7) #10
  br label %56

56:                                               ; preds = %55, %27
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn, %55 ], [ %28, %27 ]
  %.3 = extractvalue { ptr, i32 } %.pn.pn.pn.pn, 0
  %.325 = extractvalue { ptr, i32 } %.pn.pn.pn.pn, 1
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #10
  %57 = call i32 @llvm.eh.typeid.for.p0(ptr nonnull @_ZTISt12system_error) #10
  %58 = icmp eq i32 %.325, %57
  br i1 %58, label %59, label %72

59:                                               ; preds = %56
  %60 = call ptr @__cxa_begin_catch(ptr %.3) #10
  call void @llvm.lifetime.start.p0(i64 432, ptr nonnull %14) #10
  %61 = getelementptr inbounds i8, ptr %0, i64 56
  invoke void @_ZNK7Logging9LoggerRefclENS_5LevelERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr dead_on_unwind nonnull writable sret(%"class.Logging::LoggerMessage") align 8 %14, ptr noundef nonnull align 8 dereferenceable(40) %61, i32 noundef 2, ptr noundef nonnull align 8 dereferenceable(32) @_ZN7Logging13BRIGHT_YELLOWB5cxx11E)
          to label %62 unwind label %99

62:                                               ; preds = %59
  %63 = invoke noundef nonnull align 8 dereferenceable(161) ptr @_ZStlsIN7Logging13LoggerMessageEA45_cEOT_S4_RKT0_(ptr noundef nonnull align 8 dereferenceable(161) %14, ptr noundef nonnull align 1 dereferenceable(45) @.str.101)
          to label %64 unwind label %101

64:                                               ; preds = %62
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #10
  %65 = load ptr, ptr %60, align 8, !tbaa !26
  %66 = getelementptr inbounds i8, ptr %65, i64 16
  %67 = load ptr, ptr %66, align 8
  %68 = call noundef ptr %67(ptr noundef nonnull align 8 dereferenceable(16) %60) #10
  store ptr %68, ptr %15, align 8, !tbaa !29
  %69 = invoke noundef nonnull align 8 dereferenceable(161) ptr @_ZStlsIN7Logging13LoggerMessageEPKcEOT_S5_RKT0_(ptr noundef nonnull align 8 dereferenceable(161) %63, ptr noundef nonnull align 8 dereferenceable(8) %15)
          to label %70 unwind label %103

70:                                               ; preds = %64
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #10
  call void @_ZN7Logging13LoggerMessageD1Ev(ptr noundef nonnull align 8 dereferenceable(161) %14) #10
  call void @llvm.lifetime.end.p0(i64 432, ptr nonnull %14) #10
  %71 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt12system_error4codeEv(ptr noundef nonnull align 8 dereferenceable(32) %60) #10
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull align 8 dereferenceable(16) %71, i64 16, i1 false), !tbaa.struct !30
  call void @__cxa_end_catch()
  br label %108

72:                                               ; preds = %56
  %73 = call i32 @llvm.eh.typeid.for.p0(ptr nonnull @_ZTISt9exception) #10
  %74 = icmp eq i32 %.325, %73
  br i1 %74, label %75, label %109

75:                                               ; preds = %72
  %76 = call ptr @__cxa_begin_catch(ptr %.3) #10
  call void @llvm.lifetime.start.p0(i64 432, ptr nonnull %12) #10
  %77 = getelementptr inbounds i8, ptr %0, i64 56
  invoke void @_ZNK7Logging9LoggerRefclENS_5LevelERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr dead_on_unwind nonnull writable sret(%"class.Logging::LoggerMessage") align 8 %12, ptr noundef nonnull align 8 dereferenceable(40) %77, i32 noundef 2, ptr noundef nonnull align 8 dereferenceable(32) @_ZN7Logging13BRIGHT_YELLOWB5cxx11E)
          to label %78 unwind label %91

78:                                               ; preds = %75
  %79 = invoke noundef nonnull align 8 dereferenceable(161) ptr @_ZStlsIN7Logging13LoggerMessageEA45_cEOT_S4_RKT0_(ptr noundef nonnull align 8 dereferenceable(161) %12, ptr noundef nonnull align 1 dereferenceable(45) @.str.101)
          to label %80 unwind label %93

80:                                               ; preds = %78
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #10
  %81 = load ptr, ptr %76, align 8, !tbaa !26
  %82 = getelementptr inbounds i8, ptr %81, i64 16
  %83 = load ptr, ptr %82, align 8
  %84 = call noundef ptr %83(ptr noundef nonnull align 8 dereferenceable(8) %76) #10
  store ptr %84, ptr %13, align 8, !tbaa !29
  %85 = invoke noundef nonnull align 8 dereferenceable(161) ptr @_ZStlsIN7Logging13LoggerMessageEPKcEOT_S5_RKT0_(ptr noundef nonnull align 8 dereferenceable(161) %79, ptr noundef nonnull align 8 dereferenceable(8) %13)
          to label %86 unwind label %95

86:                                               ; preds = %80
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #10
  call void @_ZN7Logging13LoggerMessageD1Ev(ptr noundef nonnull align 8 dereferenceable(161) %12) #10
  call void @llvm.lifetime.end.p0(i64 432, ptr nonnull %12) #10
  %87 = call { i32, ptr } @_Z15make_error_codeN7DynexCN5error16WalletErrorCodesE(i32 noundef 5)
  %88 = extractvalue { i32, ptr } %87, 0
  store i32 %88, ptr %6, align 8
  %89 = getelementptr inbounds i8, ptr %6, i64 8
  %90 = extractvalue { i32, ptr } %87, 1
  store ptr %90, ptr %89, align 8
  call void @__cxa_end_catch()
  br label %108

91:                                               ; preds = %75
  %92 = landingpad { ptr, i32 }
          cleanup
  br label %98

93:                                               ; preds = %78
  %94 = landingpad { ptr, i32 }
          cleanup
  br label %97

95:                                               ; preds = %80
  %96 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #10
  br label %97

97:                                               ; preds = %95, %93
  %.pn42 = phi { ptr, i32 } [ %96, %95 ], [ %94, %93 ]
  call void @_ZN7Logging13LoggerMessageD1Ev(ptr noundef nonnull align 8 dereferenceable(161) %12) #10
  br label %98

98:                                               ; preds = %97, %91
  %.pn42.pn = phi { ptr, i32 } [ %.pn42, %97 ], [ %92, %91 ]
  call void @llvm.lifetime.end.p0(i64 432, ptr nonnull %12) #10
  invoke void @__cxa_end_catch()
          to label %109 unwind label %110

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

101:                                              ; preds = %62
  %102 = landingpad { ptr, i32 }
          cleanup
  br label %105

103:                                              ; preds = %64
  %104 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #10
  br label %105

105:                                              ; preds = %103, %101
  %.pn45 = phi { ptr, i32 } [ %104, %103 ], [ %102, %101 ]
  call void @_ZN7Logging13LoggerMessageD1Ev(ptr noundef nonnull align 8 dereferenceable(161) %14) #10
  br label %106

106:                                              ; preds = %105, %99
  %.pn45.pn = phi { ptr, i32 } [ %.pn45, %105 ], [ %100, %99 ]
  call void @llvm.lifetime.end.p0(i64 432, ptr nonnull %14) #10
  invoke void @__cxa_end_catch()
          to label %109 unwind label %110

107:                                              ; preds = %43, %41
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #10
  call void @_ZN6System9EventLockD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %7) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #10
  call void @_ZNSt10error_codeC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %6) #10
  br label %108

108:                                              ; preds = %44, %107, %86, %70
  %.fca.0.load = load i32, ptr %6, align 8
  %.fca.0.insert = insertvalue { i32, ptr } poison, i32 %.fca.0.load, 0
  %.fca.1.gep = getelementptr inbounds i8, ptr %6, i64 8
  %.fca.1.load = load ptr, ptr %.fca.1.gep, align 8
  %.fca.1.insert = insertvalue { i32, ptr } %.fca.0.insert, ptr %.fca.1.load, 1
  ret { i32, ptr } %.fca.1.insert

109:                                              ; preds = %106, %98, %72
  %.merged = phi { ptr, i32 } [ %.pn.pn.pn.pn, %72 ], [ %.pn42.pn, %98 ], [ %.pn45.pn, %106 ]
  resume { ptr, i32 } %.merged

110:                                              ; preds = %106, %98
  %111 = landingpad { ptr, i32 }
          catch ptr null
  %112 = extractvalue { ptr, i32 } %111, 0
  call void @__clang_call_terminate(ptr %112) #11
  unreachable
}

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { noinline noreturn nounwind uwtable "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 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { "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 "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { inlinehint mustprogress 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 #8 = { nofree nosync nounwind memory(none) }
attributes #9 = { 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 #10 = { nounwind }
attributes #11 = { noreturn 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, !7, i64 16}
!6 = !{!"_ZTSN14PaymentService13WalletServiceE", !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !10, i64 48, !11, i64 56, !7, i64 96, !15, i64 104, !16, i64 136, !18, i64 176}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"bool", !8, i64 0}
!11 = !{!"_ZTSN7Logging9LoggerRefE", !7, i64 0, !12, i64 8}
!12 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !13, i64 0, !14, i64 8, !8, i64 16}
!13 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !7, i64 0}
!14 = !{!"long", !8, i64 0}
!15 = !{!"_ZTSN6System5EventE", !7, i64 0, !10, i64 8, !7, i64 16, !7, i64 24}
!16 = !{!"_ZTSN6System12ContextGroupE", !7, i64 0, !17, i64 8}
!17 = !{!"_ZTSN6System18NativeContextGroupE", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24}
!18 = !{!"_ZTSSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmSt4lessIS5_ESaISt4pairIKS5_mEEE", !19, i64 0}
!19 = !{!"_ZTSSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_mESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EE", !20, i64 0}
!20 = !{!"_ZTSNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_mESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EE13_Rb_tree_implISC_Lb1EEE", !21, i64 0, !23, i64 8}
!21 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEE", !22, i64 0}
!22 = !{!"_ZTSSt4lessINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE"}
!23 = !{!"_ZTSSt15_Rb_tree_header", !24, i64 0, !14, i64 32}
!24 = !{!"_ZTSSt18_Rb_tree_node_base", !25, i64 0, !7, i64 8, !7, i64 16, !7, i64 24}
!25 = !{!"_ZTSSt14_Rb_tree_color", !8, i64 0}
!26 = !{!27, !27, i64 0}
!27 = !{!"vtable pointer", !9, i64 0}
!28 = !{!14, !14, i64 0}
!29 = !{!7, !7, i64 0}
!30 = !{i64 0, i64 4, !31, i64 8, i64 8, !29}
!31 = !{!32, !32, i64 0}
!32 = !{!"int", !8, i64 0}


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