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

; 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
@_ZN7Logging13BRIGHT_YELLOWB5cxx11E = external global %"class.std::__cxx11::basic_string", align 8
@.str.55 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.56 = external hidden unnamed_addr constant [52 x i8], align 1
@.str.57 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.58 = external hidden unnamed_addr constant [30 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 @_ZStlsIN7Logging13LoggerMessageEA30_cEOT_S4_RKT0_(ptr noundef nonnull align 8 dereferenceable(161), ptr noundef nonnull align 1 dereferenceable(30)) #5

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

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 nounwind uwtable
declare dso_local { i32, ptr } @_Z15make_error_codeN7DynexCN5error16WalletErrorCodesE(i32 noundef) #6

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local { i32, ptr } @_ZN14PaymentService13WalletService11resetWalletEv(ptr noundef nonnull align 8 dereferenceable(224) %0) #9 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 %"class.Logging::LoggerMessage", align 8
  %11 = alloca ptr, align 8
  %12 = alloca %"class.Logging::LoggerMessage", align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca %"class.Logging::LoggerMessage", align 8
  %16 = alloca ptr, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  %17 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #10
  %18 = getelementptr inbounds %"class.PaymentService::WalletService", ptr %17, i32 0, i32 9
  invoke void @_ZN6System9EventLockC1ERNS_5EventE(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(32) %18)
          to label %19 unwind label %38

19:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 432, ptr %7) #10
  %20 = getelementptr inbounds %"class.PaymentService::WalletService", ptr %17, 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) %20, i32 noundef 3, ptr noundef nonnull align 8 dereferenceable(32) @_ZN7Logging12BRIGHT_WHITEB5cxx11E)
          to label %21 unwind label %42

21:                                               ; preds = %19
  %22 = invoke noundef nonnull align 8 dereferenceable(161) ptr @_ZStlsIN7Logging13LoggerMessageEA16_cEOT_S4_RKT0_(ptr noundef nonnull align 8 dereferenceable(161) %7, ptr noundef nonnull align 1 dereferenceable(16) @.str.55)
          to label %23 unwind label %46

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

27:                                               ; preds = %23
  call void @llvm.lifetime.start.p0(i64 432, ptr %8) #10
  %28 = getelementptr inbounds %"class.PaymentService::WalletService", ptr %17, 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) %28, i32 noundef 2, ptr noundef nonnull align 8 dereferenceable(32) @_ZN7Logging13BRIGHT_YELLOWB5cxx11E)
          to label %29 unwind label %51

29:                                               ; preds = %27
  %30 = invoke noundef nonnull align 8 dereferenceable(161) ptr @_ZStlsIN7Logging13LoggerMessageEA52_cEOT_S4_RKT0_(ptr noundef nonnull align 8 dereferenceable(161) %8, ptr noundef nonnull align 1 dereferenceable(52) @.str.56)
          to label %31 unwind label %55

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

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

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

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

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

50:                                               ; preds = %46, %42
  call void @llvm.lifetime.end.p0(i64 432, ptr %7) #10
  br label %82

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

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

59:                                               ; preds = %55, %51
  call void @llvm.lifetime.end.p0(i64 432, ptr %8) #10
  br label %82

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

64:                                               ; preds = %23
  invoke void @_ZN14PaymentService13WalletService5resetEv(ptr noundef nonnull align 8 dereferenceable(224) %17)
          to label %65 unwind label %60

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

67:                                               ; preds = %65
  %68 = invoke noundef nonnull align 8 dereferenceable(161) ptr @_ZStlsIN7Logging13LoggerMessageEA22_cEOT_S4_RKT0_(ptr noundef nonnull align 8 dereferenceable(161) %10, ptr noundef nonnull align 1 dereferenceable(22) @.str.57)
          to label %69 unwind label %77

69:                                               ; preds = %67
  call void @_ZN7Logging13LoggerMessageD1Ev(ptr noundef nonnull align 8 dereferenceable(161) %10) #10
  call void @llvm.lifetime.end.p0(i64 432, ptr %10) #10
  store i32 0, ptr %9, align 4
  br label %70

70:                                               ; preds = %69, %33
  call void @_ZN6System9EventLockD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #10
  %71 = load i32, ptr %9, align 4
  switch i32 %71, label %173 [
    i32 0, label %72
    i32 1, label %163
  ]

72:                                               ; preds = %70
  br label %162

73:                                               ; preds = %65
  %74 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt12system_error
          catch ptr @_ZTISt9exception
  %75 = extractvalue { ptr, i32 } %74, 0
  store ptr %75, ptr %5, align 8
  %76 = extractvalue { ptr, i32 } %74, 1
  store i32 %76, ptr %6, align 4
  br label %81

77:                                               ; preds = %67
  %78 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt12system_error
          catch ptr @_ZTISt9exception
  %79 = extractvalue { ptr, i32 } %78, 0
  store ptr %79, ptr %5, align 8
  %80 = extractvalue { ptr, i32 } %78, 1
  store i32 %80, ptr %6, align 4
  call void @_ZN7Logging13LoggerMessageD1Ev(ptr noundef nonnull align 8 dereferenceable(161) %10) #10
  br label %81

81:                                               ; preds = %77, %73
  call void @llvm.lifetime.end.p0(i64 432, ptr %10) #10
  br label %82

82:                                               ; preds = %81, %60, %59, %50
  call void @_ZN6System9EventLockD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #10
  br label %83

83:                                               ; preds = %82, %38
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #10
  br label %84

84:                                               ; preds = %83
  %85 = load i32, ptr %6, align 4
  %86 = call i32 @llvm.eh.typeid.for.p0(ptr @_ZTISt12system_error) #10
  %87 = icmp eq i32 %85, %86
  br i1 %87, label %88, label %104

88:                                               ; preds = %84
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #10
  %89 = load ptr, ptr %5, align 8
  %90 = call ptr @__cxa_begin_catch(ptr %89) #10
  store ptr %90, ptr %14, align 8
  call void @llvm.lifetime.start.p0(i64 432, ptr %15) #10
  %91 = getelementptr inbounds %"class.PaymentService::WalletService", ptr %17, i32 0, i32 7
  invoke void @_ZNK7Logging9LoggerRefclENS_5LevelERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr dead_on_unwind writable sret(%"class.Logging::LoggerMessage") align 8 %15, ptr noundef nonnull align 8 dereferenceable(40) %91, i32 noundef 2, ptr noundef nonnull align 8 dereferenceable(32) @_ZN7Logging13BRIGHT_YELLOWB5cxx11E)
          to label %92 unwind label %147

92:                                               ; preds = %88
  %93 = invoke noundef nonnull align 8 dereferenceable(161) ptr @_ZStlsIN7Logging13LoggerMessageEA30_cEOT_S4_RKT0_(ptr noundef nonnull align 8 dereferenceable(161) %15, ptr noundef nonnull align 1 dereferenceable(30) @.str.58)
          to label %94 unwind label %151

94:                                               ; preds = %92
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #10
  %95 = load ptr, ptr %14, align 8, !tbaa !5
  %96 = load ptr, ptr %95, align 8, !tbaa !29
  %97 = getelementptr inbounds ptr, ptr %96, i64 2
  %98 = load ptr, ptr %97, align 8
  %99 = call noundef ptr %98(ptr noundef nonnull align 8 dereferenceable(16) %95) #10
  store ptr %99, ptr %16, align 8, !tbaa !5
  %100 = invoke noundef nonnull align 8 dereferenceable(161) ptr @_ZStlsIN7Logging13LoggerMessageEPKcEOT_S5_RKT0_(ptr noundef nonnull align 8 dereferenceable(161) %93, ptr noundef nonnull align 8 dereferenceable(8) %16)
          to label %101 unwind label %155

101:                                              ; preds = %94
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #10
  call void @_ZN7Logging13LoggerMessageD1Ev(ptr noundef nonnull align 8 dereferenceable(161) %15) #10
  call void @llvm.lifetime.end.p0(i64 432, ptr %15) #10
  %102 = load ptr, ptr %14, align 8, !tbaa !5
  %103 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt12system_error4codeEv(ptr noundef nonnull align 8 dereferenceable(32) %102) #10
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %2, ptr align 8 %103, 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 %14) #10
  br label %163

104:                                              ; preds = %84
  %105 = call i32 @llvm.eh.typeid.for.p0(ptr @_ZTISt9exception) #10
  %106 = icmp eq i32 %85, %105
  br i1 %106, label %107, label %165

107:                                              ; preds = %104
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #10
  %108 = load ptr, ptr %5, align 8
  %109 = call ptr @__cxa_begin_catch(ptr %108) #10
  store ptr %109, ptr %11, align 8
  call void @llvm.lifetime.start.p0(i64 432, ptr %12) #10
  %110 = getelementptr inbounds %"class.PaymentService::WalletService", ptr %17, i32 0, i32 7
  invoke void @_ZNK7Logging9LoggerRefclENS_5LevelERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr dead_on_unwind writable sret(%"class.Logging::LoggerMessage") align 8 %12, ptr noundef nonnull align 8 dereferenceable(40) %110, i32 noundef 2, ptr noundef nonnull align 8 dereferenceable(32) @_ZN7Logging13BRIGHT_YELLOWB5cxx11E)
          to label %111 unwind label %127

111:                                              ; preds = %107
  %112 = invoke noundef nonnull align 8 dereferenceable(161) ptr @_ZStlsIN7Logging13LoggerMessageEA30_cEOT_S4_RKT0_(ptr noundef nonnull align 8 dereferenceable(161) %12, ptr noundef nonnull align 1 dereferenceable(30) @.str.58)
          to label %113 unwind label %131

113:                                              ; preds = %111
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #10
  %114 = load ptr, ptr %11, align 8, !tbaa !5
  %115 = load ptr, ptr %114, align 8, !tbaa !29
  %116 = getelementptr inbounds ptr, ptr %115, i64 2
  %117 = load ptr, ptr %116, align 8
  %118 = call noundef ptr %117(ptr noundef nonnull align 8 dereferenceable(8) %114) #10
  store ptr %118, ptr %13, align 8, !tbaa !5
  %119 = invoke noundef nonnull align 8 dereferenceable(161) ptr @_ZStlsIN7Logging13LoggerMessageEPKcEOT_S5_RKT0_(ptr noundef nonnull align 8 dereferenceable(161) %112, ptr noundef nonnull align 8 dereferenceable(8) %13)
          to label %120 unwind label %135

120:                                              ; preds = %113
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #10
  call void @_ZN7Logging13LoggerMessageD1Ev(ptr noundef nonnull align 8 dereferenceable(161) %12) #10
  call void @llvm.lifetime.end.p0(i64 432, ptr %12) #10
  %121 = invoke { i32, ptr } @_Z15make_error_codeN7DynexCN5error16WalletErrorCodesE(i32 noundef 5)
          to label %122 unwind label %141

122:                                              ; preds = %120
  %123 = getelementptr inbounds { i32, ptr }, ptr %2, i32 0, i32 0
  %124 = extractvalue { i32, ptr } %121, 0
  store i32 %124, ptr %123, align 8
  %125 = getelementptr inbounds { i32, ptr }, ptr %2, i32 0, i32 1
  %126 = extractvalue { i32, ptr } %121, 1
  store ptr %126, ptr %125, align 8
  store i32 1, ptr %9, align 4
  call void @__cxa_end_catch()
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #10
  br label %163

127:                                              ; preds = %107
  %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 %140

131:                                              ; preds = %111
  %132 = landingpad { ptr, i32 }
          cleanup
  %133 = extractvalue { ptr, i32 } %132, 0
  store ptr %133, ptr %5, align 8
  %134 = extractvalue { ptr, i32 } %132, 1
  store i32 %134, ptr %6, align 4
  br label %139

135:                                              ; preds = %113
  %136 = landingpad { ptr, i32 }
          cleanup
  %137 = extractvalue { ptr, i32 } %136, 0
  store ptr %137, ptr %5, align 8
  %138 = extractvalue { ptr, i32 } %136, 1
  store i32 %138, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #10
  br label %139

139:                                              ; preds = %135, %131
  call void @_ZN7Logging13LoggerMessageD1Ev(ptr noundef nonnull align 8 dereferenceable(161) %12) #10
  br label %140

140:                                              ; preds = %139, %127
  call void @llvm.lifetime.end.p0(i64 432, ptr %12) #10
  br label %145

141:                                              ; preds = %120
  %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
  br label %145

145:                                              ; preds = %141, %140
  invoke void @__cxa_end_catch()
          to label %146 unwind label %170

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

147:                                              ; preds = %88
  %148 = landingpad { ptr, i32 }
          cleanup
  %149 = extractvalue { ptr, i32 } %148, 0
  store ptr %149, ptr %5, align 8
  %150 = extractvalue { ptr, i32 } %148, 1
  store i32 %150, ptr %6, align 4
  br label %160

151:                                              ; preds = %92
  %152 = landingpad { ptr, i32 }
          cleanup
  %153 = extractvalue { ptr, i32 } %152, 0
  store ptr %153, ptr %5, align 8
  %154 = extractvalue { ptr, i32 } %152, 1
  store i32 %154, ptr %6, align 4
  br label %159

155:                                              ; preds = %94
  %156 = landingpad { ptr, i32 }
          cleanup
  %157 = extractvalue { ptr, i32 } %156, 0
  store ptr %157, ptr %5, align 8
  %158 = extractvalue { ptr, i32 } %156, 1
  store i32 %158, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #10
  br label %159

159:                                              ; preds = %155, %151
  call void @_ZN7Logging13LoggerMessageD1Ev(ptr noundef nonnull align 8 dereferenceable(161) %15) #10
  br label %160

160:                                              ; preds = %159, %147
  call void @llvm.lifetime.end.p0(i64 432, ptr %15) #10
  invoke void @__cxa_end_catch()
          to label %161 unwind label %170

161:                                              ; preds = %160
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #10
  br label %165

162:                                              ; preds = %72
  call void @_ZNSt10error_codeC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %2) #10
  br label %163

163:                                              ; preds = %162, %122, %101, %70
  %164 = load { i32, ptr }, ptr %2, align 8
  ret { i32, ptr } %164

165:                                              ; preds = %161, %146, %104
  %166 = load ptr, ptr %5, align 8
  %167 = load i32, ptr %6, align 4
  %168 = insertvalue { ptr, i32 } poison, ptr %166, 0
  %169 = insertvalue { ptr, i32 } %168, i32 %167, 1
  resume { ptr, i32 } %169

170:                                              ; preds = %160, %145
  %171 = landingpad { ptr, i32 }
          catch ptr null
  %172 = extractvalue { ptr, i32 } %171, 0
  call void @__clang_call_terminate(ptr %172) #11
  unreachable

173:                                              ; preds = %70
  unreachable
}

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

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

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

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 = { 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 #7 = { nounwind memory(none) }
attributes #8 = { 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 #9 = { 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, !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
@_ZN7Logging13BRIGHT_YELLOWB5cxx11E = external global %"class.std::__cxx11::basic_string", align 8
@.str.55 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.56 = external hidden unnamed_addr constant [52 x i8], align 1
@.str.57 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.58 = external hidden unnamed_addr constant [30 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 @_ZStlsIN7Logging13LoggerMessageEA30_cEOT_S4_RKT0_(ptr noundef nonnull align 8 dereferenceable(161), ptr noundef nonnull align 1 dereferenceable(30)) local_unnamed_addr #5

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

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 nounwind uwtable
declare dso_local { i32, ptr } @_Z15make_error_codeN7DynexCN5error16WalletErrorCodesE(i32 noundef) local_unnamed_addr #6

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local { i32, ptr } @_ZN14PaymentService13WalletService11resetWalletEv(ptr noundef nonnull align 8 dereferenceable(224) %0) local_unnamed_addr #9 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 %"class.Logging::LoggerMessage", align 8
  %8 = alloca ptr, align 8
  %9 = alloca %"class.Logging::LoggerMessage", align 8
  %10 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #10
  %11 = 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) %11)
          to label %12 unwind label %23

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

14:                                               ; preds = %12
  %15 = invoke noundef nonnull align 8 dereferenceable(161) ptr @_ZStlsIN7Logging13LoggerMessageEA16_cEOT_S4_RKT0_(ptr noundef nonnull align 8 dereferenceable(161) %4, ptr noundef nonnull align 1 dereferenceable(16) @.str.55)
          to label %16 unwind label %27

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

20:                                               ; preds = %16
  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) %13, i32 noundef 2, ptr noundef nonnull align 8 dereferenceable(32) @_ZN7Logging13BRIGHT_YELLOWB5cxx11E)
          to label %21 unwind label %30

21:                                               ; preds = %20
  %22 = invoke noundef nonnull align 8 dereferenceable(161) ptr @_ZStlsIN7Logging13LoggerMessageEA52_cEOT_S4_RKT0_(ptr noundef nonnull align 8 dereferenceable(161) %5, ptr noundef nonnull align 1 dereferenceable(52) @.str.56)
          to label %41 unwind label %32

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

25:                                               ; preds = %12
  %26 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt12system_error
          catch ptr @_ZTISt9exception
  br label %29

27:                                               ; preds = %14
  %28 = 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 %29

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

30:                                               ; preds = %20
  %31 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt12system_error
          catch ptr @_ZTISt9exception
  br label %34

32:                                               ; preds = %21
  %33 = 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 %34

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

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

37:                                               ; preds = %16
  invoke void @_ZN14PaymentService13WalletService5resetEv(ptr noundef nonnull align 8 dereferenceable(224) %0)
          to label %38 unwind label %35

38:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 432, ptr nonnull %6) #10
  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) %13, i32 noundef 3, ptr noundef nonnull align 8 dereferenceable(32) @_ZN7Logging12BRIGHT_WHITEB5cxx11E)
          to label %39 unwind label %46

39:                                               ; preds = %38
  %40 = invoke noundef nonnull align 8 dereferenceable(161) ptr @_ZStlsIN7Logging13LoggerMessageEA22_cEOT_S4_RKT0_(ptr noundef nonnull align 8 dereferenceable(161) %6, ptr noundef nonnull align 1 dereferenceable(22) @.str.57)
          to label %103 unwind label %48

41:                                               ; preds = %21
  call void @_ZN7Logging13LoggerMessageD1Ev(ptr noundef nonnull align 8 dereferenceable(161) %5) #10
  call void @llvm.lifetime.end.p0(i64 432, ptr nonnull %5) #10
  %42 = call { i32, ptr } @_Z15make_error_codeN7DynexCN5error16WalletErrorCodesE(i32 noundef 1)
  %43 = extractvalue { i32, ptr } %42, 0
  store i32 %43, ptr %2, align 8
  %44 = getelementptr inbounds i8, ptr %2, i64 8
  %45 = extractvalue { i32, ptr } %42, 1
  store ptr %45, ptr %44, 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 %104

46:                                               ; preds = %38
  %47 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt12system_error
          catch ptr @_ZTISt9exception
  br label %50

48:                                               ; preds = %39
  %49 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt12system_error
          catch ptr @_ZTISt9exception
  call void @_ZN7Logging13LoggerMessageD1Ev(ptr noundef nonnull align 8 dereferenceable(161) %6) #10
  br label %50

50:                                               ; preds = %48, %46
  %.pn23 = phi { ptr, i32 } [ %49, %48 ], [ %47, %46 ]
  call void @llvm.lifetime.end.p0(i64 432, ptr nonnull %6) #10
  br label %51

51:                                               ; preds = %50, %35, %34, %29
  %.pn23.pn = phi { ptr, i32 } [ %.pn23, %50 ], [ %36, %35 ], [ %.pn21, %34 ], [ %.pn, %29 ]
  call void @_ZN6System9EventLockD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %3) #10
  br label %52

52:                                               ; preds = %51, %23
  %.pn23.pn.pn = phi { ptr, i32 } [ %.pn23.pn, %51 ], [ %24, %23 ]
  %.4 = extractvalue { ptr, i32 } %.pn23.pn.pn, 0
  %.413 = extractvalue { ptr, i32 } %.pn23.pn.pn, 1
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #10
  %53 = call i32 @llvm.eh.typeid.for.p0(ptr nonnull @_ZTISt12system_error) #10
  %54 = icmp eq i32 %.413, %53
  br i1 %54, label %55, label %68

55:                                               ; preds = %52
  %56 = call ptr @__cxa_begin_catch(ptr %.4) #10
  call void @llvm.lifetime.start.p0(i64 432, ptr nonnull %9) #10
  %57 = 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 %9, ptr noundef nonnull align 8 dereferenceable(40) %57, i32 noundef 2, ptr noundef nonnull align 8 dereferenceable(32) @_ZN7Logging13BRIGHT_YELLOWB5cxx11E)
          to label %58 unwind label %95

58:                                               ; preds = %55
  %59 = invoke noundef nonnull align 8 dereferenceable(161) ptr @_ZStlsIN7Logging13LoggerMessageEA30_cEOT_S4_RKT0_(ptr noundef nonnull align 8 dereferenceable(161) %9, ptr noundef nonnull align 1 dereferenceable(30) @.str.58)
          to label %60 unwind label %97

60:                                               ; preds = %58
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #10
  %61 = load ptr, ptr %56, align 8, !tbaa !28
  %62 = getelementptr inbounds i8, ptr %61, i64 16
  %63 = load ptr, ptr %62, align 8
  %64 = call noundef ptr %63(ptr noundef nonnull align 8 dereferenceable(16) %56) #10
  store ptr %64, ptr %10, align 8, !tbaa !30
  %65 = invoke noundef nonnull align 8 dereferenceable(161) ptr @_ZStlsIN7Logging13LoggerMessageEPKcEOT_S5_RKT0_(ptr noundef nonnull align 8 dereferenceable(161) %59, ptr noundef nonnull align 8 dereferenceable(8) %10)
          to label %66 unwind label %99

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

68:                                               ; preds = %52
  %69 = call i32 @llvm.eh.typeid.for.p0(ptr nonnull @_ZTISt9exception) #10
  %70 = icmp eq i32 %.413, %69
  br i1 %70, label %71, label %105

71:                                               ; preds = %68
  %72 = call ptr @__cxa_begin_catch(ptr %.4) #10
  call void @llvm.lifetime.start.p0(i64 432, ptr nonnull %7) #10
  %73 = 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 %7, ptr noundef nonnull align 8 dereferenceable(40) %73, i32 noundef 2, ptr noundef nonnull align 8 dereferenceable(32) @_ZN7Logging13BRIGHT_YELLOWB5cxx11E)
          to label %74 unwind label %87

74:                                               ; preds = %71
  %75 = invoke noundef nonnull align 8 dereferenceable(161) ptr @_ZStlsIN7Logging13LoggerMessageEA30_cEOT_S4_RKT0_(ptr noundef nonnull align 8 dereferenceable(161) %7, ptr noundef nonnull align 1 dereferenceable(30) @.str.58)
          to label %76 unwind label %89

76:                                               ; preds = %74
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #10
  %77 = load ptr, ptr %72, align 8, !tbaa !28
  %78 = getelementptr inbounds i8, ptr %77, i64 16
  %79 = load ptr, ptr %78, align 8
  %80 = call noundef ptr %79(ptr noundef nonnull align 8 dereferenceable(8) %72) #10
  store ptr %80, ptr %8, align 8, !tbaa !30
  %81 = invoke noundef nonnull align 8 dereferenceable(161) ptr @_ZStlsIN7Logging13LoggerMessageEPKcEOT_S5_RKT0_(ptr noundef nonnull align 8 dereferenceable(161) %75, ptr noundef nonnull align 8 dereferenceable(8) %8)
          to label %82 unwind label %91

82:                                               ; preds = %76
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #10
  call void @_ZN7Logging13LoggerMessageD1Ev(ptr noundef nonnull align 8 dereferenceable(161) %7) #10
  call void @llvm.lifetime.end.p0(i64 432, ptr nonnull %7) #10
  %83 = call { i32, ptr } @_Z15make_error_codeN7DynexCN5error16WalletErrorCodesE(i32 noundef 5)
  %84 = extractvalue { i32, ptr } %83, 0
  store i32 %84, ptr %2, align 8
  %85 = getelementptr inbounds i8, ptr %2, i64 8
  %86 = extractvalue { i32, ptr } %83, 1
  store ptr %86, ptr %85, align 8
  call void @__cxa_end_catch()
  br label %104

87:                                               ; preds = %71
  %88 = landingpad { ptr, i32 }
          cleanup
  br label %94

89:                                               ; preds = %74
  %90 = landingpad { ptr, i32 }
          cleanup
  br label %93

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

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

94:                                               ; preds = %93, %87
  %.pn27.pn = phi { ptr, i32 } [ %.pn27, %93 ], [ %88, %87 ]
  call void @llvm.lifetime.end.p0(i64 432, ptr nonnull %7) #10
  invoke void @__cxa_end_catch()
          to label %105 unwind label %106

95:                                               ; preds = %55
  %96 = landingpad { ptr, i32 }
          cleanup
  br label %102

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

99:                                               ; preds = %60
  %100 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #10
  br label %101

101:                                              ; preds = %99, %97
  %.pn30 = phi { ptr, i32 } [ %100, %99 ], [ %98, %97 ]
  call void @_ZN7Logging13LoggerMessageD1Ev(ptr noundef nonnull align 8 dereferenceable(161) %9) #10
  br label %102

102:                                              ; preds = %101, %95
  %.pn30.pn = phi { ptr, i32 } [ %.pn30, %101 ], [ %96, %95 ]
  call void @llvm.lifetime.end.p0(i64 432, ptr nonnull %9) #10
  invoke void @__cxa_end_catch()
          to label %105 unwind label %106

103:                                              ; preds = %39
  call void @_ZN7Logging13LoggerMessageD1Ev(ptr noundef nonnull align 8 dereferenceable(161) %6) #10
  call void @llvm.lifetime.end.p0(i64 432, ptr nonnull %6) #10
  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 %104

104:                                              ; preds = %41, %103, %82, %66
  %.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

105:                                              ; preds = %102, %94, %68
  %.merged = phi { ptr, i32 } [ %.pn23.pn.pn, %68 ], [ %.pn27.pn, %94 ], [ %.pn30.pn, %102 ]
  resume { ptr, i32 } %.merged

106:                                              ; preds = %102, %94
  %107 = landingpad { ptr, i32 }
          catch ptr null
  %108 = extractvalue { ptr, i32 } %107, 0
  call void @__clang_call_terminate(ptr %108) #11
  unreachable
}

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

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

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

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 = { 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 #7 = { nofree nosync nounwind memory(none) }
attributes #8 = { 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 #9 = { 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, !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