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

; 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.56 = external hidden unnamed_addr constant [52 x i8], align 1
@.str.59 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.60 = external hidden unnamed_addr constant [53 x i8], align 1
@.str.61 = external hidden unnamed_addr constant [31 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 @_ZStlsIN7Logging13LoggerMessageEA53_cEOT_S4_RKT0_(ptr noundef nonnull align 8 dereferenceable(161), ptr noundef nonnull align 1 dereferenceable(53)) #5

; 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

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: 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
define dso_local { i32, ptr } @_ZN14PaymentService13WalletService11resetWalletEj(ptr noundef nonnull align 8 dereferenceable(224) %0, i32 noundef %1) #9 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.std::error_code", align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca %"class.System::EventLock", align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca %"class.Logging::LoggerMessage", align 8
  %10 = alloca %"class.Logging::LoggerMessage", align 8
  %11 = alloca i32, align 4
  %12 = alloca %"class.Logging::LoggerMessage", align 8
  %13 = alloca ptr, align 8
  %14 = alloca %"class.Logging::LoggerMessage", align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca %"class.Logging::LoggerMessage", align 8
  %18 = alloca ptr, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i32 %1, ptr %5, align 4, !tbaa !9
  %19 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #10
  %20 = getelementptr inbounds %"class.PaymentService::WalletService", ptr %19, i32 0, i32 9
  invoke void @_ZN6System9EventLockC1ERNS_5EventE(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(32) %20)
          to label %21 unwind label %40

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

23:                                               ; preds = %21
  %24 = invoke noundef nonnull align 8 dereferenceable(161) ptr @_ZStlsIN7Logging13LoggerMessageEA17_cEOT_S4_RKT0_(ptr noundef nonnull align 8 dereferenceable(161) %9, ptr noundef nonnull align 1 dereferenceable(17) @.str.59)
          to label %25 unwind label %48

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

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

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

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

35:                                               ; preds = %33
  %36 = getelementptr inbounds { i32, ptr }, ptr %3, i32 0, i32 0
  %37 = extractvalue { i32, ptr } %34, 0
  store i32 %37, ptr %36, align 8
  %38 = getelementptr inbounds { i32, ptr }, ptr %3, i32 0, i32 1
  %39 = extractvalue { i32, ptr } %34, 1
  store ptr %39, ptr %38, align 8
  store i32 1, ptr %11, align 4
  br label %81

40:                                               ; preds = %2
  %41 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt12system_error
          catch ptr @_ZTISt9exception
  %42 = extractvalue { ptr, i32 } %41, 0
  store ptr %42, ptr %7, align 8
  %43 = extractvalue { ptr, i32 } %41, 1
  store i32 %43, ptr %8, align 4
  br label %94

44:                                               ; preds = %21
  %45 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt12system_error
          catch ptr @_ZTISt9exception
  %46 = extractvalue { ptr, i32 } %45, 0
  store ptr %46, ptr %7, align 8
  %47 = extractvalue { ptr, i32 } %45, 1
  store i32 %47, ptr %8, align 4
  br label %52

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

52:                                               ; preds = %48, %44
  call void @llvm.lifetime.end.p0(i64 432, ptr %9) #10
  br label %93

53:                                               ; preds = %29
  %54 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt12system_error
          catch ptr @_ZTISt9exception
  %55 = extractvalue { ptr, i32 } %54, 0
  store ptr %55, ptr %7, align 8
  %56 = extractvalue { ptr, i32 } %54, 1
  store i32 %56, ptr %8, align 4
  br label %61

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

61:                                               ; preds = %57, %53
  call void @llvm.lifetime.end.p0(i64 432, ptr %10) #10
  br label %93

62:                                               ; preds = %66, %33
  %63 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt12system_error
          catch ptr @_ZTISt9exception
  %64 = extractvalue { ptr, i32 } %63, 0
  store ptr %64, ptr %7, align 8
  %65 = extractvalue { ptr, i32 } %63, 1
  store i32 %65, ptr %8, align 4
  br label %93

66:                                               ; preds = %25
  %67 = getelementptr inbounds %"class.PaymentService::WalletService", ptr %19, i32 0, i32 2
  %68 = load ptr, ptr %67, align 8, !tbaa !31
  %69 = load i32, ptr %5, align 4, !tbaa !9
  %70 = zext i32 %69 to i64
  %71 = load ptr, ptr %68, align 8, !tbaa !32
  %72 = getelementptr inbounds ptr, ptr %71, i64 11
  %73 = load ptr, ptr %72, align 8
  invoke void %73(ptr noundef nonnull align 8 dereferenceable(8) %68, i64 noundef %70)
          to label %74 unwind label %62

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

76:                                               ; preds = %74
  %77 = invoke noundef nonnull align 8 dereferenceable(161) ptr @_ZStlsIN7Logging13LoggerMessageEA53_cEOT_S4_RKT0_(ptr noundef nonnull align 8 dereferenceable(161) %12, ptr noundef nonnull align 1 dereferenceable(53) @.str.60)
          to label %78 unwind label %88

78:                                               ; preds = %76
  %79 = invoke noundef nonnull align 8 dereferenceable(161) ptr @_ZStlsIN7Logging13LoggerMessageEjEOT_S3_RKT0_(ptr noundef nonnull align 8 dereferenceable(161) %77, ptr noundef nonnull align 4 dereferenceable(4) %5)
          to label %80 unwind label %88

80:                                               ; preds = %78
  call void @_ZN7Logging13LoggerMessageD1Ev(ptr noundef nonnull align 8 dereferenceable(161) %12) #10
  call void @llvm.lifetime.end.p0(i64 432, ptr %12) #10
  store i32 0, ptr %11, align 4
  br label %81

81:                                               ; preds = %80, %35
  call void @_ZN6System9EventLockD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #10
  %82 = load i32, ptr %11, align 4
  switch i32 %82, label %184 [
    i32 0, label %83
    i32 1, label %174
  ]

83:                                               ; preds = %81
  br label %173

84:                                               ; preds = %74
  %85 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt12system_error
          catch ptr @_ZTISt9exception
  %86 = extractvalue { ptr, i32 } %85, 0
  store ptr %86, ptr %7, align 8
  %87 = extractvalue { ptr, i32 } %85, 1
  store i32 %87, ptr %8, align 4
  br label %92

88:                                               ; preds = %78, %76
  %89 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt12system_error
          catch ptr @_ZTISt9exception
  %90 = extractvalue { ptr, i32 } %89, 0
  store ptr %90, ptr %7, align 8
  %91 = extractvalue { ptr, i32 } %89, 1
  store i32 %91, ptr %8, align 4
  call void @_ZN7Logging13LoggerMessageD1Ev(ptr noundef nonnull align 8 dereferenceable(161) %12) #10
  br label %92

92:                                               ; preds = %88, %84
  call void @llvm.lifetime.end.p0(i64 432, ptr %12) #10
  br label %93

93:                                               ; preds = %92, %62, %61, %52
  call void @_ZN6System9EventLockD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #10
  br label %94

94:                                               ; preds = %93, %40
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #10
  br label %95

95:                                               ; preds = %94
  %96 = load i32, ptr %8, align 4
  %97 = call i32 @llvm.eh.typeid.for.p0(ptr @_ZTISt12system_error) #10
  %98 = icmp eq i32 %96, %97
  br i1 %98, label %99, label %115

99:                                               ; preds = %95
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #10
  %100 = load ptr, ptr %7, align 8
  %101 = call ptr @__cxa_begin_catch(ptr %100) #10
  store ptr %101, ptr %16, align 8
  call void @llvm.lifetime.start.p0(i64 432, ptr %17) #10
  %102 = getelementptr inbounds %"class.PaymentService::WalletService", ptr %19, i32 0, i32 7
  invoke void @_ZNK7Logging9LoggerRefclENS_5LevelERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr dead_on_unwind writable sret(%"class.Logging::LoggerMessage") align 8 %17, ptr noundef nonnull align 8 dereferenceable(40) %102, i32 noundef 2, ptr noundef nonnull align 8 dereferenceable(32) @_ZN7Logging13BRIGHT_YELLOWB5cxx11E)
          to label %103 unwind label %158

103:                                              ; preds = %99
  %104 = invoke noundef nonnull align 8 dereferenceable(161) ptr @_ZStlsIN7Logging13LoggerMessageEA31_cEOT_S4_RKT0_(ptr noundef nonnull align 8 dereferenceable(161) %17, ptr noundef nonnull align 1 dereferenceable(31) @.str.61)
          to label %105 unwind label %162

105:                                              ; preds = %103
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #10
  %106 = load ptr, ptr %16, align 8, !tbaa !5
  %107 = load ptr, ptr %106, align 8, !tbaa !32
  %108 = getelementptr inbounds ptr, ptr %107, i64 2
  %109 = load ptr, ptr %108, align 8
  %110 = call noundef ptr %109(ptr noundef nonnull align 8 dereferenceable(16) %106) #10
  store ptr %110, ptr %18, align 8, !tbaa !5
  %111 = invoke noundef nonnull align 8 dereferenceable(161) ptr @_ZStlsIN7Logging13LoggerMessageEPKcEOT_S5_RKT0_(ptr noundef nonnull align 8 dereferenceable(161) %104, ptr noundef nonnull align 8 dereferenceable(8) %18)
          to label %112 unwind label %166

112:                                              ; preds = %105
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #10
  call void @_ZN7Logging13LoggerMessageD1Ev(ptr noundef nonnull align 8 dereferenceable(161) %17) #10
  call void @llvm.lifetime.end.p0(i64 432, ptr %17) #10
  %113 = load ptr, ptr %16, align 8, !tbaa !5
  %114 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt12system_error4codeEv(ptr noundef nonnull align 8 dereferenceable(32) %113) #10
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %3, ptr align 8 %114, i64 16, i1 false), !tbaa.struct !34
  store i32 1, ptr %11, align 4
  call void @__cxa_end_catch()
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #10
  br label %174

115:                                              ; preds = %95
  %116 = call i32 @llvm.eh.typeid.for.p0(ptr @_ZTISt9exception) #10
  %117 = icmp eq i32 %96, %116
  br i1 %117, label %118, label %176

118:                                              ; preds = %115
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #10
  %119 = load ptr, ptr %7, align 8
  %120 = call ptr @__cxa_begin_catch(ptr %119) #10
  store ptr %120, ptr %13, align 8
  call void @llvm.lifetime.start.p0(i64 432, ptr %14) #10
  %121 = getelementptr inbounds %"class.PaymentService::WalletService", ptr %19, 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) %121, i32 noundef 2, ptr noundef nonnull align 8 dereferenceable(32) @_ZN7Logging13BRIGHT_YELLOWB5cxx11E)
          to label %122 unwind label %138

122:                                              ; preds = %118
  %123 = invoke noundef nonnull align 8 dereferenceable(161) ptr @_ZStlsIN7Logging13LoggerMessageEA31_cEOT_S4_RKT0_(ptr noundef nonnull align 8 dereferenceable(161) %14, ptr noundef nonnull align 1 dereferenceable(31) @.str.61)
          to label %124 unwind label %142

124:                                              ; preds = %122
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #10
  %125 = load ptr, ptr %13, align 8, !tbaa !5
  %126 = load ptr, ptr %125, align 8, !tbaa !32
  %127 = getelementptr inbounds ptr, ptr %126, i64 2
  %128 = load ptr, ptr %127, align 8
  %129 = call noundef ptr %128(ptr noundef nonnull align 8 dereferenceable(8) %125) #10
  store ptr %129, ptr %15, align 8, !tbaa !5
  %130 = invoke noundef nonnull align 8 dereferenceable(161) ptr @_ZStlsIN7Logging13LoggerMessageEPKcEOT_S5_RKT0_(ptr noundef nonnull align 8 dereferenceable(161) %123, ptr noundef nonnull align 8 dereferenceable(8) %15)
          to label %131 unwind label %146

131:                                              ; preds = %124
  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
  %132 = invoke { i32, ptr } @_Z15make_error_codeN7DynexCN5error16WalletErrorCodesE(i32 noundef 5)
          to label %133 unwind label %152

133:                                              ; preds = %131
  %134 = getelementptr inbounds { i32, ptr }, ptr %3, i32 0, i32 0
  %135 = extractvalue { i32, ptr } %132, 0
  store i32 %135, ptr %134, align 8
  %136 = getelementptr inbounds { i32, ptr }, ptr %3, i32 0, i32 1
  %137 = extractvalue { i32, ptr } %132, 1
  store ptr %137, ptr %136, align 8
  store i32 1, ptr %11, align 4
  call void @__cxa_end_catch()
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #10
  br label %174

138:                                              ; preds = %118
  %139 = landingpad { ptr, i32 }
          cleanup
  %140 = extractvalue { ptr, i32 } %139, 0
  store ptr %140, ptr %7, align 8
  %141 = extractvalue { ptr, i32 } %139, 1
  store i32 %141, ptr %8, align 4
  br label %151

142:                                              ; preds = %122
  %143 = landingpad { ptr, i32 }
          cleanup
  %144 = extractvalue { ptr, i32 } %143, 0
  store ptr %144, ptr %7, align 8
  %145 = extractvalue { ptr, i32 } %143, 1
  store i32 %145, ptr %8, align 4
  br label %150

146:                                              ; preds = %124
  %147 = landingpad { ptr, i32 }
          cleanup
  %148 = extractvalue { ptr, i32 } %147, 0
  store ptr %148, ptr %7, align 8
  %149 = extractvalue { ptr, i32 } %147, 1
  store i32 %149, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #10
  br label %150

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

151:                                              ; preds = %150, %138
  call void @llvm.lifetime.end.p0(i64 432, ptr %14) #10
  br label %156

152:                                              ; preds = %131
  %153 = landingpad { ptr, i32 }
          cleanup
  %154 = extractvalue { ptr, i32 } %153, 0
  store ptr %154, ptr %7, align 8
  %155 = extractvalue { ptr, i32 } %153, 1
  store i32 %155, ptr %8, align 4
  br label %156

156:                                              ; preds = %152, %151
  invoke void @__cxa_end_catch()
          to label %157 unwind label %181

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

158:                                              ; preds = %99
  %159 = landingpad { ptr, i32 }
          cleanup
  %160 = extractvalue { ptr, i32 } %159, 0
  store ptr %160, ptr %7, align 8
  %161 = extractvalue { ptr, i32 } %159, 1
  store i32 %161, ptr %8, align 4
  br label %171

162:                                              ; preds = %103
  %163 = landingpad { ptr, i32 }
          cleanup
  %164 = extractvalue { ptr, i32 } %163, 0
  store ptr %164, ptr %7, align 8
  %165 = extractvalue { ptr, i32 } %163, 1
  store i32 %165, ptr %8, align 4
  br label %170

166:                                              ; preds = %105
  %167 = landingpad { ptr, i32 }
          cleanup
  %168 = extractvalue { ptr, i32 } %167, 0
  store ptr %168, ptr %7, align 8
  %169 = extractvalue { ptr, i32 } %167, 1
  store i32 %169, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #10
  br label %170

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

171:                                              ; preds = %170, %158
  call void @llvm.lifetime.end.p0(i64 432, ptr %17) #10
  invoke void @__cxa_end_catch()
          to label %172 unwind label %181

172:                                              ; preds = %171
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #10
  br label %176

173:                                              ; preds = %83
  call void @_ZNSt10error_codeC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %3) #10
  br label %174

174:                                              ; preds = %173, %133, %112, %81
  %175 = load { i32, ptr }, ptr %3, align 8
  ret { i32, ptr } %175

176:                                              ; preds = %172, %157, %115
  %177 = load ptr, ptr %7, align 8
  %178 = load i32, ptr %8, align 4
  %179 = insertvalue { ptr, i32 } poison, ptr %177, 0
  %180 = insertvalue { ptr, i32 } %179, i32 %178, 1
  resume { ptr, i32 } %180

181:                                              ; preds = %171, %156
  %182 = landingpad { ptr, i32 }
          catch ptr null
  %183 = extractvalue { ptr, i32 } %182, 0
  call void @__clang_call_terminate(ptr %183) #11
  unreachable

184:                                              ; preds = %81
  unreachable
}

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(161) ptr @_ZStlsIN7Logging13LoggerMessageEA31_cEOT_S4_RKT0_(ptr noundef nonnull align 8 dereferenceable(161), ptr noundef nonnull align 1 dereferenceable(31)) #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, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !13, i64 48}
!12 = !{!"_ZTSN14PaymentService13WalletServiceE", !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !13, i64 48, !14, i64 56, !6, i64 96, !18, i64 104, !19, i64 136, !21, i64 176}
!13 = !{!"bool", !7, i64 0}
!14 = !{!"_ZTSN7Logging9LoggerRefE", !6, i64 0, !15, i64 8}
!15 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !16, i64 0, !17, i64 8, !7, i64 16}
!16 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!17 = !{!"long", !7, i64 0}
!18 = !{!"_ZTSN6System5EventE", !6, i64 0, !13, i64 8, !6, i64 16, !6, i64 24}
!19 = !{!"_ZTSN6System12ContextGroupE", !6, i64 0, !20, i64 8}
!20 = !{!"_ZTSN6System18NativeContextGroupE", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!21 = !{!"_ZTSSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmSt4lessIS5_ESaISt4pairIKS5_mEEE", !22, i64 0}
!22 = !{!"_ZTSSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_mESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EE", !23, i64 0}
!23 = !{!"_ZTSNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_mESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EE13_Rb_tree_implISC_Lb1EEE", !24, i64 0, !26, i64 8}
!24 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEE", !25, i64 0}
!25 = !{!"_ZTSSt4lessINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE"}
!26 = !{!"_ZTSSt15_Rb_tree_header", !27, i64 0, !17, i64 32}
!27 = !{!"_ZTSSt18_Rb_tree_node_base", !28, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!28 = !{!"_ZTSSt14_Rb_tree_color", !7, i64 0}
!29 = !{i8 0, i8 2}
!30 = !{}
!31 = !{!12, !6, i64 16}
!32 = !{!33, !33, i64 0}
!33 = !{!"vtable pointer", !8, i64 0}
!34 = !{i64 0, i64 4, !9, i64 8, i64 8, !5}


; 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.56 = external hidden unnamed_addr constant [52 x i8], align 1
@.str.59 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.60 = external hidden unnamed_addr constant [53 x i8], align 1
@.str.61 = external hidden unnamed_addr constant [31 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 @_ZStlsIN7Logging13LoggerMessageEA53_cEOT_S4_RKT0_(ptr noundef nonnull align 8 dereferenceable(161), ptr noundef nonnull align 1 dereferenceable(53)) local_unnamed_addr #5

; 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

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: 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
define dso_local { i32, ptr } @_ZN14PaymentService13WalletService11resetWalletEj(ptr noundef nonnull align 8 dereferenceable(224) %0, i32 noundef %1) local_unnamed_addr #9 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.std::error_code", align 8
  %4 = alloca i32, align 4
  %5 = alloca %"class.System::EventLock", align 8
  %6 = alloca %"class.Logging::LoggerMessage", align 8
  %7 = alloca %"class.Logging::LoggerMessage", align 8
  %8 = alloca %"class.Logging::LoggerMessage", align 8
  %9 = alloca %"class.Logging::LoggerMessage", align 8
  %10 = alloca ptr, align 8
  %11 = alloca %"class.Logging::LoggerMessage", align 8
  %12 = alloca ptr, align 8
  store i32 %1, ptr %4, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #10
  %13 = getelementptr inbounds i8, ptr %0, i64 104
  invoke void @_ZN6System9EventLockC1ERNS_5EventE(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(32) %13)
          to label %14 unwind label %25

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

16:                                               ; preds = %14
  %17 = invoke noundef nonnull align 8 dereferenceable(161) ptr @_ZStlsIN7Logging13LoggerMessageEA17_cEOT_S4_RKT0_(ptr noundef nonnull align 8 dereferenceable(161) %6, ptr noundef nonnull align 1 dereferenceable(17) @.str.59)
          to label %18 unwind label %29

18:                                               ; preds = %16
  call void @_ZN7Logging13LoggerMessageD1Ev(ptr noundef nonnull align 8 dereferenceable(161) %6) #10
  call void @llvm.lifetime.end.p0(i64 432, ptr nonnull %6) #10
  %19 = getelementptr inbounds i8, ptr %0, i64 48
  %20 = load i8, ptr %19, align 8, !tbaa !9, !range !28, !noundef !29
  %21 = trunc nuw i8 %20 to i1
  br i1 %21, label %39, label %22

22:                                               ; preds = %18
  call void @llvm.lifetime.start.p0(i64 432, ptr nonnull %7) #10
  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) %15, i32 noundef 2, ptr noundef nonnull align 8 dereferenceable(32) @_ZN7Logging13BRIGHT_YELLOWB5cxx11E)
          to label %23 unwind label %32

23:                                               ; preds = %22
  %24 = invoke noundef nonnull align 8 dereferenceable(161) ptr @_ZStlsIN7Logging13LoggerMessageEA52_cEOT_S4_RKT0_(ptr noundef nonnull align 8 dereferenceable(161) %7, ptr noundef nonnull align 1 dereferenceable(52) @.str.56)
          to label %51 unwind label %34

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

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

29:                                               ; preds = %16
  %30 = 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 %31

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

32:                                               ; preds = %22
  %33 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt12system_error
          catch ptr @_ZTISt9exception
  br label %36

34:                                               ; preds = %23
  %35 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt12system_error
          catch ptr @_ZTISt9exception
  call void @_ZN7Logging13LoggerMessageD1Ev(ptr noundef nonnull align 8 dereferenceable(161) %7) #10
  br label %36

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

37:                                               ; preds = %39
  %38 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt12system_error
          catch ptr @_ZTISt9exception
  br label %61

39:                                               ; preds = %18
  %40 = getelementptr inbounds i8, ptr %0, i64 16
  %41 = load ptr, ptr %40, align 8, !tbaa !30
  %42 = zext i32 %1 to i64
  %43 = load ptr, ptr %41, align 8, !tbaa !31
  %44 = getelementptr inbounds i8, ptr %43, i64 88
  %45 = load ptr, ptr %44, align 8
  invoke void %45(ptr noundef nonnull align 8 dereferenceable(8) %41, i64 noundef %42)
          to label %46 unwind label %37

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

47:                                               ; preds = %46
  %48 = invoke noundef nonnull align 8 dereferenceable(161) ptr @_ZStlsIN7Logging13LoggerMessageEA53_cEOT_S4_RKT0_(ptr noundef nonnull align 8 dereferenceable(161) %8, ptr noundef nonnull align 1 dereferenceable(53) @.str.60)
          to label %49 unwind label %58

49:                                               ; preds = %47
  %50 = invoke noundef nonnull align 8 dereferenceable(161) ptr @_ZStlsIN7Logging13LoggerMessageEjEOT_S3_RKT0_(ptr noundef nonnull align 8 dereferenceable(161) %48, ptr noundef nonnull align 4 dereferenceable(4) %4)
          to label %113 unwind label %58

51:                                               ; preds = %23
  call void @_ZN7Logging13LoggerMessageD1Ev(ptr noundef nonnull align 8 dereferenceable(161) %7) #10
  call void @llvm.lifetime.end.p0(i64 432, ptr nonnull %7) #10
  %52 = call { i32, ptr } @_Z15make_error_codeN7DynexCN5error16WalletErrorCodesE(i32 noundef 1)
  %53 = extractvalue { i32, ptr } %52, 0
  store i32 %53, ptr %3, align 8
  %54 = getelementptr inbounds i8, ptr %3, i64 8
  %55 = extractvalue { i32, ptr } %52, 1
  store ptr %55, ptr %54, align 8
  call void @_ZN6System9EventLockD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %5) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #10
  br label %114

56:                                               ; preds = %46
  %57 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt12system_error
          catch ptr @_ZTISt9exception
  br label %60

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

60:                                               ; preds = %58, %56
  %.pn23 = phi { ptr, i32 } [ %59, %58 ], [ %57, %56 ]
  call void @llvm.lifetime.end.p0(i64 432, ptr nonnull %8) #10
  br label %61

61:                                               ; preds = %60, %37, %36, %31
  %.pn23.pn = phi { ptr, i32 } [ %.pn23, %60 ], [ %38, %37 ], [ %.pn21, %36 ], [ %.pn, %31 ]
  call void @_ZN6System9EventLockD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %5) #10
  br label %62

62:                                               ; preds = %61, %25
  %.pn23.pn.pn = phi { ptr, i32 } [ %.pn23.pn, %61 ], [ %26, %25 ]
  %.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 %5) #10
  %63 = call i32 @llvm.eh.typeid.for.p0(ptr nonnull @_ZTISt12system_error) #10
  %64 = icmp eq i32 %.413, %63
  br i1 %64, label %65, label %78

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

68:                                               ; preds = %65
  %69 = invoke noundef nonnull align 8 dereferenceable(161) ptr @_ZStlsIN7Logging13LoggerMessageEA31_cEOT_S4_RKT0_(ptr noundef nonnull align 8 dereferenceable(161) %11, ptr noundef nonnull align 1 dereferenceable(31) @.str.61)
          to label %70 unwind label %107

70:                                               ; preds = %68
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #10
  %71 = load ptr, ptr %66, align 8, !tbaa !31
  %72 = getelementptr inbounds i8, ptr %71, i64 16
  %73 = load ptr, ptr %72, align 8
  %74 = call noundef ptr %73(ptr noundef nonnull align 8 dereferenceable(16) %66) #10
  store ptr %74, ptr %12, align 8, !tbaa !33
  %75 = invoke noundef nonnull align 8 dereferenceable(161) ptr @_ZStlsIN7Logging13LoggerMessageEPKcEOT_S5_RKT0_(ptr noundef nonnull align 8 dereferenceable(161) %69, ptr noundef nonnull align 8 dereferenceable(8) %12)
          to label %76 unwind label %109

76:                                               ; preds = %70
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #10
  call void @_ZN7Logging13LoggerMessageD1Ev(ptr noundef nonnull align 8 dereferenceable(161) %11) #10
  call void @llvm.lifetime.end.p0(i64 432, ptr nonnull %11) #10
  %77 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt12system_error4codeEv(ptr noundef nonnull align 8 dereferenceable(32) %66) #10
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %3, ptr noundef nonnull align 8 dereferenceable(16) %77, i64 16, i1 false), !tbaa.struct !34
  call void @__cxa_end_catch()
  br label %114

78:                                               ; preds = %62
  %79 = call i32 @llvm.eh.typeid.for.p0(ptr nonnull @_ZTISt9exception) #10
  %80 = icmp eq i32 %.413, %79
  br i1 %80, label %81, label %115

81:                                               ; preds = %78
  %82 = call ptr @__cxa_begin_catch(ptr %.4) #10
  call void @llvm.lifetime.start.p0(i64 432, ptr nonnull %9) #10
  %83 = 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) %83, i32 noundef 2, ptr noundef nonnull align 8 dereferenceable(32) @_ZN7Logging13BRIGHT_YELLOWB5cxx11E)
          to label %84 unwind label %97

84:                                               ; preds = %81
  %85 = invoke noundef nonnull align 8 dereferenceable(161) ptr @_ZStlsIN7Logging13LoggerMessageEA31_cEOT_S4_RKT0_(ptr noundef nonnull align 8 dereferenceable(161) %9, ptr noundef nonnull align 1 dereferenceable(31) @.str.61)
          to label %86 unwind label %99

86:                                               ; preds = %84
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #10
  %87 = load ptr, ptr %82, align 8, !tbaa !31
  %88 = getelementptr inbounds i8, ptr %87, i64 16
  %89 = load ptr, ptr %88, align 8
  %90 = call noundef ptr %89(ptr noundef nonnull align 8 dereferenceable(8) %82) #10
  store ptr %90, ptr %10, align 8, !tbaa !33
  %91 = invoke noundef nonnull align 8 dereferenceable(161) ptr @_ZStlsIN7Logging13LoggerMessageEPKcEOT_S5_RKT0_(ptr noundef nonnull align 8 dereferenceable(161) %85, ptr noundef nonnull align 8 dereferenceable(8) %10)
          to label %92 unwind label %101

92:                                               ; preds = %86
  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
  %93 = call { i32, ptr } @_Z15make_error_codeN7DynexCN5error16WalletErrorCodesE(i32 noundef 5)
  %94 = extractvalue { i32, ptr } %93, 0
  store i32 %94, ptr %3, align 8
  %95 = getelementptr inbounds i8, ptr %3, i64 8
  %96 = extractvalue { i32, ptr } %93, 1
  store ptr %96, ptr %95, align 8
  call void @__cxa_end_catch()
  br label %114

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

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

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

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

104:                                              ; preds = %103, %97
  %.pn27.pn = phi { ptr, i32 } [ %.pn27, %103 ], [ %98, %97 ]
  call void @llvm.lifetime.end.p0(i64 432, ptr nonnull %9) #10
  invoke void @__cxa_end_catch()
          to label %115 unwind label %116

105:                                              ; preds = %65
  %106 = landingpad { ptr, i32 }
          cleanup
  br label %112

107:                                              ; preds = %68
  %108 = landingpad { ptr, i32 }
          cleanup
  br label %111

109:                                              ; preds = %70
  %110 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #10
  br label %111

111:                                              ; preds = %109, %107
  %.pn30 = phi { ptr, i32 } [ %110, %109 ], [ %108, %107 ]
  call void @_ZN7Logging13LoggerMessageD1Ev(ptr noundef nonnull align 8 dereferenceable(161) %11) #10
  br label %112

112:                                              ; preds = %111, %105
  %.pn30.pn = phi { ptr, i32 } [ %.pn30, %111 ], [ %106, %105 ]
  call void @llvm.lifetime.end.p0(i64 432, ptr nonnull %11) #10
  invoke void @__cxa_end_catch()
          to label %115 unwind label %116

113:                                              ; preds = %49
  call void @_ZN7Logging13LoggerMessageD1Ev(ptr noundef nonnull align 8 dereferenceable(161) %8) #10
  call void @llvm.lifetime.end.p0(i64 432, ptr nonnull %8) #10
  call void @_ZN6System9EventLockD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %5) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #10
  call void @_ZNSt10error_codeC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %3) #10
  br label %114

114:                                              ; preds = %51, %113, %92, %76
  %.fca.0.load = load i32, ptr %3, align 8
  %.fca.0.insert = insertvalue { i32, ptr } poison, i32 %.fca.0.load, 0
  %.fca.1.gep = getelementptr inbounds i8, ptr %3, 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

115:                                              ; preds = %112, %104, %78
  %.merged = phi { ptr, i32 } [ %.pn23.pn.pn, %78 ], [ %.pn27.pn, %104 ], [ %.pn30.pn, %112 ]
  resume { ptr, i32 } %.merged

116:                                              ; preds = %112, %104
  %117 = landingpad { ptr, i32 }
          catch ptr null
  %118 = extractvalue { ptr, i32 } %117, 0
  call void @__clang_call_terminate(ptr %118) #11
  unreachable
}

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(161) ptr @_ZStlsIN7Logging13LoggerMessageEA31_cEOT_S4_RKT0_(ptr noundef nonnull align 8 dereferenceable(161), ptr noundef nonnull align 1 dereferenceable(31)) 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, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !12, i64 48}
!10 = !{!"_ZTSN14PaymentService13WalletServiceE", !11, i64 8, !11, i64 16, !11, i64 24, !11, i64 32, !11, i64 40, !12, i64 48, !13, i64 56, !11, i64 96, !17, i64 104, !18, i64 136, !20, i64 176}
!11 = !{!"any pointer", !7, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{!"_ZTSN7Logging9LoggerRefE", !11, i64 0, !14, i64 8}
!14 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !15, i64 0, !16, i64 8, !7, i64 16}
!15 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !11, i64 0}
!16 = !{!"long", !7, i64 0}
!17 = !{!"_ZTSN6System5EventE", !11, i64 0, !12, i64 8, !11, i64 16, !11, i64 24}
!18 = !{!"_ZTSN6System12ContextGroupE", !11, i64 0, !19, i64 8}
!19 = !{!"_ZTSN6System18NativeContextGroupE", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24}
!20 = !{!"_ZTSSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmSt4lessIS5_ESaISt4pairIKS5_mEEE", !21, i64 0}
!21 = !{!"_ZTSSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_mESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EE", !22, i64 0}
!22 = !{!"_ZTSNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_mESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EE13_Rb_tree_implISC_Lb1EEE", !23, i64 0, !25, i64 8}
!23 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEE", !24, i64 0}
!24 = !{!"_ZTSSt4lessINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE"}
!25 = !{!"_ZTSSt15_Rb_tree_header", !26, i64 0, !16, i64 32}
!26 = !{!"_ZTSSt18_Rb_tree_node_base", !27, i64 0, !11, i64 8, !11, i64 16, !11, i64 24}
!27 = !{!"_ZTSSt14_Rb_tree_color", !7, i64 0}
!28 = !{i8 0, i8 2}
!29 = !{}
!30 = !{!10, !11, i64 16}
!31 = !{!32, !32, i64 0}
!32 = !{!"vtable pointer", !8, i64 0}
!33 = !{!11, !11, i64 0}
!34 = !{i64 0, i64 4, !5, i64 8, i64 8, !33}


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