; LLVM IR from UBIC-repo/core :: Network (NetworkMessageHandler)

; 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.Log = type { i8, i8, ptr, %"class.std::basic_filebuf" }
%"class.std::basic_filebuf" = type { %"class.std::basic_streambuf", %union.pthread_mutex_t, %"class.std::__basic_file", i32, %struct.__mbstate_t, %struct.__mbstate_t, %struct.__mbstate_t, ptr, i64, i8, i8, i8, i8, ptr, ptr, i8, ptr, ptr, i64, ptr, ptr }
%"class.std::basic_streambuf" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, %"class.std::locale" }
%"class.std::locale" = type { ptr }
%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }
%"class.std::__basic_file" = type <{ ptr, i8, [7 x i8] }>
%struct.__mbstate_t = type { i32, %union.anon.4 }
%union.anon.4 = type { i32 }
%"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.std::vector.128" = type { %"struct.std::_Vector_base.129" }
%"struct.std::_Vector_base.129" = type { %"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.AskForBlocks = type { i8, i64, i64 }
%class.NetworkMessage = type { i32, ptr }
%struct.TransmitBlockchainHeight = type { i8, i32, %"class.std::vector.5" }
%"class.std::vector.5" = type { %"struct.std::_Vector_base.6" }
%"struct.std::_Vector_base.6" = 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 }

@.str.40 = external hidden unnamed_addr constant [56 x i8], align 1
@.str.41 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.42 = external hidden unnamed_addr constant [10 x i8], align 1
@_ZN7Network6syncedE = external global 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(...)

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

declare void @_ZN3LogC1Eh(ptr noundef nonnull align 8 dereferenceable(256), i8 noundef zeroext) unnamed_addr #2

declare noundef nonnull align 8 dereferenceable(256) ptr @_ZN3LoglsEPKc(ptr noundef nonnull align 8 dereferenceable(256), ptr noundef) #2

; Function Attrs: nounwind
declare void @_ZN3LogD1Ev(ptr noundef nonnull align 8 dereferenceable(256)) unnamed_addr #3

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN12AskForBlocksC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #4 align 2

declare noundef nonnull align 8 dereferenceable(256) ptr @_ZN3LoglsENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(256), ptr noundef) #2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN21NetworkMessageHandler30handleTransmitBlockchainHeightE24TransmitBlockchainHeightSt10shared_ptrI13PeerInterfaceE(ptr noundef %0, ptr noundef %1) #6 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca %class.Log, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca %class.Log, align 8
  %11 = alloca %"class.std::__cxx11::basic_string", align 8
  %12 = alloca %"class.std::vector.128", align 8
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  %15 = alloca %"class.std::__cxx11::basic_string", align 8
  %16 = alloca %"class.std::vector.128", align 8
  %17 = alloca %struct.AskForBlocks, align 8
  %18 = alloca %class.NetworkMessage, align 8
  %19 = alloca %struct.AskForBlocks, align 8
  %20 = alloca ptr, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 256, ptr %5) #7
  call void @_ZN3LogC1Eh(ptr noundef nonnull align 8 dereferenceable(256) %5, i8 noundef zeroext 0)
  %21 = invoke noundef nonnull align 8 dereferenceable(256) ptr @_ZN3LoglsEPKc(ptr noundef nonnull align 8 dereferenceable(256) %5, ptr noundef @.str.40)
          to label %22 unwind label %69

22:                                               ; preds = %2
  call void @_ZN3LogD1Ev(ptr noundef nonnull align 8 dereferenceable(256) %5) #7
  call void @llvm.lifetime.end.p0(i64 256, ptr %5) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #7
  %23 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZN5Chain8InstanceEv()
  store ptr %23, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  %24 = load ptr, ptr %8, align 8, !tbaa !5
  %25 = call noundef i32 @_ZN5Chain26getCurrentBlockchainHeightEv(ptr noundef nonnull align 8 dereferenceable(32) %24)
  store i32 %25, ptr %9, align 4, !tbaa !9
  %26 = call noundef ptr @_ZNKSt19__shared_ptr_accessI13PeerInterfaceLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %1) #7
  %27 = getelementptr inbounds %struct.TransmitBlockchainHeight, ptr %0, i32 0, i32 1
  %28 = load i32, ptr %27, align 4, !tbaa !11
  %29 = load ptr, ptr %26, align 8, !tbaa !17
  %30 = getelementptr inbounds ptr, ptr %29, i64 3
  %31 = load ptr, ptr %30, align 8
  call void %31(ptr noundef nonnull align 8 dereferenceable(8) %26, i32 noundef %28)
  call void @llvm.lifetime.start.p0(i64 256, ptr %10) #7
  call void @_ZN3LogC1Eh(ptr noundef nonnull align 8 dereferenceable(256) %10, i8 noundef zeroext 0)
  %32 = invoke noundef nonnull align 8 dereferenceable(256) ptr @_ZN3LoglsEPKc(ptr noundef nonnull align 8 dereferenceable(256) %10, ptr noundef @.str.41)
          to label %33 unwind label %73

33:                                               ; preds = %22
  %34 = call noundef ptr @_ZNKSt19__shared_ptr_accessI13PeerInterfaceLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %1) #7
  %35 = load ptr, ptr %34, align 8, !tbaa !17
  %36 = getelementptr inbounds ptr, ptr %35, i64 0
  %37 = load ptr, ptr %36, align 8
  invoke void %37(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %11, ptr noundef nonnull align 8 dereferenceable(8) %34)
          to label %38 unwind label %73

38:                                               ; preds = %33
  %39 = invoke noundef nonnull align 8 dereferenceable(256) ptr @_ZN3LoglsENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(256) %32, ptr noundef %11)
          to label %40 unwind label %77

40:                                               ; preds = %38
  %41 = invoke noundef nonnull align 8 dereferenceable(256) ptr @_ZN3LoglsEPKc(ptr noundef nonnull align 8 dereferenceable(256) %39, ptr noundef @.str.42)
          to label %42 unwind label %77

42:                                               ; preds = %40
  %43 = call noundef ptr @_ZNKSt19__shared_ptr_accessI13PeerInterfaceLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %1) #7
  %44 = load ptr, ptr %43, align 8, !tbaa !17
  %45 = getelementptr inbounds ptr, ptr %44, i64 2
  %46 = load ptr, ptr %45, align 8
  %47 = invoke noundef i32 %46(ptr noundef nonnull align 8 dereferenceable(8) %43)
          to label %48 unwind label %77

48:                                               ; preds = %42
  %49 = invoke noundef nonnull align 8 dereferenceable(256) ptr @_ZN3LoglsEj(ptr noundef nonnull align 8 dereferenceable(256) %41, i32 noundef %47)
          to label %50 unwind label %77

50:                                               ; preds = %48
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #7
  call void @_ZN3LogD1Ev(ptr noundef nonnull align 8 dereferenceable(256) %10) #7
  call void @llvm.lifetime.end.p0(i64 256, ptr %10) #7
  %51 = getelementptr inbounds %struct.TransmitBlockchainHeight, ptr %0, i32 0, i32 1
  %52 = load i32, ptr %51, align 4, !tbaa !11
  %53 = load i32, ptr %9, align 4, !tbaa !9
  %54 = icmp ugt i32 %52, %53
  br i1 %54, label %55, label %143

55:                                               ; preds = %50
  %56 = load i32, ptr %9, align 4, !tbaa !9
  %57 = add i32 %56, 10
  %58 = getelementptr inbounds %struct.TransmitBlockchainHeight, ptr %0, i32 0, i32 1
  %59 = load i32, ptr %58, align 4, !tbaa !11
  %60 = icmp ugt i32 %57, %59
  br i1 %60, label %61, label %143

61:                                               ; preds = %55
  call void @llvm.lifetime.start.p0(i64 24, ptr %12) #7
  call void @_ZNSt6vectorIjSaIjEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  %62 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %62, ptr %13, align 4, !tbaa !9
  br label %63

63:                                               ; preds = %85, %61
  %64 = load i32, ptr %13, align 4, !tbaa !9
  %65 = getelementptr inbounds %struct.TransmitBlockchainHeight, ptr %0, i32 0, i32 1
  %66 = load i32, ptr %65, align 4, !tbaa !11
  %67 = icmp ule i32 %64, %66
  br i1 %67, label %82, label %68

68:                                               ; preds = %63
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  br label %92

69:                                               ; preds = %2
  %70 = landingpad { ptr, i32 }
          cleanup
  %71 = extractvalue { ptr, i32 } %70, 0
  store ptr %71, ptr %6, align 8
  %72 = extractvalue { ptr, i32 } %70, 1
  store i32 %72, ptr %7, align 4
  call void @_ZN3LogD1Ev(ptr noundef nonnull align 8 dereferenceable(256) %5) #7
  call void @llvm.lifetime.end.p0(i64 256, ptr %5) #7
  br label %154

73:                                               ; preds = %33, %22
  %74 = landingpad { ptr, i32 }
          cleanup
  %75 = extractvalue { ptr, i32 } %74, 0
  store ptr %75, ptr %6, align 8
  %76 = extractvalue { ptr, i32 } %74, 1
  store i32 %76, ptr %7, align 4
  br label %81

77:                                               ; preds = %48, %42, %40, %38
  %78 = landingpad { ptr, i32 }
          cleanup
  %79 = extractvalue { ptr, i32 } %78, 0
  store ptr %79, ptr %6, align 8
  %80 = extractvalue { ptr, i32 } %78, 1
  store i32 %80, ptr %7, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #7
  br label %81

81:                                               ; preds = %77, %73
  call void @_ZN3LogD1Ev(ptr noundef nonnull align 8 dereferenceable(256) %10) #7
  call void @llvm.lifetime.end.p0(i64 256, ptr %10) #7
  br label %153

82:                                               ; preds = %63
  %83 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIjSaIjEE12emplace_backIJRjEEES3_DpOT_(ptr noundef nonnull align 8 dereferenceable(24) %12, ptr noundef nonnull align 4 dereferenceable(4) %13)
          to label %84 unwind label %88

84:                                               ; preds = %82
  br label %85

85:                                               ; preds = %84
  %86 = load i32, ptr %13, align 4, !tbaa !9
  %87 = add i32 %86, 1
  store i32 %87, ptr %13, align 4, !tbaa !9
  br label %63, !llvm.loop !19

88:                                               ; preds = %82
  %89 = landingpad { ptr, i32 }
          cleanup
  %90 = extractvalue { ptr, i32 } %89, 0
  store ptr %90, ptr %6, align 8
  %91 = extractvalue { ptr, i32 } %89, 1
  store i32 %91, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  br label %142

92:                                               ; preds = %68
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  %93 = invoke noundef nonnull align 8 dereferenceable(352) ptr @_ZN10BlockCache8InstanceEv()
          to label %94 unwind label %119

94:                                               ; preds = %92
  store ptr %93, ptr %14, align 8, !tbaa !5
  %95 = load ptr, ptr %14, align 8, !tbaa !5
  %96 = call noundef ptr @_ZNKSt19__shared_ptr_accessI13PeerInterfaceLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %1) #7
  %97 = load ptr, ptr %96, align 8, !tbaa !17
  %98 = getelementptr inbounds ptr, ptr %97, i64 0
  %99 = load ptr, ptr %98, align 8
  invoke void %99(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %15, ptr noundef nonnull align 8 dereferenceable(8) %96)
          to label %100 unwind label %119

100:                                              ; preds = %94
  invoke void @_ZNSt6vectorIjSaIjEEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %16, ptr noundef nonnull align 8 dereferenceable(24) %12)
          to label %101 unwind label %123

101:                                              ; preds = %100
  invoke void @_ZN10BlockCache27insertInBlockHeightAskedMapENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIjSaIjEE(ptr noundef nonnull align 8 dereferenceable(352) %95, ptr noundef %15, ptr noundef %16)
          to label %102 unwind label %127

102:                                              ; preds = %101
  call void @_ZNSt6vectorIjSaIjEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %16) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr %17) #7
  call void @_ZN12AskForBlocksC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %17) #7
  %103 = load i32, ptr %9, align 4, !tbaa !9
  %104 = zext i32 %103 to i64
  %105 = getelementptr inbounds %struct.AskForBlocks, ptr %17, i32 0, i32 1
  store i64 %104, ptr %105, align 8, !tbaa !21
  %106 = getelementptr inbounds %struct.TransmitBlockchainHeight, ptr %0, i32 0, i32 1
  %107 = load i32, ptr %106, align 4, !tbaa !11
  %108 = load i32, ptr %9, align 4, !tbaa !9
  %109 = sub i32 %107, %108
  %110 = add i32 %109, 1
  %111 = zext i32 %110 to i64
  %112 = getelementptr inbounds %struct.AskForBlocks, ptr %17, i32 0, i32 2
  store i64 %111, ptr %112, align 8, !tbaa !24
  %113 = call noundef ptr @_ZNKSt19__shared_ptr_accessI13PeerInterfaceLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %1) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %19, ptr align 8 %17, i64 24, i1 false), !tbaa.struct !25
  invoke void @_ZN20NetworkMessageHelper25serializeToNetworkMessageI12AskForBlocksEE14NetworkMessageT_(ptr dead_on_unwind writable sret(%class.NetworkMessage) align 8 %18, ptr noundef byval(%struct.AskForBlocks) align 8 %19)
          to label %114 unwind label %132

114:                                              ; preds = %102
  %115 = load ptr, ptr %113, align 8, !tbaa !17
  %116 = getelementptr inbounds ptr, ptr %115, i64 1
  %117 = load ptr, ptr %116, align 8
  invoke void %117(ptr noundef nonnull align 8 dereferenceable(8) %113, ptr noundef %18)
          to label %118 unwind label %136

118:                                              ; preds = %114
  call void @_ZN14NetworkMessageD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %18) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  call void @_ZNSt6vectorIjSaIjEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #7
  br label %152

119:                                              ; preds = %94, %92
  %120 = landingpad { ptr, i32 }
          cleanup
  %121 = extractvalue { ptr, i32 } %120, 0
  store ptr %121, ptr %6, align 8
  %122 = extractvalue { ptr, i32 } %120, 1
  store i32 %122, ptr %7, align 4
  br label %141

123:                                              ; preds = %100
  %124 = landingpad { ptr, i32 }
          cleanup
  %125 = extractvalue { ptr, i32 } %124, 0
  store ptr %125, ptr %6, align 8
  %126 = extractvalue { ptr, i32 } %124, 1
  store i32 %126, ptr %7, align 4
  br label %131

127:                                              ; preds = %101
  %128 = landingpad { ptr, i32 }
          cleanup
  %129 = extractvalue { ptr, i32 } %128, 0
  store ptr %129, ptr %6, align 8
  %130 = extractvalue { ptr, i32 } %128, 1
  store i32 %130, ptr %7, align 4
  call void @_ZNSt6vectorIjSaIjEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %16) #7
  br label %131

131:                                              ; preds = %127, %123
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #7
  br label %141

132:                                              ; preds = %102
  %133 = landingpad { ptr, i32 }
          cleanup
  %134 = extractvalue { ptr, i32 } %133, 0
  store ptr %134, ptr %6, align 8
  %135 = extractvalue { ptr, i32 } %133, 1
  store i32 %135, ptr %7, align 4
  br label %140

136:                                              ; preds = %114
  %137 = landingpad { ptr, i32 }
          cleanup
  %138 = extractvalue { ptr, i32 } %137, 0
  store ptr %138, ptr %6, align 8
  %139 = extractvalue { ptr, i32 } %137, 1
  store i32 %139, ptr %7, align 4
  call void @_ZN14NetworkMessageD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %18) #7
  br label %140

140:                                              ; preds = %136, %132
  call void @llvm.lifetime.end.p0(i64 24, ptr %17) #7
  br label %141

141:                                              ; preds = %140, %131, %119
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  br label %142

142:                                              ; preds = %141, %88
  call void @_ZNSt6vectorIjSaIjEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #7
  br label %153

143:                                              ; preds = %55, %50
  %144 = getelementptr inbounds %struct.TransmitBlockchainHeight, ptr %0, i32 0, i32 1
  %145 = load i32, ptr %144, align 4, !tbaa !11
  %146 = load i32, ptr %9, align 4, !tbaa !9
  %147 = icmp ugt i32 %145, %146
  br i1 %147, label %148, label %151

148:                                              ; preds = %143
  store i8 0, ptr @_ZN7Network6syncedE, align 1, !tbaa !28
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #7
  %149 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN7Network8InstanceEv()
  store ptr %149, ptr %20, align 8, !tbaa !5
  %150 = load ptr, ptr %20, align 8, !tbaa !5
  call void @_ZN7Network14syncBlockchainEv(ptr noundef nonnull align 1 dereferenceable(1) %150)
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  br label %151

151:                                              ; preds = %148, %143
  br label %152

152:                                              ; preds = %151, %118
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  ret void

153:                                              ; preds = %142, %81
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  br label %154

154:                                              ; preds = %153, %69
  %155 = load ptr, ptr %6, align 8
  %156 = load i32, ptr %7, align 4
  %157 = insertvalue { ptr, i32 } poison, ptr %155, 0
  %158 = insertvalue { ptr, i32 } %157, i32 %156, 1
  resume { ptr, i32 } %158
}

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

declare noundef i32 @_ZN5Chain26getCurrentBlockchainHeightEv(ptr noundef nonnull align 8 dereferenceable(32)) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(352) ptr @_ZN10BlockCache8InstanceEv() #1 align 2

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

declare noundef nonnull align 8 dereferenceable(256) ptr @_ZN3LoglsEj(ptr noundef nonnull align 8 dereferenceable(256), i32 noundef) #2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIjSaIjEE12emplace_backIJRjEEES3_DpOT_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(4)) #6 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIjSaIjEEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #6 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN20NetworkMessageHelper25serializeToNetworkMessageI12AskForBlocksEE14NetworkMessageT_(ptr dead_on_unwind noalias writable sret(%class.NetworkMessage) align 8, ptr noundef byval(%struct.AskForBlocks) align 8) #6 align 2

declare void @_ZN7Network14syncBlockchainEv(ptr noundef nonnull align 1 dereferenceable(1)) #2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { "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 = { 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 #4 = { 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 #5 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #6 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { 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, !10, i64 4}
!12 = !{!"_ZTS24TransmitBlockchainHeight", !7, i64 0, !10, i64 4, !13, i64 8}
!13 = !{!"_ZTSSt6vectorIhSaIhEE", !14, i64 0}
!14 = !{!"_ZTSSt12_Vector_baseIhSaIhEE", !15, i64 0}
!15 = !{!"_ZTSNSt12_Vector_baseIhSaIhEE12_Vector_implE", !16, i64 0}
!16 = !{!"_ZTSNSt12_Vector_baseIhSaIhEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!17 = !{!18, !18, i64 0}
!18 = !{!"vtable pointer", !8, i64 0}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = !{!22, !23, i64 8}
!22 = !{!"_ZTS12AskForBlocks", !7, i64 0, !23, i64 8, !23, i64 16}
!23 = !{!"long", !7, i64 0}
!24 = !{!22, !23, i64 16}
!25 = !{i64 0, i64 1, !26, i64 8, i64 8, !27, i64 16, i64 8, !27}
!26 = !{!7, !7, i64 0}
!27 = !{!23, !23, i64 0}
!28 = !{!29, !29, i64 0}
!29 = !{!"bool", !7, i64 0}


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

%class.Log = type { i8, i8, ptr, %"class.std::basic_filebuf" }
%"class.std::basic_filebuf" = type { %"class.std::basic_streambuf", %union.pthread_mutex_t, %"class.std::__basic_file", i32, %struct.__mbstate_t, %struct.__mbstate_t, %struct.__mbstate_t, ptr, i64, i8, i8, i8, i8, ptr, ptr, i8, ptr, ptr, i64, ptr, ptr }
%"class.std::basic_streambuf" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, %"class.std::locale" }
%"class.std::locale" = type { ptr }
%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }
%"class.std::__basic_file" = type <{ ptr, i8, [7 x i8] }>
%struct.__mbstate_t = type { i32, %union.anon.4 }
%union.anon.4 = type { i32 }
%"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.std::vector.128" = type { %"struct.std::_Vector_base.129" }
%"struct.std::_Vector_base.129" = type { %"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.AskForBlocks = type { i8, i64, i64 }
%class.NetworkMessage = type { i32, ptr }

@.str.40 = external hidden unnamed_addr constant [56 x i8], align 1
@.str.41 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.42 = external hidden unnamed_addr constant [10 x i8], align 1
@_ZN7Network6syncedE = external local_unnamed_addr global 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(...)

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

declare void @_ZN3LogC1Eh(ptr noundef nonnull align 8 dereferenceable(256), i8 noundef zeroext) unnamed_addr #2

declare noundef nonnull align 8 dereferenceable(256) ptr @_ZN3LoglsEPKc(ptr noundef nonnull align 8 dereferenceable(256), ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind
declare void @_ZN3LogD1Ev(ptr noundef nonnull align 8 dereferenceable(256)) unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNKSt19__shared_ptr_accessI13PeerInterfaceLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #1 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN12AskForBlocksC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #4 align 2

declare noundef nonnull align 8 dereferenceable(256) ptr @_ZN3LoglsENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(256), ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN21NetworkMessageHandler30handleTransmitBlockchainHeightE24TransmitBlockchainHeightSt10shared_ptrI13PeerInterfaceE(ptr nocapture noundef readonly %0, ptr noundef %1) local_unnamed_addr #5 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %class.Log, align 8
  %4 = alloca %class.Log, align 8
  %5 = alloca %"class.std::__cxx11::basic_string", align 8
  %6 = alloca %"class.std::vector.128", align 8
  %7 = alloca i32, align 4
  %8 = alloca %"class.std::__cxx11::basic_string", align 8
  %9 = alloca %"class.std::vector.128", align 8
  %10 = alloca %struct.AskForBlocks, align 8
  %11 = alloca %class.NetworkMessage, align 8
  call void @llvm.lifetime.start.p0(i64 256, ptr nonnull %3) #6
  call void @_ZN3LogC1Eh(ptr noundef nonnull align 8 dereferenceable(256) %3, i8 noundef zeroext 0)
  %12 = invoke noundef nonnull align 8 dereferenceable(256) ptr @_ZN3LoglsEPKc(ptr noundef nonnull align 8 dereferenceable(256) %3, ptr noundef nonnull @.str.40)
          to label %13 unwind label %50

13:                                               ; preds = %2
  call void @_ZN3LogD1Ev(ptr noundef nonnull align 8 dereferenceable(256) %3) #6
  call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %3) #6
  %14 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZN5Chain8InstanceEv()
  %15 = call noundef i32 @_ZN5Chain26getCurrentBlockchainHeightEv(ptr noundef nonnull align 8 dereferenceable(32) %14)
  %16 = call noundef ptr @_ZNKSt19__shared_ptr_accessI13PeerInterfaceLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %1) #6
  %17 = getelementptr inbounds i8, ptr %0, i64 4
  %18 = load i32, ptr %17, align 4, !tbaa !5
  %19 = load ptr, ptr %16, align 8, !tbaa !15
  %20 = getelementptr inbounds i8, ptr %19, i64 24
  %21 = load ptr, ptr %20, align 8
  call void %21(ptr noundef nonnull align 8 dereferenceable(8) %16, i32 noundef %18)
  call void @llvm.lifetime.start.p0(i64 256, ptr nonnull %4) #6
  call void @_ZN3LogC1Eh(ptr noundef nonnull align 8 dereferenceable(256) %4, i8 noundef zeroext 0)
  %22 = invoke noundef nonnull align 8 dereferenceable(256) ptr @_ZN3LoglsEPKc(ptr noundef nonnull align 8 dereferenceable(256) %4, ptr noundef nonnull @.str.41)
          to label %23 unwind label %52

23:                                               ; preds = %13
  %24 = call noundef ptr @_ZNKSt19__shared_ptr_accessI13PeerInterfaceLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %1) #6
  %25 = load ptr, ptr %24, align 8, !tbaa !15
  %26 = load ptr, ptr %25, align 8
  invoke void %26(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %5, ptr noundef nonnull align 8 dereferenceable(8) %24)
          to label %27 unwind label %52

27:                                               ; preds = %23
  %28 = invoke noundef nonnull align 8 dereferenceable(256) ptr @_ZN3LoglsENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(256) %22, ptr noundef nonnull %5)
          to label %29 unwind label %54

29:                                               ; preds = %27
  %30 = invoke noundef nonnull align 8 dereferenceable(256) ptr @_ZN3LoglsEPKc(ptr noundef nonnull align 8 dereferenceable(256) %28, ptr noundef nonnull @.str.42)
          to label %31 unwind label %54

31:                                               ; preds = %29
  %32 = call noundef ptr @_ZNKSt19__shared_ptr_accessI13PeerInterfaceLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %1) #6
  %33 = load ptr, ptr %32, align 8, !tbaa !15
  %34 = getelementptr inbounds i8, ptr %33, i64 16
  %35 = load ptr, ptr %34, align 8
  %36 = invoke noundef i32 %35(ptr noundef nonnull align 8 dereferenceable(8) %32)
          to label %37 unwind label %54

37:                                               ; preds = %31
  %38 = invoke noundef nonnull align 8 dereferenceable(256) ptr @_ZN3LoglsEj(ptr noundef nonnull align 8 dereferenceable(256) %30, i32 noundef %36)
          to label %39 unwind label %54

39:                                               ; preds = %37
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #6
  call void @_ZN3LogD1Ev(ptr noundef nonnull align 8 dereferenceable(256) %4) #6
  call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %4) #6
  %40 = load i32, ptr %17, align 4, !tbaa !5
  %41 = icmp ugt i32 %40, %15
  %42 = add i32 %15, 10
  %43 = icmp ugt i32 %42, %40
  %or.cond = and i1 %41, %43
  br i1 %or.cond, label %44, label %92

44:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #6
  call void @_ZNSt6vectorIjSaIjEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #6
  store i32 %15, ptr %7, align 4, !tbaa !17
  %45 = load i32, ptr %17, align 4, !tbaa !5
  %.not30 = icmp ugt i32 %15, %45
  br i1 %.not30, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %58, %44
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #6
  %46 = call noundef nonnull align 8 dereferenceable(352) ptr @_ZN10BlockCache8InstanceEv()
  %47 = call noundef ptr @_ZNKSt19__shared_ptr_accessI13PeerInterfaceLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %1) #6
  %48 = load ptr, ptr %47, align 8, !tbaa !15
  %49 = load ptr, ptr %48, align 8
  invoke void %49(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %8, ptr noundef nonnull align 8 dereferenceable(8) %47)
          to label %64 unwind label %79

50:                                               ; preds = %2
  %51 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3LogD1Ev(ptr noundef nonnull align 8 dereferenceable(256) %3) #6
  call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %3) #6
  br label %96

52:                                               ; preds = %23, %13
  %53 = landingpad { ptr, i32 }
          cleanup
  br label %56

54:                                               ; preds = %37, %31, %29, %27
  %55 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #6
  br label %56

56:                                               ; preds = %54, %52
  %.pn = phi { ptr, i32 } [ %55, %54 ], [ %53, %52 ]
  call void @_ZN3LogD1Ev(ptr noundef nonnull align 8 dereferenceable(256) %4) #6
  call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %4) #6
  br label %96

.lr.ph:                                           ; preds = %44, %58
  %57 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIjSaIjEE12emplace_backIJRjEEES3_DpOT_(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 4 dereferenceable(4) %7)
          to label %58 unwind label %62

58:                                               ; preds = %.lr.ph
  %59 = load i32, ptr %7, align 4, !tbaa !17
  %60 = add i32 %59, 1
  store i32 %60, ptr %7, align 4, !tbaa !17
  %61 = load i32, ptr %17, align 4, !tbaa !5
  %.not = icmp ugt i32 %60, %61
  br i1 %.not, label %._crit_edge, label %.lr.ph, !llvm.loop !18

62:                                               ; preds = %.lr.ph
  %63 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #6
  br label %91

64:                                               ; preds = %._crit_edge
  invoke void @_ZNSt6vectorIjSaIjEEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %9, ptr noundef nonnull align 8 dereferenceable(24) %6)
          to label %65 unwind label %81

65:                                               ; preds = %64
  invoke void @_ZN10BlockCache27insertInBlockHeightAskedMapENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIjSaIjEE(ptr noundef nonnull align 8 dereferenceable(352) %46, ptr noundef nonnull %8, ptr noundef nonnull %9)
          to label %66 unwind label %83

66:                                               ; preds = %65
  call void @_ZNSt6vectorIjSaIjEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %10) #6
  call void @_ZN12AskForBlocksC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #6
  %67 = zext i32 %15 to i64
  %68 = getelementptr inbounds i8, ptr %10, i64 8
  store i64 %67, ptr %68, align 8, !tbaa !20
  %69 = load i32, ptr %17, align 4, !tbaa !5
  %reass.sub = sub i32 %69, %15
  %70 = add i32 %reass.sub, 1
  %71 = zext i32 %70 to i64
  %72 = getelementptr inbounds i8, ptr %10, i64 16
  store i64 %71, ptr %72, align 8, !tbaa !23
  %73 = call noundef ptr @_ZNKSt19__shared_ptr_accessI13PeerInterfaceLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %1) #6
  invoke void @_ZN20NetworkMessageHelper25serializeToNetworkMessageI12AskForBlocksEE14NetworkMessageT_(ptr dead_on_unwind nonnull writable sret(%class.NetworkMessage) align 8 %11, ptr noundef nonnull byval(%struct.AskForBlocks) align 8 %10)
          to label %74 unwind label %86

74:                                               ; preds = %66
  %75 = load ptr, ptr %73, align 8, !tbaa !15
  %76 = getelementptr inbounds i8, ptr %75, i64 8
  %77 = load ptr, ptr %76, align 8
  invoke void %77(ptr noundef nonnull align 8 dereferenceable(8) %73, ptr noundef nonnull %11)
          to label %78 unwind label %88

78:                                               ; preds = %74
  call void @_ZN14NetworkMessageD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %11) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #6
  call void @_ZNSt6vectorIjSaIjEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #6
  br label %95

79:                                               ; preds = %._crit_edge
  %80 = landingpad { ptr, i32 }
          cleanup
  br label %91

81:                                               ; preds = %64
  %82 = landingpad { ptr, i32 }
          cleanup
  br label %85

83:                                               ; preds = %65
  %84 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorIjSaIjEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #6
  br label %85

85:                                               ; preds = %83, %81
  %.pn20 = phi { ptr, i32 } [ %84, %83 ], [ %82, %81 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #6
  br label %91

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

88:                                               ; preds = %74
  %89 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN14NetworkMessageD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %11) #6
  br label %90

90:                                               ; preds = %88, %86
  %.pn22 = phi { ptr, i32 } [ %89, %88 ], [ %87, %86 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #6
  br label %91

91:                                               ; preds = %79, %85, %90, %62
  %.pn25 = phi { ptr, i32 } [ %63, %62 ], [ %.pn22, %90 ], [ %.pn20, %85 ], [ %80, %79 ]
  call void @_ZNSt6vectorIjSaIjEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #6
  br label %96

92:                                               ; preds = %39
  br i1 %41, label %93, label %95

93:                                               ; preds = %92
  store i8 0, ptr @_ZN7Network6syncedE, align 1, !tbaa !24
  %94 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN7Network8InstanceEv()
  call void @_ZN7Network14syncBlockchainEv(ptr noundef nonnull align 1 dereferenceable(1) %94)
  br label %95

95:                                               ; preds = %92, %93, %78
  ret void

96:                                               ; preds = %56, %91, %50
  %.pn25.pn.pn = phi { ptr, i32 } [ %51, %50 ], [ %.pn25, %91 ], [ %.pn, %56 ]
  resume { ptr, i32 } %.pn25.pn.pn
}

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

declare noundef i32 @_ZN5Chain26getCurrentBlockchainHeightEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(352) ptr @_ZN10BlockCache8InstanceEv() local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 1 dereferenceable(1) ptr @_ZN7Network8InstanceEv() local_unnamed_addr #1 align 2

declare noundef nonnull align 8 dereferenceable(256) ptr @_ZN3LoglsEj(ptr noundef nonnull align 8 dereferenceable(256), i32 noundef) local_unnamed_addr #2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIjSaIjEE12emplace_backIJRjEEES3_DpOT_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN10BlockCache27insertInBlockHeightAskedMapENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIjSaIjEE(ptr noundef nonnull align 8 dereferenceable(352), ptr noundef, ptr noundef) local_unnamed_addr #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIjSaIjEEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #5 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN20NetworkMessageHelper25serializeToNetworkMessageI12AskForBlocksEE14NetworkMessageT_(ptr dead_on_unwind noalias writable sret(%class.NetworkMessage) align 8, ptr noundef byval(%struct.AskForBlocks) align 8) local_unnamed_addr #5 align 2

declare void @_ZN7Network14syncBlockchainEv(ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { "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 = { 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 #4 = { 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 #5 = { 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 = { 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, !9, i64 4}
!6 = !{!"_ZTS24TransmitBlockchainHeight", !7, i64 0, !9, i64 4, !10, i64 8}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!"int", !7, i64 0}
!10 = !{!"_ZTSSt6vectorIhSaIhEE", !11, i64 0}
!11 = !{!"_ZTSSt12_Vector_baseIhSaIhEE", !12, i64 0}
!12 = !{!"_ZTSNSt12_Vector_baseIhSaIhEE12_Vector_implE", !13, i64 0}
!13 = !{!"_ZTSNSt12_Vector_baseIhSaIhEE17_Vector_impl_dataE", !14, i64 0, !14, i64 8, !14, i64 16}
!14 = !{!"any pointer", !7, i64 0}
!15 = !{!16, !16, i64 0}
!16 = !{!"vtable pointer", !8, i64 0}
!17 = !{!9, !9, i64 0}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = !{!21, !22, i64 8}
!21 = !{!"_ZTS12AskForBlocks", !7, i64 0, !22, i64 8, !22, i64 16}
!22 = !{!"long", !7, i64 0}
!23 = !{!21, !22, i64 16}
!24 = !{!25, !25, i64 0}
!25 = !{!"bool", !7, i64 0}


; Effective O3 passes: DSEPass,EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,MemCpyOptPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass