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

; 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.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 }

@_ZN7Logging12BRIGHT_WHITEB5cxx11E = external global %"class.std::__cxx11::basic_string", align 8
@_ZTISt12system_error = external constant ptr
@_ZTISt9exception = external constant ptr
@.str.52 = external hidden unnamed_addr constant [17 x i8], align 1
@_ZN7Logging13BRIGHT_YELLOWB5cxx11E = external global %"class.std::__cxx11::basic_string", align 8
@.str.53 = external hidden unnamed_addr constant [51 x i8], align 1
@.str.54 = external hidden unnamed_addr constant [28 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)

declare void @__cxa_end_catch()

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)) #3

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(161) ptr @_ZStlsIN7Logging13LoggerMessageEA17_cEOT_S4_RKT0_(ptr noundef nonnull align 8 dereferenceable(161), ptr noundef nonnull align 1 dereferenceable(17)) #5

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(161) ptr @_ZStlsIN7Logging13LoggerMessageEA28_cEOT_S4_RKT0_(ptr noundef nonnull align 8 dereferenceable(161), ptr noundef nonnull align 1 dereferenceable(28)) #5

; Function Attrs: mustprogress uwtable
define dso_local { i32, ptr } @_ZN14PaymentService13WalletService17saveWalletNoThrowEv(ptr noundef nonnull align 8 dereferenceable(224) %0) #6 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.std::error_code", align 8
  %3 = alloca ptr, align 8
  %4 = alloca %"class.System::EventLock", align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca %"class.Logging::LoggerMessage", align 8
  %8 = alloca %"class.Logging::LoggerMessage", align 8
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca %"class.Logging::LoggerMessage", align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca %"class.Logging::LoggerMessage", align 8
  %15 = alloca ptr, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  %16 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #10
  %17 = getelementptr inbounds %"class.PaymentService::WalletService", ptr %16, i32 0, i32 9
  invoke void @_ZN6System9EventLockC1ERNS_5EventE(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(32) %17)
          to label %18 unwind label %37

18:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 432, ptr %7) #10
  %19 = getelementptr inbounds %"class.PaymentService::WalletService", ptr %16, i32 0, i32 7
  invoke void @_ZNK7Logging9LoggerRefclENS_5LevelERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr dead_on_unwind writable sret(%"class.Logging::LoggerMessage") align 8 %7, ptr noundef nonnull align 8 dereferenceable(40) %19, i32 noundef 3, ptr noundef nonnull align 8 dereferenceable(32) @_ZN7Logging12BRIGHT_WHITEB5cxx11E)
          to label %20 unwind label %41

20:                                               ; preds = %18
  %21 = invoke noundef nonnull align 8 dereferenceable(161) ptr @_ZStlsIN7Logging13LoggerMessageEA17_cEOT_S4_RKT0_(ptr noundef nonnull align 8 dereferenceable(161) %7, ptr noundef nonnull align 1 dereferenceable(17) @.str.52)
          to label %22 unwind label %45

22:                                               ; preds = %20
  call void @_ZN7Logging13LoggerMessageD1Ev(ptr noundef nonnull align 8 dereferenceable(161) %7) #10
  call void @llvm.lifetime.end.p0(i64 432, ptr %7) #10
  %23 = getelementptr inbounds %"class.PaymentService::WalletService", ptr %16, i32 0, i32 6
  %24 = load i8, ptr %23, align 8, !tbaa !9, !range !27, !noundef !28
  %25 = trunc i8 %24 to i1
  br i1 %25, label %63, label %26

26:                                               ; preds = %22
  call void @llvm.lifetime.start.p0(i64 432, ptr %8) #10
  %27 = getelementptr inbounds %"class.PaymentService::WalletService", ptr %16, i32 0, i32 7
  invoke void @_ZNK7Logging9LoggerRefclENS_5LevelERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr dead_on_unwind writable sret(%"class.Logging::LoggerMessage") align 8 %8, ptr noundef nonnull align 8 dereferenceable(40) %27, i32 noundef 2, ptr noundef nonnull align 8 dereferenceable(32) @_ZN7Logging13BRIGHT_YELLOWB5cxx11E)
          to label %28 unwind label %50

28:                                               ; preds = %26
  %29 = invoke noundef nonnull align 8 dereferenceable(161) ptr @_ZStlsIN7Logging13LoggerMessageEA51_cEOT_S4_RKT0_(ptr noundef nonnull align 8 dereferenceable(161) %8, ptr noundef nonnull align 1 dereferenceable(51) @.str.53)
          to label %30 unwind label %54

30:                                               ; preds = %28
  call void @_ZN7Logging13LoggerMessageD1Ev(ptr noundef nonnull align 8 dereferenceable(161) %8) #10
  call void @llvm.lifetime.end.p0(i64 432, ptr %8) #10
  %31 = invoke { i32, ptr } @_Z15make_error_codeN7DynexCN5error16WalletErrorCodesE(i32 noundef 1)
          to label %32 unwind label %59

32:                                               ; preds = %30
  %33 = getelementptr inbounds { i32, ptr }, ptr %2, i32 0, i32 0
  %34 = extractvalue { i32, ptr } %31, 0
  store i32 %34, ptr %33, align 8
  %35 = getelementptr inbounds { i32, ptr }, ptr %2, i32 0, i32 1
  %36 = extractvalue { i32, ptr } %31, 1
  store ptr %36, ptr %35, align 8
  store i32 1, ptr %9, align 4
  br label %65

37:                                               ; preds = %1
  %38 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt12system_error
          catch ptr @_ZTISt9exception
  %39 = extractvalue { ptr, i32 } %38, 0
  store ptr %39, ptr %5, align 8
  %40 = extractvalue { ptr, i32 } %38, 1
  store i32 %40, ptr %6, align 4
  br label %69

41:                                               ; preds = %18
  %42 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt12system_error
          catch ptr @_ZTISt9exception
  %43 = extractvalue { ptr, i32 } %42, 0
  store ptr %43, ptr %5, align 8
  %44 = extractvalue { ptr, i32 } %42, 1
  store i32 %44, ptr %6, align 4
  br label %49

45:                                               ; preds = %20
  %46 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt12system_error
          catch ptr @_ZTISt9exception
  %47 = extractvalue { ptr, i32 } %46, 0
  store ptr %47, ptr %5, align 8
  %48 = extractvalue { ptr, i32 } %46, 1
  store i32 %48, ptr %6, align 4
  call void @_ZN7Logging13LoggerMessageD1Ev(ptr noundef nonnull align 8 dereferenceable(161) %7) #10
  br label %49

49:                                               ; preds = %45, %41
  call void @llvm.lifetime.end.p0(i64 432, ptr %7) #10
  br label %68

50:                                               ; preds = %26
  %51 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt12system_error
          catch ptr @_ZTISt9exception
  %52 = extractvalue { ptr, i32 } %51, 0
  store ptr %52, ptr %5, align 8
  %53 = extractvalue { ptr, i32 } %51, 1
  store i32 %53, ptr %6, align 4
  br label %58

54:                                               ; preds = %28
  %55 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt12system_error
          catch ptr @_ZTISt9exception
  %56 = extractvalue { ptr, i32 } %55, 0
  store ptr %56, ptr %5, align 8
  %57 = extractvalue { ptr, i32 } %55, 1
  store i32 %57, ptr %6, align 4
  call void @_ZN7Logging13LoggerMessageD1Ev(ptr noundef nonnull align 8 dereferenceable(161) %8) #10
  br label %58

58:                                               ; preds = %54, %50
  call void @llvm.lifetime.end.p0(i64 432, ptr %8) #10
  br label %68

59:                                               ; preds = %63, %30
  %60 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt12system_error
          catch ptr @_ZTISt9exception
  %61 = extractvalue { ptr, i32 } %60, 0
  store ptr %61, ptr %5, align 8
  %62 = extractvalue { ptr, i32 } %60, 1
  store i32 %62, ptr %6, align 4
  br label %68

63:                                               ; preds = %22
  invoke void @_ZN14PaymentService13WalletService10saveWalletEv(ptr noundef nonnull align 8 dereferenceable(224) %16)
          to label %64 unwind label %59

64:                                               ; preds = %63
  store i32 0, ptr %9, align 4
  br label %65

65:                                               ; preds = %64, %32
  call void @_ZN6System9EventLockD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #10
  %66 = load i32, ptr %9, align 4
  switch i32 %66, label %159 [
    i32 0, label %67
    i32 1, label %149
  ]

67:                                               ; preds = %65
  br label %148

68:                                               ; preds = %59, %58, %49
  call void @_ZN6System9EventLockD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #10
  br label %69

69:                                               ; preds = %68, %37
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #10
  br label %70

70:                                               ; preds = %69
  %71 = load i32, ptr %6, align 4
  %72 = call i32 @llvm.eh.typeid.for.p0(ptr @_ZTISt12system_error) #10
  %73 = icmp eq i32 %71, %72
  br i1 %73, label %74, label %90

74:                                               ; preds = %70
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #10
  %75 = load ptr, ptr %5, align 8
  %76 = call ptr @__cxa_begin_catch(ptr %75) #10
  store ptr %76, ptr %13, align 8
  call void @llvm.lifetime.start.p0(i64 432, ptr %14) #10
  %77 = getelementptr inbounds %"class.PaymentService::WalletService", ptr %16, i32 0, i32 7
  invoke void @_ZNK7Logging9LoggerRefclENS_5LevelERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr dead_on_unwind writable sret(%"class.Logging::LoggerMessage") align 8 %14, 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 %133

78:                                               ; preds = %74
  %79 = invoke noundef nonnull align 8 dereferenceable(161) ptr @_ZStlsIN7Logging13LoggerMessageEA28_cEOT_S4_RKT0_(ptr noundef nonnull align 8 dereferenceable(161) %14, ptr noundef nonnull align 1 dereferenceable(28) @.str.54)
          to label %80 unwind label %137

80:                                               ; preds = %78
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #10
  %81 = load ptr, ptr %13, align 8, !tbaa !5
  %82 = load ptr, ptr %81, align 8, !tbaa !29
  %83 = getelementptr inbounds ptr, ptr %82, i64 2
  %84 = load ptr, ptr %83, align 8
  %85 = call noundef ptr %84(ptr noundef nonnull align 8 dereferenceable(16) %81) #10
  store ptr %85, ptr %15, align 8, !tbaa !5
  %86 = 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) %15)
          to label %87 unwind label %141

87:                                               ; preds = %80
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #10
  call void @_ZN7Logging13LoggerMessageD1Ev(ptr noundef nonnull align 8 dereferenceable(161) %14) #10
  call void @llvm.lifetime.end.p0(i64 432, ptr %14) #10
  %88 = load ptr, ptr %13, align 8, !tbaa !5
  %89 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt12system_error4codeEv(ptr noundef nonnull align 8 dereferenceable(32) %88) #10
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %2, ptr align 8 %89, i64 16, i1 false), !tbaa.struct !31
  store i32 1, ptr %9, align 4
  call void @__cxa_end_catch()
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #10
  br label %149

90:                                               ; preds = %70
  %91 = call i32 @llvm.eh.typeid.for.p0(ptr @_ZTISt9exception) #10
  %92 = icmp eq i32 %71, %91
  br i1 %92, label %93, label %151

93:                                               ; preds = %90
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #10
  %94 = load ptr, ptr %5, align 8
  %95 = call ptr @__cxa_begin_catch(ptr %94) #10
  store ptr %95, ptr %10, align 8
  call void @llvm.lifetime.start.p0(i64 432, ptr %11) #10
  %96 = getelementptr inbounds %"class.PaymentService::WalletService", ptr %16, i32 0, i32 7
  invoke void @_ZNK7Logging9LoggerRefclENS_5LevelERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr dead_on_unwind writable sret(%"class.Logging::LoggerMessage") align 8 %11, ptr noundef nonnull align 8 dereferenceable(40) %96, i32 noundef 2, ptr noundef nonnull align 8 dereferenceable(32) @_ZN7Logging13BRIGHT_YELLOWB5cxx11E)
          to label %97 unwind label %113

97:                                               ; preds = %93
  %98 = invoke noundef nonnull align 8 dereferenceable(161) ptr @_ZStlsIN7Logging13LoggerMessageEA28_cEOT_S4_RKT0_(ptr noundef nonnull align 8 dereferenceable(161) %11, ptr noundef nonnull align 1 dereferenceable(28) @.str.54)
          to label %99 unwind label %117

99:                                               ; preds = %97
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #10
  %100 = load ptr, ptr %10, align 8, !tbaa !5
  %101 = load ptr, ptr %100, align 8, !tbaa !29
  %102 = getelementptr inbounds ptr, ptr %101, i64 2
  %103 = load ptr, ptr %102, align 8
  %104 = call noundef ptr %103(ptr noundef nonnull align 8 dereferenceable(8) %100) #10
  store ptr %104, ptr %12, align 8, !tbaa !5
  %105 = invoke noundef nonnull align 8 dereferenceable(161) ptr @_ZStlsIN7Logging13LoggerMessageEPKcEOT_S5_RKT0_(ptr noundef nonnull align 8 dereferenceable(161) %98, ptr noundef nonnull align 8 dereferenceable(8) %12)
          to label %106 unwind label %121

106:                                              ; preds = %99
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #10
  call void @_ZN7Logging13LoggerMessageD1Ev(ptr noundef nonnull align 8 dereferenceable(161) %11) #10
  call void @llvm.lifetime.end.p0(i64 432, ptr %11) #10
  %107 = invoke { i32, ptr } @_Z15make_error_codeN7DynexCN5error16WalletErrorCodesE(i32 noundef 5)
          to label %108 unwind label %127

108:                                              ; preds = %106
  %109 = getelementptr inbounds { i32, ptr }, ptr %2, i32 0, i32 0
  %110 = extractvalue { i32, ptr } %107, 0
  store i32 %110, ptr %109, align 8
  %111 = getelementptr inbounds { i32, ptr }, ptr %2, i32 0, i32 1
  %112 = extractvalue { i32, ptr } %107, 1
  store ptr %112, ptr %111, align 8
  store i32 1, ptr %9, align 4
  call void @__cxa_end_catch()
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #10
  br label %149

113:                                              ; preds = %93
  %114 = landingpad { ptr, i32 }
          cleanup
  %115 = extractvalue { ptr, i32 } %114, 0
  store ptr %115, ptr %5, align 8
  %116 = extractvalue { ptr, i32 } %114, 1
  store i32 %116, ptr %6, align 4
  br label %126

117:                                              ; preds = %97
  %118 = landingpad { ptr, i32 }
          cleanup
  %119 = extractvalue { ptr, i32 } %118, 0
  store ptr %119, ptr %5, align 8
  %120 = extractvalue { ptr, i32 } %118, 1
  store i32 %120, ptr %6, align 4
  br label %125

121:                                              ; preds = %99
  %122 = landingpad { ptr, i32 }
          cleanup
  %123 = extractvalue { ptr, i32 } %122, 0
  store ptr %123, ptr %5, align 8
  %124 = extractvalue { ptr, i32 } %122, 1
  store i32 %124, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #10
  br label %125

125:                                              ; preds = %121, %117
  call void @_ZN7Logging13LoggerMessageD1Ev(ptr noundef nonnull align 8 dereferenceable(161) %11) #10
  br label %126

126:                                              ; preds = %125, %113
  call void @llvm.lifetime.end.p0(i64 432, ptr %11) #10
  br label %131

127:                                              ; preds = %106
  %128 = landingpad { ptr, i32 }
          cleanup
  %129 = extractvalue { ptr, i32 } %128, 0
  store ptr %129, ptr %5, align 8
  %130 = extractvalue { ptr, i32 } %128, 1
  store i32 %130, ptr %6, align 4
  br label %131

131:                                              ; preds = %127, %126
  invoke void @__cxa_end_catch()
          to label %132 unwind label %156

132:                                              ; preds = %131
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #10
  br label %151

133:                                              ; preds = %74
  %134 = landingpad { ptr, i32 }
          cleanup
  %135 = extractvalue { ptr, i32 } %134, 0
  store ptr %135, ptr %5, align 8
  %136 = extractvalue { ptr, i32 } %134, 1
  store i32 %136, ptr %6, align 4
  br label %146

137:                                              ; preds = %78
  %138 = landingpad { ptr, i32 }
          cleanup
  %139 = extractvalue { ptr, i32 } %138, 0
  store ptr %139, ptr %5, align 8
  %140 = extractvalue { ptr, i32 } %138, 1
  store i32 %140, ptr %6, align 4
  br label %145

141:                                              ; preds = %80
  %142 = landingpad { ptr, i32 }
          cleanup
  %143 = extractvalue { ptr, i32 } %142, 0
  store ptr %143, ptr %5, align 8
  %144 = extractvalue { ptr, i32 } %142, 1
  store i32 %144, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #10
  br label %145

145:                                              ; preds = %141, %137
  call void @_ZN7Logging13LoggerMessageD1Ev(ptr noundef nonnull align 8 dereferenceable(161) %14) #10
  br label %146

146:                                              ; preds = %145, %133
  call void @llvm.lifetime.end.p0(i64 432, ptr %14) #10
  invoke void @__cxa_end_catch()
          to label %147 unwind label %156

147:                                              ; preds = %146
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #10
  br label %151

148:                                              ; preds = %67
  call void @_ZNSt10error_codeC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %2) #10
  br label %149

149:                                              ; preds = %148, %108, %87, %65
  %150 = load { i32, ptr }, ptr %2, align 8
  ret { i32, ptr } %150

151:                                              ; preds = %147, %132, %90
  %152 = load ptr, ptr %5, align 8
  %153 = load i32, ptr %6, align 4
  %154 = insertvalue { ptr, i32 } poison, ptr %152, 0
  %155 = insertvalue { ptr, i32 } %154, i32 %153, 1
  resume { ptr, i32 } %155

156:                                              ; preds = %146, %131
  %157 = landingpad { ptr, i32 }
          catch ptr null
  %158 = extractvalue { ptr, i32 } %157, 0
  call void @__clang_call_terminate(ptr %158) #11
  unreachable

159:                                              ; preds = %65
  unreachable
}

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(161) ptr @_ZStlsIN7Logging13LoggerMessageEA51_cEOT_S4_RKT0_(ptr noundef nonnull align 8 dereferenceable(161), ptr noundef nonnull align 1 dereferenceable(51)) #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 #4

; 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)) #5

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

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

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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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 #6 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { 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 = { 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 #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, !11, i64 48}
!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 = !{i8 0, i8 2}
!28 = !{}
!29 = !{!30, !30, i64 0}
!30 = !{!"vtable pointer", !8, i64 0}
!31 = !{i64 0, i64 4, !32, i64 8, i64 8, !5}
!32 = !{!33, !33, i64 0}
!33 = !{!"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 }

@_ZN7Logging12BRIGHT_WHITEB5cxx11E = external global %"class.std::__cxx11::basic_string", align 8
@_ZTISt12system_error = external constant ptr
@_ZTISt9exception = external constant ptr
@.str.52 = external hidden unnamed_addr constant [17 x i8], align 1
@_ZN7Logging13BRIGHT_YELLOWB5cxx11E = external global %"class.std::__cxx11::basic_string", align 8
@.str.53 = external hidden unnamed_addr constant [51 x i8], align 1
@.str.54 = external hidden unnamed_addr constant [28 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

declare void @__cxa_end_catch() local_unnamed_addr

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(161) ptr @_ZStlsIN7Logging13LoggerMessageEA17_cEOT_S4_RKT0_(ptr noundef nonnull align 8 dereferenceable(161), ptr noundef nonnull align 1 dereferenceable(17)) local_unnamed_addr #5

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(161) ptr @_ZStlsIN7Logging13LoggerMessageEA28_cEOT_S4_RKT0_(ptr noundef nonnull align 8 dereferenceable(161), ptr noundef nonnull align 1 dereferenceable(28)) local_unnamed_addr #5

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

11:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 432, ptr nonnull %4) #10
  %12 = 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 %4, ptr noundef nonnull align 8 dereferenceable(40) %12, i32 noundef 3, ptr noundef nonnull align 8 dereferenceable(32) @_ZN7Logging12BRIGHT_WHITEB5cxx11E)
          to label %13 unwind label %24

13:                                               ; preds = %11
  %14 = invoke noundef nonnull align 8 dereferenceable(161) ptr @_ZStlsIN7Logging13LoggerMessageEA17_cEOT_S4_RKT0_(ptr noundef nonnull align 8 dereferenceable(161) %4, ptr noundef nonnull align 1 dereferenceable(17) @.str.52)
          to label %15 unwind label %26

15:                                               ; preds = %13
  call void @_ZN7Logging13LoggerMessageD1Ev(ptr noundef nonnull align 8 dereferenceable(161) %4) #10
  call void @llvm.lifetime.end.p0(i64 432, ptr nonnull %4) #10
  %16 = getelementptr inbounds i8, ptr %0, i64 48
  %17 = load i8, ptr %16, align 8, !tbaa !5, !range !26, !noundef !27
  %18 = trunc nuw i8 %17 to i1
  br i1 %18, label %36, label %19

19:                                               ; preds = %15
  call void @llvm.lifetime.start.p0(i64 432, ptr nonnull %5) #10
  invoke void @_ZNK7Logging9LoggerRefclENS_5LevelERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr dead_on_unwind nonnull writable sret(%"class.Logging::LoggerMessage") align 8 %5, ptr noundef nonnull align 8 dereferenceable(40) %12, i32 noundef 2, ptr noundef nonnull align 8 dereferenceable(32) @_ZN7Logging13BRIGHT_YELLOWB5cxx11E)
          to label %20 unwind label %29

20:                                               ; preds = %19
  %21 = invoke noundef nonnull align 8 dereferenceable(161) ptr @_ZStlsIN7Logging13LoggerMessageEA51_cEOT_S4_RKT0_(ptr noundef nonnull align 8 dereferenceable(161) %5, ptr noundef nonnull align 1 dereferenceable(51) @.str.53)
          to label %37 unwind label %31

22:                                               ; preds = %1
  %23 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt12system_error
          catch ptr @_ZTISt9exception
  br label %43

24:                                               ; preds = %11
  %25 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt12system_error
          catch ptr @_ZTISt9exception
  br label %28

26:                                               ; preds = %13
  %27 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt12system_error
          catch ptr @_ZTISt9exception
  call void @_ZN7Logging13LoggerMessageD1Ev(ptr noundef nonnull align 8 dereferenceable(161) %4) #10
  br label %28

28:                                               ; preds = %26, %24
  %.pn = phi { ptr, i32 } [ %27, %26 ], [ %25, %24 ]
  call void @llvm.lifetime.end.p0(i64 432, ptr nonnull %4) #10
  br label %42

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

31:                                               ; preds = %20
  %32 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt12system_error
          catch ptr @_ZTISt9exception
  call void @_ZN7Logging13LoggerMessageD1Ev(ptr noundef nonnull align 8 dereferenceable(161) %5) #10
  br label %33

33:                                               ; preds = %31, %29
  %.pn20 = phi { ptr, i32 } [ %32, %31 ], [ %30, %29 ]
  call void @llvm.lifetime.end.p0(i64 432, ptr nonnull %5) #10
  br label %42

34:                                               ; preds = %36
  %35 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt12system_error
          catch ptr @_ZTISt9exception
  br label %42

36:                                               ; preds = %15
  invoke void @_ZN14PaymentService13WalletService10saveWalletEv(ptr noundef nonnull align 8 dereferenceable(224) %0)
          to label %94 unwind label %34

37:                                               ; preds = %20
  call void @_ZN7Logging13LoggerMessageD1Ev(ptr noundef nonnull align 8 dereferenceable(161) %5) #10
  call void @llvm.lifetime.end.p0(i64 432, ptr nonnull %5) #10
  %38 = call { i32, ptr } @_Z15make_error_codeN7DynexCN5error16WalletErrorCodesE(i32 noundef 1)
  %39 = extractvalue { i32, ptr } %38, 0
  store i32 %39, ptr %2, align 8
  %40 = getelementptr inbounds i8, ptr %2, i64 8
  %41 = extractvalue { i32, ptr } %38, 1
  store ptr %41, ptr %40, align 8
  call void @_ZN6System9EventLockD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %3) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #10
  br label %95

42:                                               ; preds = %34, %33, %28
  %.pn22 = phi { ptr, i32 } [ %35, %34 ], [ %.pn20, %33 ], [ %.pn, %28 ]
  call void @_ZN6System9EventLockD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %3) #10
  br label %43

43:                                               ; preds = %42, %22
  %.pn22.pn = phi { ptr, i32 } [ %.pn22, %42 ], [ %23, %22 ]
  %.3 = extractvalue { ptr, i32 } %.pn22.pn, 0
  %.312 = extractvalue { ptr, i32 } %.pn22.pn, 1
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #10
  %44 = call i32 @llvm.eh.typeid.for.p0(ptr nonnull @_ZTISt12system_error) #10
  %45 = icmp eq i32 %.312, %44
  br i1 %45, label %46, label %59

46:                                               ; preds = %43
  %47 = call ptr @__cxa_begin_catch(ptr %.3) #10
  call void @llvm.lifetime.start.p0(i64 432, ptr nonnull %8) #10
  %48 = 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 %8, ptr noundef nonnull align 8 dereferenceable(40) %48, i32 noundef 2, ptr noundef nonnull align 8 dereferenceable(32) @_ZN7Logging13BRIGHT_YELLOWB5cxx11E)
          to label %49 unwind label %86

49:                                               ; preds = %46
  %50 = invoke noundef nonnull align 8 dereferenceable(161) ptr @_ZStlsIN7Logging13LoggerMessageEA28_cEOT_S4_RKT0_(ptr noundef nonnull align 8 dereferenceable(161) %8, ptr noundef nonnull align 1 dereferenceable(28) @.str.54)
          to label %51 unwind label %88

51:                                               ; preds = %49
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #10
  %52 = load ptr, ptr %47, align 8, !tbaa !28
  %53 = getelementptr inbounds i8, ptr %52, i64 16
  %54 = load ptr, ptr %53, align 8
  %55 = call noundef ptr %54(ptr noundef nonnull align 8 dereferenceable(16) %47) #10
  store ptr %55, ptr %9, align 8, !tbaa !30
  %56 = invoke noundef nonnull align 8 dereferenceable(161) ptr @_ZStlsIN7Logging13LoggerMessageEPKcEOT_S5_RKT0_(ptr noundef nonnull align 8 dereferenceable(161) %50, ptr noundef nonnull align 8 dereferenceable(8) %9)
          to label %57 unwind label %90

57:                                               ; preds = %51
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #10
  call void @_ZN7Logging13LoggerMessageD1Ev(ptr noundef nonnull align 8 dereferenceable(161) %8) #10
  call void @llvm.lifetime.end.p0(i64 432, ptr nonnull %8) #10
  %58 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt12system_error4codeEv(ptr noundef nonnull align 8 dereferenceable(32) %47) #10
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %2, ptr noundef nonnull align 8 dereferenceable(16) %58, i64 16, i1 false), !tbaa.struct !31
  call void @__cxa_end_catch()
  br label %95

59:                                               ; preds = %43
  %60 = call i32 @llvm.eh.typeid.for.p0(ptr nonnull @_ZTISt9exception) #10
  %61 = icmp eq i32 %.312, %60
  br i1 %61, label %62, label %96

62:                                               ; preds = %59
  %63 = call ptr @__cxa_begin_catch(ptr %.3) #10
  call void @llvm.lifetime.start.p0(i64 432, ptr nonnull %6) #10
  %64 = 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 %6, ptr noundef nonnull align 8 dereferenceable(40) %64, i32 noundef 2, ptr noundef nonnull align 8 dereferenceable(32) @_ZN7Logging13BRIGHT_YELLOWB5cxx11E)
          to label %65 unwind label %78

65:                                               ; preds = %62
  %66 = invoke noundef nonnull align 8 dereferenceable(161) ptr @_ZStlsIN7Logging13LoggerMessageEA28_cEOT_S4_RKT0_(ptr noundef nonnull align 8 dereferenceable(161) %6, ptr noundef nonnull align 1 dereferenceable(28) @.str.54)
          to label %67 unwind label %80

67:                                               ; preds = %65
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #10
  %68 = load ptr, ptr %63, align 8, !tbaa !28
  %69 = getelementptr inbounds i8, ptr %68, i64 16
  %70 = load ptr, ptr %69, align 8
  %71 = call noundef ptr %70(ptr noundef nonnull align 8 dereferenceable(8) %63) #10
  store ptr %71, ptr %7, align 8, !tbaa !30
  %72 = invoke noundef nonnull align 8 dereferenceable(161) ptr @_ZStlsIN7Logging13LoggerMessageEPKcEOT_S5_RKT0_(ptr noundef nonnull align 8 dereferenceable(161) %66, ptr noundef nonnull align 8 dereferenceable(8) %7)
          to label %73 unwind label %82

73:                                               ; preds = %67
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #10
  call void @_ZN7Logging13LoggerMessageD1Ev(ptr noundef nonnull align 8 dereferenceable(161) %6) #10
  call void @llvm.lifetime.end.p0(i64 432, ptr nonnull %6) #10
  %74 = call { i32, ptr } @_Z15make_error_codeN7DynexCN5error16WalletErrorCodesE(i32 noundef 5)
  %75 = extractvalue { i32, ptr } %74, 0
  store i32 %75, ptr %2, align 8
  %76 = getelementptr inbounds i8, ptr %2, i64 8
  %77 = extractvalue { i32, ptr } %74, 1
  store ptr %77, ptr %76, align 8
  call void @__cxa_end_catch()
  br label %95

78:                                               ; preds = %62
  %79 = landingpad { ptr, i32 }
          cleanup
  br label %85

80:                                               ; preds = %65
  %81 = landingpad { ptr, i32 }
          cleanup
  br label %84

82:                                               ; preds = %67
  %83 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #10
  br label %84

84:                                               ; preds = %82, %80
  %.pn25 = phi { ptr, i32 } [ %83, %82 ], [ %81, %80 ]
  call void @_ZN7Logging13LoggerMessageD1Ev(ptr noundef nonnull align 8 dereferenceable(161) %6) #10
  br label %85

85:                                               ; preds = %84, %78
  %.pn25.pn = phi { ptr, i32 } [ %.pn25, %84 ], [ %79, %78 ]
  call void @llvm.lifetime.end.p0(i64 432, ptr nonnull %6) #10
  invoke void @__cxa_end_catch()
          to label %96 unwind label %97

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

88:                                               ; preds = %49
  %89 = landingpad { ptr, i32 }
          cleanup
  br label %92

90:                                               ; preds = %51
  %91 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #10
  br label %92

92:                                               ; preds = %90, %88
  %.pn28 = phi { ptr, i32 } [ %91, %90 ], [ %89, %88 ]
  call void @_ZN7Logging13LoggerMessageD1Ev(ptr noundef nonnull align 8 dereferenceable(161) %8) #10
  br label %93

93:                                               ; preds = %92, %86
  %.pn28.pn = phi { ptr, i32 } [ %.pn28, %92 ], [ %87, %86 ]
  call void @llvm.lifetime.end.p0(i64 432, ptr nonnull %8) #10
  invoke void @__cxa_end_catch()
          to label %96 unwind label %97

94:                                               ; preds = %36
  call void @_ZN6System9EventLockD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %3) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #10
  call void @_ZNSt10error_codeC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %2) #10
  br label %95

95:                                               ; preds = %37, %94, %73, %57
  %.fca.0.load = load i32, ptr %2, align 8
  %.fca.0.insert = insertvalue { i32, ptr } poison, i32 %.fca.0.load, 0
  %.fca.1.gep = getelementptr inbounds i8, ptr %2, 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

96:                                               ; preds = %93, %85, %59
  %.merged = phi { ptr, i32 } [ %.pn22.pn, %59 ], [ %.pn25.pn, %85 ], [ %.pn28.pn, %93 ]
  resume { ptr, i32 } %.merged

97:                                               ; preds = %93, %85
  %98 = landingpad { ptr, i32 }
          catch ptr null
  %99 = extractvalue { ptr, i32 } %98, 0
  call void @__clang_call_terminate(ptr %99) #11
  unreachable
}

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(161) ptr @_ZStlsIN7Logging13LoggerMessageEA51_cEOT_S4_RKT0_(ptr noundef nonnull align 8 dereferenceable(161), ptr noundef nonnull align 1 dereferenceable(51)) local_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 #4

; 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 #5

; 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 #9 align 2

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

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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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 #6 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { 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 = { 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 #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, !10, i64 48}
!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 = !{i8 0, i8 2}
!27 = !{}
!28 = !{!29, !29, i64 0}
!29 = !{!"vtable pointer", !9, i64 0}
!30 = !{!7, !7, i64 0}
!31 = !{i64 0, i64 4, !32, i64 8, i64 8, !30}
!32 = !{!33, !33, i64 0}
!33 = !{!"int", !8, i64 0}


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