; LLVM IR from dynexcoin/Dynex :: src/DynexCNCore/Currency.ll (ZNK7DynexCN8Currency14getBlockRewardEjhmmmmRmRl)

; 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.DynexCN::Currency" = type { i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i32, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i32, i32, i32, i32, i32, i32, %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string", i8, %"struct.DynexCN::Block", %"struct.Crypto::Hash", %"class.Logging::LoggerRef" }
%"struct.DynexCN::Block" = type { %"struct.DynexCN::BlockHeader", %"struct.DynexCN::ParentBlock", %"struct.DynexCN::Transaction", %"class.std::vector.7" }
%"struct.DynexCN::BlockHeader" = type { i8, i8, i32, i64, %"struct.Crypto::Hash" }
%"struct.DynexCN::ParentBlock" = type { i8, i8, %"struct.Crypto::Hash", i16, %"class.std::vector.7", %"struct.DynexCN::Transaction", %"class.std::vector.7" }
%"struct.DynexCN::Transaction" = type { %"struct.DynexCN::TransactionPrefix", %"class.std::vector.27" }
%"struct.DynexCN::TransactionPrefix" = type { i8, i64, %"class.std::vector.12", %"class.std::vector.17", %"class.std::vector.22" }
%"class.std::vector.12" = type { %"struct.std::_Vector_base.13" }
%"struct.std::_Vector_base.13" = type { %"struct.std::_Vector_base<boost::variant<DynexCN::BaseInput, DynexCN::KeyInput, DynexCN::MultisignatureInput>, std::allocator<boost::variant<DynexCN::BaseInput, DynexCN::KeyInput, DynexCN::MultisignatureInput>>>::_Vector_impl" }
%"struct.std::_Vector_base<boost::variant<DynexCN::BaseInput, DynexCN::KeyInput, DynexCN::MultisignatureInput>, std::allocator<boost::variant<DynexCN::BaseInput, DynexCN::KeyInput, DynexCN::MultisignatureInput>>>::_Vector_impl" = type { %"struct.std::_Vector_base<boost::variant<DynexCN::BaseInput, DynexCN::KeyInput, DynexCN::MultisignatureInput>, std::allocator<boost::variant<DynexCN::BaseInput, DynexCN::KeyInput, DynexCN::MultisignatureInput>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<boost::variant<DynexCN::BaseInput, DynexCN::KeyInput, DynexCN::MultisignatureInput>, std::allocator<boost::variant<DynexCN::BaseInput, DynexCN::KeyInput, DynexCN::MultisignatureInput>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.17" = type { %"struct.std::_Vector_base.18" }
%"struct.std::_Vector_base.18" = type { %"struct.std::_Vector_base<DynexCN::TransactionOutput, std::allocator<DynexCN::TransactionOutput>>::_Vector_impl" }
%"struct.std::_Vector_base<DynexCN::TransactionOutput, std::allocator<DynexCN::TransactionOutput>>::_Vector_impl" = type { %"struct.std::_Vector_base<DynexCN::TransactionOutput, std::allocator<DynexCN::TransactionOutput>>::_Vector_impl_data" }
%"struct.std::_Vector_base<DynexCN::TransactionOutput, std::allocator<DynexCN::TransactionOutput>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.22" = type { %"struct.std::_Vector_base.23" }
%"struct.std::_Vector_base.23" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.27" = type { %"struct.std::_Vector_base.28" }
%"struct.std::_Vector_base.28" = type { %"struct.std::_Vector_base<std::vector<Crypto::Signature>, std::allocator<std::vector<Crypto::Signature>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<Crypto::Signature>, std::allocator<std::vector<Crypto::Signature>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<Crypto::Signature>, std::allocator<std::vector<Crypto::Signature>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<Crypto::Signature>, std::allocator<std::vector<Crypto::Signature>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.7" = type { %"struct.std::_Vector_base.8" }
%"struct.std::_Vector_base.8" = type { %"struct.std::_Vector_base<Crypto::Hash, std::allocator<Crypto::Hash>>::_Vector_impl" }
%"struct.std::_Vector_base<Crypto::Hash, std::allocator<Crypto::Hash>>::_Vector_impl" = type { %"struct.std::_Vector_base<Crypto::Hash, std::allocator<Crypto::Hash>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Crypto::Hash, std::allocator<Crypto::Hash>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.Crypto::Hash" = type { [32 x i8] }
%"class.Logging::LoggerRef" = type { ptr, %"class.std::__cxx11::basic_string" }

@.str.8 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [78 x i8], align 1
@__PRETTY_FUNCTION__._ZNK7DynexCN8Currency14getBlockRewardEjhmmmmRmRl = external hidden unnamed_addr constant [123 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [75 x i8], align 1
@_ZN7Logging7DEFAULTB5cxx11E = external global %"class.std::__cxx11::basic_string", align 8
@.str.11 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [5 x i8], align 1
@_ZN7DynexCNL15CRYPTONOTE_NAMEE = external hidden constant [6 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [22 x i8], align 1

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

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

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK7DynexCN8Currency40blockGrantedFullRewardZoneByBlockVersionEh(ptr noundef nonnull align 8 dereferenceable(984), i8 noundef zeroext) #3 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZNK7DynexCN8Currency14getBlockRewardEjhmmmmRmRl(ptr noundef nonnull align 8 dereferenceable(984) %0, i32 noundef %1, i8 noundef zeroext %2, i64 noundef %3, i64 noundef %4, i64 noundef %5, i64 noundef %6, ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8) #4 align 2 personality ptr @__gxx_personality_v0 {
  %10 = alloca i1, align 1
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca i8, align 1
  %14 = alloca i64, align 8
  %15 = alloca i64, align 8
  %16 = alloca i64, align 8
  %17 = alloca i64, align 8
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  %20 = alloca i64, align 8
  %21 = alloca %"class.Logging::LoggerMessage", align 8
  %22 = alloca ptr, align 8
  %23 = alloca i32, align 4
  %24 = alloca i64, align 8
  %25 = alloca %"class.Logging::LoggerMessage", align 8
  %26 = alloca i64, align 8
  %27 = alloca i32, align 4
  %28 = alloca i64, align 8
  %29 = alloca i64, align 8
  store ptr %0, ptr %11, align 8, !tbaa !5
  store i32 %1, ptr %12, align 4, !tbaa !9
  store i8 %2, ptr %13, align 1, !tbaa !11
  store i64 %3, ptr %14, align 8, !tbaa !12
  store i64 %4, ptr %15, align 8, !tbaa !12
  store i64 %5, ptr %16, align 8, !tbaa !12
  store i64 %6, ptr %17, align 8, !tbaa !12
  store ptr %7, ptr %18, align 8, !tbaa !5
  store ptr %8, ptr %19, align 8, !tbaa !5
  %30 = load ptr, ptr %11, align 8
  %31 = load i64, ptr %16, align 8, !tbaa !12
  %32 = getelementptr inbounds %"class.DynexCN::Currency", ptr %30, i32 0, i32 12
  %33 = load i64, ptr %32, align 8, !tbaa !14
  %34 = icmp ule i64 %31, %33
  br i1 %34, label %35, label %36

35:                                               ; preds = %9
  br label %38

36:                                               ; preds = %9
  call void @__assert_fail(ptr noundef @.str.8, ptr noundef @.str.9, i32 noundef 165, ptr noundef @__PRETTY_FUNCTION__._ZNK7DynexCN8Currency14getBlockRewardEjhmmmmRmRl) #8
  unreachable

37:                                               ; No predecessors!
  br label %38

38:                                               ; preds = %37, %35
  %39 = getelementptr inbounds %"class.DynexCN::Currency", ptr %30, i32 0, i32 13
  %40 = load i32, ptr %39, align 8, !tbaa !47
  %41 = icmp ugt i32 %40, 0
  br i1 %41, label %42, label %47

42:                                               ; preds = %38
  %43 = getelementptr inbounds %"class.DynexCN::Currency", ptr %30, i32 0, i32 13
  %44 = load i32, ptr %43, align 8, !tbaa !47
  %45 = zext i32 %44 to i64
  %46 = icmp ule i64 %45, 64
  br label %47

47:                                               ; preds = %42, %38
  %48 = phi i1 [ false, %38 ], [ %46, %42 ]
  br i1 %48, label %49, label %50

49:                                               ; preds = %47
  br label %52

50:                                               ; preds = %47
  call void @__assert_fail(ptr noundef @.str.10, ptr noundef @.str.9, i32 noundef 166, ptr noundef @__PRETTY_FUNCTION__._ZNK7DynexCN8Currency14getBlockRewardEjhmmmmRmRl) #8
  unreachable

51:                                               ; No predecessors!
  br label %52

52:                                               ; preds = %51, %49
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #9
  %53 = getelementptr inbounds %"class.DynexCN::Currency", ptr %30, i32 0, i32 12
  %54 = load i64, ptr %53, align 8, !tbaa !14
  %55 = load i64, ptr %16, align 8, !tbaa !12
  %56 = sub i64 %54, %55
  %57 = getelementptr inbounds %"class.DynexCN::Currency", ptr %30, i32 0, i32 13
  %58 = load i32, ptr %57, align 8, !tbaa !47
  %59 = zext i32 %58 to i64
  %60 = lshr i64 %56, %59
  store i64 %60, ptr %20, align 8, !tbaa !12
  %61 = load i64, ptr %16, align 8, !tbaa !12
  %62 = icmp eq i64 %61, 0
  br i1 %62, label %63, label %83

63:                                               ; preds = %52
  %64 = getelementptr inbounds %"class.DynexCN::Currency", ptr %30, i32 0, i32 14
  %65 = load i64, ptr %64, align 8, !tbaa !48
  %66 = icmp ne i64 %65, 0
  br i1 %66, label %67, label %83

67:                                               ; preds = %63
  %68 = getelementptr inbounds %"class.DynexCN::Currency", ptr %30, i32 0, i32 14
  %69 = load i64, ptr %68, align 8, !tbaa !48
  store i64 %69, ptr %20, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 432, ptr %21) #9
  %70 = getelementptr inbounds %"class.DynexCN::Currency", ptr %30, i32 0, i32 56
  call void @_ZNK7Logging9LoggerRefclENS_5LevelERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr dead_on_unwind writable sret(%"class.Logging::LoggerMessage") align 8 %21, ptr noundef nonnull align 8 dereferenceable(40) %70, i32 noundef 3, ptr noundef nonnull align 8 dereferenceable(32) @_ZN7Logging7DEFAULTB5cxx11E)
  %71 = invoke noundef nonnull align 8 dereferenceable(161) ptr @_ZStlsIN7Logging13LoggerMessageEA23_cEOT_S4_RKT0_(ptr noundef nonnull align 8 dereferenceable(161) %21, ptr noundef nonnull align 1 dereferenceable(23) @.str.11)
          to label %72 unwind label %79

72:                                               ; preds = %67
  %73 = invoke noundef nonnull align 8 dereferenceable(161) ptr @_ZStlsIN7Logging13LoggerMessageEmEOT_S3_RKT0_(ptr noundef nonnull align 8 dereferenceable(161) %71, ptr noundef nonnull align 8 dereferenceable(8) %20)
          to label %74 unwind label %79

74:                                               ; preds = %72
  %75 = invoke noundef nonnull align 8 dereferenceable(161) ptr @_ZStlsIN7Logging13LoggerMessageEA5_cEOT_S4_RKT0_(ptr noundef nonnull align 8 dereferenceable(161) %73, ptr noundef nonnull align 1 dereferenceable(5) @.str.12)
          to label %76 unwind label %79

76:                                               ; preds = %74
  %77 = invoke noundef nonnull align 8 dereferenceable(161) ptr @_ZStlsIN7Logging13LoggerMessageEA6_cEOT_S4_RKT0_(ptr noundef nonnull align 8 dereferenceable(161) %75, ptr noundef nonnull align 1 dereferenceable(6) @_ZN7DynexCNL15CRYPTONOTE_NAMEE)
          to label %78 unwind label %79

78:                                               ; preds = %76
  call void @_ZN7Logging13LoggerMessageD1Ev(ptr noundef nonnull align 8 dereferenceable(161) %21) #9
  call void @llvm.lifetime.end.p0(i64 432, ptr %21) #9
  br label %83

79:                                               ; preds = %76, %74, %72, %67
  %80 = landingpad { ptr, i32 }
          cleanup
  %81 = extractvalue { ptr, i32 } %80, 0
  store ptr %81, ptr %22, align 8
  %82 = extractvalue { ptr, i32 } %80, 1
  store i32 %82, ptr %23, align 4
  call void @_ZN7Logging13LoggerMessageD1Ev(ptr noundef nonnull align 8 dereferenceable(161) %21) #9
  call void @llvm.lifetime.end.p0(i64 432, ptr %21) #9
  br label %150

83:                                               ; preds = %78, %63, %52
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #9
  %84 = load i8, ptr %13, align 1, !tbaa !11
  %85 = call noundef i64 @_ZNK7DynexCN8Currency40blockGrantedFullRewardZoneByBlockVersionEh(ptr noundef nonnull align 8 dereferenceable(984) %30, i8 noundef zeroext %84)
  store i64 %85, ptr %24, align 8, !tbaa !12
  %86 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxImERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(8) %24)
  %87 = load i64, ptr %86, align 8, !tbaa !12
  store i64 %87, ptr %14, align 8, !tbaa !12
  %88 = load i64, ptr %15, align 8, !tbaa !12
  %89 = load i64, ptr %14, align 8, !tbaa !12
  %90 = mul i64 2, %89
  %91 = icmp ugt i64 %88, %90
  br i1 %91, label %92, label %113

92:                                               ; preds = %83
  call void @llvm.lifetime.start.p0(i64 432, ptr %25) #9
  %93 = getelementptr inbounds %"class.DynexCN::Currency", ptr %30, i32 0, i32 56
  call void @_ZNK7Logging9LoggerRefclENS_5LevelERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr dead_on_unwind writable sret(%"class.Logging::LoggerMessage") align 8 %25, ptr noundef nonnull align 8 dereferenceable(40) %93, i32 noundef 5, ptr noundef nonnull align 8 dereferenceable(32) @_ZN7Logging7DEFAULTB5cxx11E)
  %94 = invoke noundef nonnull align 8 dereferenceable(161) ptr @_ZStlsIN7Logging13LoggerMessageEA35_cEOT_S4_RKT0_(ptr noundef nonnull align 8 dereferenceable(161) %25, ptr noundef nonnull align 1 dereferenceable(35) @.str.13)
          to label %95 unwind label %104

95:                                               ; preds = %92
  %96 = invoke noundef nonnull align 8 dereferenceable(161) ptr @_ZStlsIN7Logging13LoggerMessageEmEOT_S3_RKT0_(ptr noundef nonnull align 8 dereferenceable(161) %94, ptr noundef nonnull align 8 dereferenceable(8) %15)
          to label %97 unwind label %104

97:                                               ; preds = %95
  %98 = invoke noundef nonnull align 8 dereferenceable(161) ptr @_ZStlsIN7Logging13LoggerMessageEA22_cEOT_S4_RKT0_(ptr noundef nonnull align 8 dereferenceable(161) %96, ptr noundef nonnull align 1 dereferenceable(22) @.str.14)
          to label %99 unwind label %104

99:                                               ; preds = %97
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #9
  %100 = load i64, ptr %14, align 8, !tbaa !12
  %101 = mul i64 2, %100
  store i64 %101, ptr %26, align 8, !tbaa !12
  %102 = invoke noundef nonnull align 8 dereferenceable(161) ptr @_ZStlsIN7Logging13LoggerMessageEmEOT_S3_RKT0_(ptr noundef nonnull align 8 dereferenceable(161) %98, ptr noundef nonnull align 8 dereferenceable(8) %26)
          to label %103 unwind label %108

103:                                              ; preds = %99
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #9
  call void @_ZN7Logging13LoggerMessageD1Ev(ptr noundef nonnull align 8 dereferenceable(161) %25) #9
  call void @llvm.lifetime.end.p0(i64 432, ptr %25) #9
  store i1 false, ptr %10, align 1
  store i32 1, ptr %27, align 4
  br label %148

104:                                              ; preds = %97, %95, %92
  %105 = landingpad { ptr, i32 }
          cleanup
  %106 = extractvalue { ptr, i32 } %105, 0
  store ptr %106, ptr %22, align 8
  %107 = extractvalue { ptr, i32 } %105, 1
  store i32 %107, ptr %23, align 4
  br label %112

108:                                              ; preds = %99
  %109 = landingpad { ptr, i32 }
          cleanup
  %110 = extractvalue { ptr, i32 } %109, 0
  store ptr %110, ptr %22, align 8
  %111 = extractvalue { ptr, i32 } %109, 1
  store i32 %111, ptr %23, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #9
  br label %112

112:                                              ; preds = %108, %104
  call void @_ZN7Logging13LoggerMessageD1Ev(ptr noundef nonnull align 8 dereferenceable(161) %25) #9
  call void @llvm.lifetime.end.p0(i64 432, ptr %25) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #9
  br label %150

113:                                              ; preds = %83
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #9
  %114 = load i64, ptr %20, align 8, !tbaa !12
  %115 = load i64, ptr %14, align 8, !tbaa !12
  %116 = load i64, ptr %15, align 8, !tbaa !12
  %117 = call noundef i64 @_ZN7DynexCN18getPenalizedAmountEmmm(i64 noundef %114, i64 noundef %115, i64 noundef %116)
  store i64 %117, ptr %28, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #9
  %118 = load i8, ptr %13, align 1, !tbaa !11
  %119 = zext i8 %118 to i32
  %120 = icmp sge i32 %119, 2
  br i1 %120, label %121, label %126

121:                                              ; preds = %113
  %122 = load i64, ptr %17, align 8, !tbaa !12
  %123 = load i64, ptr %14, align 8, !tbaa !12
  %124 = load i64, ptr %15, align 8, !tbaa !12
  %125 = call noundef i64 @_ZN7DynexCN18getPenalizedAmountEmmm(i64 noundef %122, i64 noundef %123, i64 noundef %124)
  br label %128

126:                                              ; preds = %113
  %127 = load i64, ptr %17, align 8, !tbaa !12
  br label %128

128:                                              ; preds = %126, %121
  %129 = phi i64 [ %125, %121 ], [ %127, %126 ]
  store i64 %129, ptr %29, align 8, !tbaa !12
  %130 = call noundef i64 @_ZNK7DynexCN8Currency21cryptonoteCoinVersionEv(ptr noundef nonnull align 8 dereferenceable(984) %30)
  %131 = icmp eq i64 %130, 1
  br i1 %131, label %132, label %137

132:                                              ; preds = %128
  %133 = load i64, ptr %17, align 8, !tbaa !12
  %134 = load i64, ptr %14, align 8, !tbaa !12
  %135 = load i64, ptr %15, align 8, !tbaa !12
  %136 = call noundef i64 @_ZN7DynexCN18getPenalizedAmountEmmm(i64 noundef %133, i64 noundef %134, i64 noundef %135)
  store i64 %136, ptr %29, align 8, !tbaa !12
  br label %137

137:                                              ; preds = %132, %128
  %138 = load i64, ptr %28, align 8, !tbaa !12
  %139 = load i64, ptr %17, align 8, !tbaa !12
  %140 = load i64, ptr %29, align 8, !tbaa !12
  %141 = sub i64 %139, %140
  %142 = sub i64 %138, %141
  %143 = load ptr, ptr %19, align 8, !tbaa !5
  store i64 %142, ptr %143, align 8, !tbaa !12
  %144 = load i64, ptr %28, align 8, !tbaa !12
  %145 = load i64, ptr %29, align 8, !tbaa !12
  %146 = add i64 %144, %145
  %147 = load ptr, ptr %18, align 8, !tbaa !5
  store i64 %146, ptr %147, align 8, !tbaa !12
  store i1 true, ptr %10, align 1
  store i32 1, ptr %27, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #9
  br label %148

148:                                              ; preds = %137, %103
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #9
  %149 = load i1, ptr %10, align 1
  ret i1 %149

150:                                              ; preds = %112, %79
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #9
  br label %151

151:                                              ; preds = %150
  %152 = load ptr, ptr %22, align 8
  %153 = load i32, ptr %23, align 4
  %154 = insertvalue { ptr, i32 } poison, ptr %152, 0
  %155 = insertvalue { ptr, i32 } %154, i32 %153, 1
  resume { ptr, i32 } %155
}

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #5

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(161) ptr @_ZStlsIN7Logging13LoggerMessageEA23_cEOT_S4_RKT0_(ptr noundef nonnull align 8 dereferenceable(161), ptr noundef nonnull align 1 dereferenceable(23)) #6

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxImERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #7

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(161) ptr @_ZStlsIN7Logging13LoggerMessageEA35_cEOT_S4_RKT0_(ptr noundef nonnull align 8 dereferenceable(161), ptr noundef nonnull align 1 dereferenceable(35)) #6

declare noundef i64 @_ZN7DynexCN18getPenalizedAmountEmmm(i64 noundef, i64 noundef, i64 noundef) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK7DynexCN8Currency21cryptonoteCoinVersionEv(ptr noundef nonnull align 8 dereferenceable(984)) #3 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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 #3 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { noreturn 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 #6 = { 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 #7 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #8 = { noreturn nounwind }
attributes #9 = { 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 = !{!7, !7, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"long", !7, i64 0}
!14 = !{!15, !13, i64 96}
!15 = !{!"_ZTSN7DynexCN8CurrencyE", !13, i64 0, !13, i64 8, !13, i64 16, !13, i64 24, !13, i64 32, !13, i64 40, !13, i64 48, !13, i64 56, !13, i64 64, !13, i64 72, !13, i64 80, !13, i64 88, !13, i64 96, !10, i64 104, !13, i64 112, !13, i64 120, !13, i64 128, !13, i64 136, !13, i64 144, !13, i64 152, !13, i64 160, !13, i64 168, !13, i64 176, !13, i64 184, !13, i64 192, !13, i64 200, !13, i64 208, !13, i64 216, !13, i64 224, !13, i64 232, !13, i64 240, !13, i64 248, !13, i64 256, !13, i64 264, !13, i64 272, !13, i64 280, !13, i64 288, !13, i64 296, !13, i64 304, !13, i64 312, !13, i64 320, !13, i64 328, !10, i64 336, !10, i64 340, !10, i64 344, !10, i64 348, !10, i64 352, !10, i64 356, !16, i64 360, !16, i64 392, !16, i64 424, !16, i64 456, !16, i64 488, !18, i64 520, !19, i64 528, !21, i64 912, !46, i64 944}
!16 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !17, i64 0, !13, i64 8, !7, i64 16}
!17 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!18 = !{!"bool", !7, i64 0}
!19 = !{!"_ZTSN7DynexCN5BlockE", !20, i64 0, !22, i64 48, !28, i64 248, !24, i64 360}
!20 = !{!"_ZTSN7DynexCN11BlockHeaderE", !7, i64 0, !7, i64 1, !10, i64 4, !13, i64 8, !21, i64 16}
!21 = !{!"_ZTSN6Crypto4HashE", !7, i64 0}
!22 = !{!"_ZTSN7DynexCN11ParentBlockE", !7, i64 0, !7, i64 1, !21, i64 2, !23, i64 34, !24, i64 40, !28, i64 64, !24, i64 176}
!23 = !{!"short", !7, i64 0}
!24 = !{!"_ZTSSt6vectorIN6Crypto4HashESaIS1_EE", !25, i64 0}
!25 = !{!"_ZTSSt12_Vector_baseIN6Crypto4HashESaIS1_EE", !26, i64 0}
!26 = !{!"_ZTSNSt12_Vector_baseIN6Crypto4HashESaIS1_EE12_Vector_implE", !27, i64 0}
!27 = !{!"_ZTSNSt12_Vector_baseIN6Crypto4HashESaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!28 = !{!"_ZTSN7DynexCN11TransactionE", !29, i64 0, !42, i64 88}
!29 = !{!"_ZTSN7DynexCN17TransactionPrefixE", !7, i64 0, !13, i64 8, !30, i64 16, !34, i64 40, !38, i64 64}
!30 = !{!"_ZTSSt6vectorIN5boost7variantIN7DynexCN9BaseInputEJNS2_8KeyInputENS2_19MultisignatureInputEEEESaIS6_EE", !31, i64 0}
!31 = !{!"_ZTSSt12_Vector_baseIN5boost7variantIN7DynexCN9BaseInputEJNS2_8KeyInputENS2_19MultisignatureInputEEEESaIS6_EE", !32, i64 0}
!32 = !{!"_ZTSNSt12_Vector_baseIN5boost7variantIN7DynexCN9BaseInputEJNS2_8KeyInputENS2_19MultisignatureInputEEEESaIS6_EE12_Vector_implE", !33, i64 0}
!33 = !{!"_ZTSNSt12_Vector_baseIN5boost7variantIN7DynexCN9BaseInputEJNS2_8KeyInputENS2_19MultisignatureInputEEEESaIS6_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!34 = !{!"_ZTSSt6vectorIN7DynexCN17TransactionOutputESaIS1_EE", !35, i64 0}
!35 = !{!"_ZTSSt12_Vector_baseIN7DynexCN17TransactionOutputESaIS1_EE", !36, i64 0}
!36 = !{!"_ZTSNSt12_Vector_baseIN7DynexCN17TransactionOutputESaIS1_EE12_Vector_implE", !37, i64 0}
!37 = !{!"_ZTSNSt12_Vector_baseIN7DynexCN17TransactionOutputESaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!38 = !{!"_ZTSSt6vectorIhSaIhEE", !39, i64 0}
!39 = !{!"_ZTSSt12_Vector_baseIhSaIhEE", !40, i64 0}
!40 = !{!"_ZTSNSt12_Vector_baseIhSaIhEE12_Vector_implE", !41, i64 0}
!41 = !{!"_ZTSNSt12_Vector_baseIhSaIhEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!42 = !{!"_ZTSSt6vectorIS_IN6Crypto9SignatureESaIS1_EESaIS3_EE", !43, i64 0}
!43 = !{!"_ZTSSt12_Vector_baseISt6vectorIN6Crypto9SignatureESaIS2_EESaIS4_EE", !44, i64 0}
!44 = !{!"_ZTSNSt12_Vector_baseISt6vectorIN6Crypto9SignatureESaIS2_EESaIS4_EE12_Vector_implE", !45, i64 0}
!45 = !{!"_ZTSNSt12_Vector_baseISt6vectorIN6Crypto9SignatureESaIS2_EESaIS4_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!46 = !{!"_ZTSN7Logging9LoggerRefE", !6, i64 0, !16, i64 8}
!47 = !{!15, !10, i64 104}
!48 = !{!15, !13, i64 112}


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

@.str.8 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [78 x i8], align 1
@__PRETTY_FUNCTION__._ZNK7DynexCN8Currency14getBlockRewardEjhmmmmRmRl = external hidden unnamed_addr constant [123 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [75 x i8], align 1
@_ZN7Logging7DEFAULTB5cxx11E = external global %"class.std::__cxx11::basic_string", align 8
@.str.11 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [5 x i8], align 1
@_ZN7DynexCNL15CRYPTONOTE_NAMEE = external hidden constant [6 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [22 x i8], align 1

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

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

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK7DynexCN8Currency40blockGrantedFullRewardZoneByBlockVersionEh(ptr noundef nonnull align 8 dereferenceable(984), i8 noundef zeroext) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZNK7DynexCN8Currency14getBlockRewardEjhmmmmRmRl(ptr noundef nonnull align 8 dereferenceable(984) %0, i32 noundef %1, i8 noundef zeroext %2, i64 noundef %3, i64 noundef %4, i64 noundef %5, i64 noundef %6, ptr nocapture noundef nonnull writeonly align 8 dereferenceable(8) %7, ptr nocapture noundef nonnull writeonly align 8 dereferenceable(8) %8) local_unnamed_addr #4 align 2 personality ptr @__gxx_personality_v0 {
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca %"class.Logging::LoggerMessage", align 8
  %14 = alloca i64, align 8
  %15 = alloca %"class.Logging::LoggerMessage", align 8
  %16 = alloca i64, align 8
  store i64 %3, ptr %10, align 8, !tbaa !5
  store i64 %4, ptr %11, align 8, !tbaa !5
  %17 = getelementptr inbounds i8, ptr %0, i64 96
  %18 = load i64, ptr %17, align 8, !tbaa !9
  %.not = icmp ult i64 %18, %5
  br i1 %.not, label %19, label %20

19:                                               ; preds = %9
  tail call void @__assert_fail(ptr noundef nonnull @.str.8, ptr noundef nonnull @.str.9, i32 noundef 165, ptr noundef nonnull @__PRETTY_FUNCTION__._ZNK7DynexCN8Currency14getBlockRewardEjhmmmmRmRl) #8
  unreachable

20:                                               ; preds = %9
  %21 = getelementptr inbounds i8, ptr %0, i64 104
  %22 = load i32, ptr %21, align 8, !tbaa !44
  %23 = add i32 %22, -1
  %or.cond = icmp ult i32 %23, 64
  br i1 %or.cond, label %24, label %.critedge

.critedge:                                        ; preds = %20
  tail call void @__assert_fail(ptr noundef nonnull @.str.10, ptr noundef nonnull @.str.9, i32 noundef 166, ptr noundef nonnull @__PRETTY_FUNCTION__._ZNK7DynexCN8Currency14getBlockRewardEjhmmmmRmRl) #8
  unreachable

24:                                               ; preds = %20
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #9
  %25 = sub i64 %18, %5
  %26 = zext nneg i32 %22 to i64
  %27 = lshr i64 %25, %26
  store i64 %27, ptr %12, align 8, !tbaa !5
  %28 = icmp eq i64 %5, 0
  br i1 %28, label %29, label %44

29:                                               ; preds = %24
  %30 = getelementptr inbounds i8, ptr %0, i64 112
  %31 = load i64, ptr %30, align 8, !tbaa !45
  %.not27 = icmp eq i64 %31, 0
  br i1 %.not27, label %44, label %32

32:                                               ; preds = %29
  store i64 %31, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 432, ptr nonnull %13) #9
  %33 = getelementptr inbounds i8, ptr %0, i64 944
  call void @_ZNK7Logging9LoggerRefclENS_5LevelERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr dead_on_unwind nonnull writable sret(%"class.Logging::LoggerMessage") align 8 %13, ptr noundef nonnull align 8 dereferenceable(40) %33, i32 noundef 3, ptr noundef nonnull align 8 dereferenceable(32) @_ZN7Logging7DEFAULTB5cxx11E)
  %34 = invoke noundef nonnull align 8 dereferenceable(161) ptr @_ZStlsIN7Logging13LoggerMessageEA23_cEOT_S4_RKT0_(ptr noundef nonnull align 8 dereferenceable(161) %13, ptr noundef nonnull align 1 dereferenceable(23) @.str.11)
          to label %35 unwind label %42

35:                                               ; preds = %32
  %36 = invoke noundef nonnull align 8 dereferenceable(161) ptr @_ZStlsIN7Logging13LoggerMessageEmEOT_S3_RKT0_(ptr noundef nonnull align 8 dereferenceable(161) %34, ptr noundef nonnull align 8 dereferenceable(8) %12)
          to label %37 unwind label %42

37:                                               ; preds = %35
  %38 = invoke noundef nonnull align 8 dereferenceable(161) ptr @_ZStlsIN7Logging13LoggerMessageEA5_cEOT_S4_RKT0_(ptr noundef nonnull align 8 dereferenceable(161) %36, ptr noundef nonnull align 1 dereferenceable(5) @.str.12)
          to label %39 unwind label %42

39:                                               ; preds = %37
  %40 = invoke noundef nonnull align 8 dereferenceable(161) ptr @_ZStlsIN7Logging13LoggerMessageEA6_cEOT_S4_RKT0_(ptr noundef nonnull align 8 dereferenceable(161) %38, ptr noundef nonnull align 1 dereferenceable(6) @_ZN7DynexCNL15CRYPTONOTE_NAMEE)
          to label %41 unwind label %42

41:                                               ; preds = %39
  call void @_ZN7Logging13LoggerMessageD1Ev(ptr noundef nonnull align 8 dereferenceable(161) %13) #9
  call void @llvm.lifetime.end.p0(i64 432, ptr nonnull %13) #9
  br label %44

42:                                               ; preds = %39, %37, %35, %32
  %43 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7Logging13LoggerMessageD1Ev(ptr noundef nonnull align 8 dereferenceable(161) %13) #9
  call void @llvm.lifetime.end.p0(i64 432, ptr nonnull %13) #9
  br label %85

44:                                               ; preds = %41, %29, %24
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #9
  %45 = call noundef i64 @_ZNK7DynexCN8Currency40blockGrantedFullRewardZoneByBlockVersionEh(ptr noundef nonnull align 8 dereferenceable(984) %0, i8 noundef zeroext %2)
  store i64 %45, ptr %14, align 8, !tbaa !5
  %46 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxImERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 8 dereferenceable(8) %14)
  %47 = load i64, ptr %46, align 8, !tbaa !5
  store i64 %47, ptr %10, align 8, !tbaa !5
  %48 = shl i64 %47, 1
  %49 = icmp uge i64 %48, %4
  br i1 %49, label %67, label %50

50:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 432, ptr nonnull %15) #9
  %51 = getelementptr inbounds i8, ptr %0, i64 944
  call void @_ZNK7Logging9LoggerRefclENS_5LevelERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr dead_on_unwind nonnull writable sret(%"class.Logging::LoggerMessage") align 8 %15, ptr noundef nonnull align 8 dereferenceable(40) %51, i32 noundef 5, ptr noundef nonnull align 8 dereferenceable(32) @_ZN7Logging7DEFAULTB5cxx11E)
  %52 = invoke noundef nonnull align 8 dereferenceable(161) ptr @_ZStlsIN7Logging13LoggerMessageEA35_cEOT_S4_RKT0_(ptr noundef nonnull align 8 dereferenceable(161) %15, ptr noundef nonnull align 1 dereferenceable(35) @.str.13)
          to label %53 unwind label %62

53:                                               ; preds = %50
  %54 = invoke noundef nonnull align 8 dereferenceable(161) ptr @_ZStlsIN7Logging13LoggerMessageEmEOT_S3_RKT0_(ptr noundef nonnull align 8 dereferenceable(161) %52, ptr noundef nonnull align 8 dereferenceable(8) %11)
          to label %55 unwind label %62

55:                                               ; preds = %53
  %56 = invoke noundef nonnull align 8 dereferenceable(161) ptr @_ZStlsIN7Logging13LoggerMessageEA22_cEOT_S4_RKT0_(ptr noundef nonnull align 8 dereferenceable(161) %54, ptr noundef nonnull align 1 dereferenceable(22) @.str.14)
          to label %57 unwind label %62

57:                                               ; preds = %55
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %16) #9
  %58 = load i64, ptr %10, align 8, !tbaa !5
  %59 = shl i64 %58, 1
  store i64 %59, ptr %16, align 8, !tbaa !5
  %60 = invoke noundef nonnull align 8 dereferenceable(161) ptr @_ZStlsIN7Logging13LoggerMessageEmEOT_S3_RKT0_(ptr noundef nonnull align 8 dereferenceable(161) %56, ptr noundef nonnull align 8 dereferenceable(8) %16)
          to label %61 unwind label %64

61:                                               ; preds = %57
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #9
  call void @_ZN7Logging13LoggerMessageD1Ev(ptr noundef nonnull align 8 dereferenceable(161) %15) #9
  call void @llvm.lifetime.end.p0(i64 432, ptr nonnull %15) #9
  br label %84

62:                                               ; preds = %55, %53, %50
  %63 = landingpad { ptr, i32 }
          cleanup
  br label %66

64:                                               ; preds = %57
  %65 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #9
  br label %66

66:                                               ; preds = %64, %62
  %.pn = phi { ptr, i32 } [ %65, %64 ], [ %63, %62 ]
  call void @_ZN7Logging13LoggerMessageD1Ev(ptr noundef nonnull align 8 dereferenceable(161) %15) #9
  call void @llvm.lifetime.end.p0(i64 432, ptr nonnull %15) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #9
  br label %85

67:                                               ; preds = %44
  %68 = load i64, ptr %12, align 8, !tbaa !5
  %69 = call noundef i64 @_ZN7DynexCN18getPenalizedAmountEmmm(i64 noundef %68, i64 noundef %47, i64 noundef %4)
  %70 = icmp ugt i8 %2, 1
  br i1 %70, label %71, label %74

71:                                               ; preds = %67
  %72 = load i64, ptr %10, align 8, !tbaa !5
  %73 = call noundef i64 @_ZN7DynexCN18getPenalizedAmountEmmm(i64 noundef %6, i64 noundef %72, i64 noundef %4)
  br label %74

74:                                               ; preds = %67, %71
  %75 = phi i64 [ %73, %71 ], [ %6, %67 ]
  %76 = call noundef i64 @_ZNK7DynexCN8Currency21cryptonoteCoinVersionEv(ptr noundef nonnull align 8 dereferenceable(984) %0)
  %77 = icmp eq i64 %76, 1
  br i1 %77, label %78, label %81

78:                                               ; preds = %74
  %79 = load i64, ptr %10, align 8, !tbaa !5
  %80 = call noundef i64 @_ZN7DynexCN18getPenalizedAmountEmmm(i64 noundef %6, i64 noundef %79, i64 noundef %4)
  br label %81

81:                                               ; preds = %78, %74
  %.0 = phi i64 [ %80, %78 ], [ %75, %74 ]
  %.neg = sub i64 %69, %6
  %82 = add i64 %.neg, %.0
  store i64 %82, ptr %8, align 8, !tbaa !5
  %83 = add i64 %.0, %69
  store i64 %83, ptr %7, align 8, !tbaa !5
  br label %84

84:                                               ; preds = %81, %61
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #9
  ret i1 %49

85:                                               ; preds = %66, %42
  %.pn.pn = phi { ptr, i32 } [ %.pn, %66 ], [ %43, %42 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #9
  resume { ptr, i32 } %.pn.pn
}

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #5

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(161) ptr @_ZStlsIN7Logging13LoggerMessageEA23_cEOT_S4_RKT0_(ptr noundef nonnull align 8 dereferenceable(161), ptr noundef nonnull align 1 dereferenceable(23)) local_unnamed_addr #6

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxImERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #7

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(161) ptr @_ZStlsIN7Logging13LoggerMessageEA35_cEOT_S4_RKT0_(ptr noundef nonnull align 8 dereferenceable(161), ptr noundef nonnull align 1 dereferenceable(35)) local_unnamed_addr #6

declare noundef i64 @_ZN7DynexCN18getPenalizedAmountEmmm(i64 noundef, i64 noundef, i64 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK7DynexCN8Currency21cryptonoteCoinVersionEv(ptr noundef nonnull align 8 dereferenceable(984)) local_unnamed_addr #3 align 2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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 #3 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { noreturn 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 #6 = { 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 #7 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #8 = { noreturn nounwind }
attributes #9 = { 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 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !6, i64 96}
!10 = !{!"_ZTSN7DynexCN8CurrencyE", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !11, i64 104, !6, i64 112, !6, i64 120, !6, i64 128, !6, i64 136, !6, i64 144, !6, i64 152, !6, i64 160, !6, i64 168, !6, i64 176, !6, i64 184, !6, i64 192, !6, i64 200, !6, i64 208, !6, i64 216, !6, i64 224, !6, i64 232, !6, i64 240, !6, i64 248, !6, i64 256, !6, i64 264, !6, i64 272, !6, i64 280, !6, i64 288, !6, i64 296, !6, i64 304, !6, i64 312, !6, i64 320, !6, i64 328, !11, i64 336, !11, i64 340, !11, i64 344, !11, i64 348, !11, i64 352, !11, i64 356, !12, i64 360, !12, i64 392, !12, i64 424, !12, i64 456, !12, i64 488, !15, i64 520, !16, i64 528, !18, i64 912, !43, i64 944}
!11 = !{!"int", !7, i64 0}
!12 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !13, i64 0, !6, i64 8, !7, i64 16}
!13 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !14, i64 0}
!14 = !{!"any pointer", !7, i64 0}
!15 = !{!"bool", !7, i64 0}
!16 = !{!"_ZTSN7DynexCN5BlockE", !17, i64 0, !19, i64 48, !25, i64 248, !21, i64 360}
!17 = !{!"_ZTSN7DynexCN11BlockHeaderE", !7, i64 0, !7, i64 1, !11, i64 4, !6, i64 8, !18, i64 16}
!18 = !{!"_ZTSN6Crypto4HashE", !7, i64 0}
!19 = !{!"_ZTSN7DynexCN11ParentBlockE", !7, i64 0, !7, i64 1, !18, i64 2, !20, i64 34, !21, i64 40, !25, i64 64, !21, i64 176}
!20 = !{!"short", !7, i64 0}
!21 = !{!"_ZTSSt6vectorIN6Crypto4HashESaIS1_EE", !22, i64 0}
!22 = !{!"_ZTSSt12_Vector_baseIN6Crypto4HashESaIS1_EE", !23, i64 0}
!23 = !{!"_ZTSNSt12_Vector_baseIN6Crypto4HashESaIS1_EE12_Vector_implE", !24, i64 0}
!24 = !{!"_ZTSNSt12_Vector_baseIN6Crypto4HashESaIS1_EE17_Vector_impl_dataE", !14, i64 0, !14, i64 8, !14, i64 16}
!25 = !{!"_ZTSN7DynexCN11TransactionE", !26, i64 0, !39, i64 88}
!26 = !{!"_ZTSN7DynexCN17TransactionPrefixE", !7, i64 0, !6, i64 8, !27, i64 16, !31, i64 40, !35, i64 64}
!27 = !{!"_ZTSSt6vectorIN5boost7variantIN7DynexCN9BaseInputEJNS2_8KeyInputENS2_19MultisignatureInputEEEESaIS6_EE", !28, i64 0}
!28 = !{!"_ZTSSt12_Vector_baseIN5boost7variantIN7DynexCN9BaseInputEJNS2_8KeyInputENS2_19MultisignatureInputEEEESaIS6_EE", !29, i64 0}
!29 = !{!"_ZTSNSt12_Vector_baseIN5boost7variantIN7DynexCN9BaseInputEJNS2_8KeyInputENS2_19MultisignatureInputEEEESaIS6_EE12_Vector_implE", !30, i64 0}
!30 = !{!"_ZTSNSt12_Vector_baseIN5boost7variantIN7DynexCN9BaseInputEJNS2_8KeyInputENS2_19MultisignatureInputEEEESaIS6_EE17_Vector_impl_dataE", !14, i64 0, !14, i64 8, !14, i64 16}
!31 = !{!"_ZTSSt6vectorIN7DynexCN17TransactionOutputESaIS1_EE", !32, i64 0}
!32 = !{!"_ZTSSt12_Vector_baseIN7DynexCN17TransactionOutputESaIS1_EE", !33, i64 0}
!33 = !{!"_ZTSNSt12_Vector_baseIN7DynexCN17TransactionOutputESaIS1_EE12_Vector_implE", !34, i64 0}
!34 = !{!"_ZTSNSt12_Vector_baseIN7DynexCN17TransactionOutputESaIS1_EE17_Vector_impl_dataE", !14, i64 0, !14, i64 8, !14, i64 16}
!35 = !{!"_ZTSSt6vectorIhSaIhEE", !36, i64 0}
!36 = !{!"_ZTSSt12_Vector_baseIhSaIhEE", !37, i64 0}
!37 = !{!"_ZTSNSt12_Vector_baseIhSaIhEE12_Vector_implE", !38, i64 0}
!38 = !{!"_ZTSNSt12_Vector_baseIhSaIhEE17_Vector_impl_dataE", !14, i64 0, !14, i64 8, !14, i64 16}
!39 = !{!"_ZTSSt6vectorIS_IN6Crypto9SignatureESaIS1_EESaIS3_EE", !40, i64 0}
!40 = !{!"_ZTSSt12_Vector_baseISt6vectorIN6Crypto9SignatureESaIS2_EESaIS4_EE", !41, i64 0}
!41 = !{!"_ZTSNSt12_Vector_baseISt6vectorIN6Crypto9SignatureESaIS2_EESaIS4_EE12_Vector_implE", !42, i64 0}
!42 = !{!"_ZTSNSt12_Vector_baseISt6vectorIN6Crypto9SignatureESaIS2_EESaIS4_EE17_Vector_impl_dataE", !14, i64 0, !14, i64 8, !14, i64 16}
!43 = !{!"_ZTSN7Logging9LoggerRefE", !14, i64 0, !12, i64 8}
!44 = !{!10, !11, i64 104}
!45 = !{!10, !6, i64 112}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass