; LLVM IR from trustwallet/wallet-core :: src/Everscale (Messages)

; 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::shared_ptr" = type { %"class.std::__shared_ptr" }
%"class.std::__shared_ptr" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"struct.TW::CommonTON::MessageData" = type { %"class.std::shared_ptr.5", %"class.std::optional", %"class.std::optional.10" }
%"class.std::shared_ptr.5" = type { %"class.std::__shared_ptr.6" }
%"class.std::__shared_ptr.6" = type { ptr, %"class.std::__shared_count" }
%"class.std::optional" = type { %"struct.std::_Optional_base" }
%"struct.std::_Optional_base" = type { %"struct.std::_Optional_payload" }
%"struct.std::_Optional_payload" = type { %"struct.std::_Optional_payload.base", [7 x i8] }
%"struct.std::_Optional_payload.base" = type { %"struct.std::_Optional_payload_base.base" }
%"struct.std::_Optional_payload_base.base" = type <{ %"union.std::_Optional_payload_base<TW::CommonTON::StateInit>::_Storage", i8 }>
%"union.std::_Optional_payload_base<TW::CommonTON::StateInit>::_Storage" = type { %"class.TW::CommonTON::StateInit" }
%"class.TW::CommonTON::StateInit" = type { %"class.std::shared_ptr", %"class.std::shared_ptr" }
%"class.std::optional.10" = type { %"struct.std::_Optional_base.11" }
%"struct.std::_Optional_base.11" = type { %"struct.std::_Optional_payload.13" }
%"struct.std::_Optional_payload.13" = type { %"struct.std::_Optional_payload.base.17", [7 x i8] }
%"struct.std::_Optional_payload.base.17" = type { %"struct.std::_Optional_payload_base.base.16" }
%"struct.std::_Optional_payload_base.base.16" = type <{ %"union.std::_Optional_payload_base<std::shared_ptr<TW::CommonTON::Cell>>::_Storage", i8 }>
%"union.std::_Optional_payload_base<std::shared_ptr<TW::CommonTON::Cell>>::_Storage" = type { %"class.std::shared_ptr" }
%"class.TW::Everscale::Address" = type { %"struct.TW::CommonTON::AddressData" }
%"struct.TW::CommonTON::AddressData" = type { i8, %"struct.std::array" }
%"struct.std::array" = type { [32 x i8] }
%class.anon = type { i8 }
%"struct.std::pair" = type <{ %"class.TW::Everscale::InitData", i8, [7 x i8] }>
%"class.TW::Everscale::InitData" = type { i32, i32, %"class.TW::PublicKey" }
%"class.TW::PublicKey" = type <{ %"class.std::vector", i32, [4 x i8] }>
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = 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 }
%"struct.TW::Everscale::Wallet::Gift" = type <{ i8, [7 x i8], i64, %"class.TW::Everscale::Address", i8, [6 x i8] }>
%"class.TW::CommonTON::CellBuilder" = type { i16, %"class.std::vector", %"class.std::vector.0" }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<std::shared_ptr<TW::CommonTON::Cell>, std::allocator<std::shared_ptr<TW::CommonTON::Cell>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::shared_ptr<TW::CommonTON::Cell>, std::allocator<std::shared_ptr<TW::CommonTON::Cell>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::shared_ptr<TW::CommonTON::Cell>, std::allocator<std::shared_ptr<TW::CommonTON::Cell>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::shared_ptr<TW::CommonTON::Cell>, std::allocator<std::shared_ptr<TW::CommonTON::Cell>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator" = type { i8 }
%"class.std::shared_ptr.29" = type { %"class.std::__shared_ptr.30" }
%"class.std::__shared_ptr.30" = type { ptr, %"class.std::__shared_count" }
%"class.TW::CommonTON::Cell" = type <{ i8, i8, i16, [4 x i8], %"class.std::vector", i8, [7 x i8], %"struct.std::array.20", i16, %"struct.std::array", [6 x i8] }>
%"struct.std::array.20" = type { [4 x %"class.std::shared_ptr"] }

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

declare i32 @__gxx_personality_v0(...)

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

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

declare void @_ZN2TW9CommonTON11CellBuilder8intoCellEv(ptr dead_on_unwind writable sret(%"class.std::shared_ptr") align 8, ptr noundef nonnull align 8 dereferenceable(56)) #2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN2TW9Everscale19createSignedMessageERNS_9PublicKeyERNS_10PrivateKeyEbjmjNS0_7AddressERKSt10shared_ptrINS_9CommonTON4CellEE(ptr dead_on_unwind noalias writable sret(%"struct.TW::CommonTON::MessageData") align 8 %0, ptr noundef nonnull align 8 dereferenceable(28) %1, ptr noundef nonnull align 8 dereferenceable(40) %2, i1 noundef zeroext %3, i32 noundef %4, i64 noundef %5, i32 noundef %6, ptr noundef byval(%"class.TW::Everscale::Address") align 8 %7, ptr noundef nonnull align 8 dereferenceable(16) %8) #3 personality ptr @__gxx_personality_v0 {
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i8, align 1
  %14 = alloca i32, align 4
  %15 = alloca i64, align 8
  %16 = alloca i32, align 4
  %17 = alloca ptr, align 8
  %18 = alloca %class.anon, align 1
  %19 = alloca %"struct.std::pair", align 8
  %20 = alloca ptr, align 8
  %21 = alloca ptr, align 8
  %22 = alloca %"struct.TW::Everscale::Wallet::Gift", align 8
  %23 = alloca %"class.TW::CommonTON::CellBuilder", align 8
  %24 = alloca ptr, align 8
  %25 = alloca i32, align 4
  %26 = alloca %"class.TW::CommonTON::CellBuilder", align 8
  %27 = alloca %"class.std::shared_ptr", align 8
  %28 = alloca %"class.std::vector", align 8
  %29 = alloca %"class.std::allocator", align 1
  %30 = alloca %"class.std::vector", align 8
  %31 = alloca %"class.std::shared_ptr.29", align 8
  %32 = alloca %"struct.TW::CommonTON::AddressData", align 1
  %33 = alloca %"class.TW::Everscale::InitData", align 8
  %34 = alloca %"class.TW::PublicKey", align 8
  %35 = alloca i1, align 1
  %36 = alloca %"class.std::shared_ptr.5", align 8
  %37 = alloca %"class.TW::CommonTON::StateInit", align 8
  %38 = alloca %"class.std::shared_ptr", align 8
  store ptr %0, ptr %10, align 8
  store ptr %1, ptr %11, align 8, !tbaa !5
  store ptr %2, ptr %12, align 8, !tbaa !5
  %39 = zext i1 %3 to i8
  store i8 %39, ptr %13, align 1, !tbaa !9
  store i32 %4, ptr %14, align 4, !tbaa !11
  store i64 %5, ptr %15, align 8, !tbaa !13
  store i32 %6, ptr %16, align 4, !tbaa !11
  store ptr %8, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %18) #8
  call void @llvm.lifetime.start.p0(i64 48, ptr %19) #8
  %40 = load ptr, ptr %11, align 8, !tbaa !5
  %41 = load ptr, ptr %17, align 8, !tbaa !5
  call void @"_ZZN2TW9Everscale19createSignedMessageERNS_9PublicKeyERNS_10PrivateKeyEbjmjNS0_7AddressERKSt10shared_ptrINS_9CommonTON4CellEEENK3$_0clERKS1_SB_"(ptr dead_on_unwind writable sret(%"struct.std::pair") align 8 %19, ptr noundef nonnull align 1 dereferenceable(1) %18, ptr noundef nonnull align 8 dereferenceable(28) %40, ptr noundef nonnull align 8 dereferenceable(16) %41)
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #8
  %42 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZSt3getILm0EN2TW9Everscale8InitDataEbEONSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeEOS7_(ptr noundef nonnull align 8 dereferenceable(41) %19) #8
  store ptr %42, ptr %20, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #8
  %43 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZSt3getILm1EN2TW9Everscale8InitDataEbEONSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeEOS7_(ptr noundef nonnull align 8 dereferenceable(41) %19) #8
  store ptr %43, ptr %21, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 56, ptr %22) #8
  %44 = getelementptr inbounds %"struct.TW::Everscale::Wallet::Gift", ptr %22, i32 0, i32 0
  %45 = load i8, ptr %13, align 1, !tbaa !9, !range !15, !noundef !16
  %46 = trunc i8 %45 to i1
  %47 = zext i1 %46 to i8
  store i8 %47, ptr %44, align 8, !tbaa !17
  %48 = getelementptr inbounds %"struct.TW::Everscale::Wallet::Gift", ptr %22, i32 0, i32 2
  %49 = load i64, ptr %15, align 8, !tbaa !13
  store i64 %49, ptr %48, align 8, !tbaa !22
  %50 = getelementptr inbounds %"struct.TW::Everscale::Wallet::Gift", ptr %22, i32 0, i32 3
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %50, ptr align 8 %7, i64 33, i1 false), !tbaa.struct !23
  %51 = getelementptr inbounds %"struct.TW::Everscale::Wallet::Gift", ptr %22, i32 0, i32 4
  %52 = load i32, ptr %14, align 4, !tbaa !11
  %53 = trunc i32 %52 to i8
  store i8 %53, ptr %51, align 1, !tbaa !25
  call void @llvm.lifetime.start.p0(i64 56, ptr %23) #8
  %54 = load ptr, ptr %20, align 8, !tbaa !5
  %55 = load i32, ptr %16, align 4, !tbaa !11
  invoke void @_ZNK2TW9Everscale8InitData19makeTransferPayloadEjRKNS0_6Wallet4GiftE(ptr dead_on_unwind writable sret(%"class.TW::CommonTON::CellBuilder") align 8 %23, ptr noundef nonnull align 8 dereferenceable(40) %54, i32 noundef %55, ptr noundef nonnull align 8 dereferenceable(50) %22)
          to label %56 unwind label %88

56:                                               ; preds = %9
  call void @llvm.lifetime.start.p0(i64 56, ptr %26) #8
  invoke void @_ZN2TW9CommonTON11CellBuilderC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(56) %26, ptr noundef nonnull align 8 dereferenceable(56) %23)
          to label %57 unwind label %92

57:                                               ; preds = %56
  call void @llvm.lifetime.start.p0(i64 16, ptr %27) #8
  invoke void @_ZN2TW9CommonTON11CellBuilder8intoCellEv(ptr dead_on_unwind writable sret(%"class.std::shared_ptr") align 8 %27, ptr noundef nonnull align 8 dereferenceable(56) %26)
          to label %58 unwind label %96

58:                                               ; preds = %57
  call void @llvm.lifetime.start.p0(i64 24, ptr %28) #8
  %59 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN2TW9CommonTON4CellELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %27) #8
  %60 = getelementptr inbounds %"class.TW::CommonTON::Cell", ptr %59, i32 0, i32 9
  %61 = call noundef ptr @_ZNSt5arrayIhLm32EE5beginEv(ptr noundef nonnull align 1 dereferenceable(32) %60) #9
  %62 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN2TW9CommonTON4CellELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %27) #8
  %63 = getelementptr inbounds %"class.TW::CommonTON::Cell", ptr %62, i32 0, i32 9
  %64 = call noundef ptr @_ZNSt5arrayIhLm32EE3endEv(ptr noundef nonnull align 1 dereferenceable(32) %63) #9
  call void @llvm.lifetime.start.p0(i64 1, ptr %29) #8
  call void @_ZNSaIhEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %29) #8
  invoke void @_ZNSt6vectorIhSaIhEEC2IPhvEET_S4_RKS0_(ptr noundef nonnull align 8 dereferenceable(24) %28, ptr noundef %61, ptr noundef %64, ptr noundef nonnull align 1 dereferenceable(1) %29)
          to label %65 unwind label %100

65:                                               ; preds = %58
  call void @_ZNSt15__new_allocatorIhED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %29) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %29) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr %30) #8
  %66 = load ptr, ptr %12, align 8, !tbaa !5
  invoke void @_ZNK2TW10PrivateKey4signERKSt6vectorIhSaIhEE7TWCurve(ptr dead_on_unwind writable sret(%"class.std::vector") align 8 %30, ptr noundef nonnull align 8 dereferenceable(40) %66, ptr noundef nonnull align 8 dereferenceable(24) %28, i32 noundef 1)
          to label %67 unwind label %104

67:                                               ; preds = %65
  %68 = call noundef i64 @_ZNKSt6vectorIhSaIhEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %30) #8
  %69 = trunc i64 %68 to i16
  %70 = zext i16 %69 to i32
  %71 = mul nsw i32 %70, 8
  %72 = trunc i32 %71 to i16
  invoke void @_ZN2TW9CommonTON11CellBuilder10prependRawERSt6vectorIhSaIhEEt(ptr noundef nonnull align 8 dereferenceable(56) %23, ptr noundef nonnull align 8 dereferenceable(24) %30, i16 noundef zeroext %72)
          to label %73 unwind label %108

73:                                               ; preds = %67
  call void @llvm.lifetime.start.p0(i64 16, ptr %31) #8
  call void @llvm.lifetime.start.p0(i64 33, ptr %32) #8
  call void @llvm.lifetime.start.p0(i64 40, ptr %33) #8
  %74 = load ptr, ptr %11, align 8, !tbaa !5
  invoke void @_ZN2TW9PublicKeyC2ERKS0_(ptr noundef nonnull align 8 dereferenceable(28) %34, ptr noundef nonnull align 8 dereferenceable(28) %74)
          to label %75 unwind label %112

75:                                               ; preds = %73
  invoke void @_ZN2TW9Everscale8InitDataC2ENS_9PublicKeyE(ptr noundef nonnull align 8 dereferenceable(40) %33, ptr noundef %34)
          to label %76 unwind label %116

76:                                               ; preds = %75
  invoke void @_ZNK2TW9Everscale8InitData11computeAddrEa(ptr dead_on_unwind writable sret(%"struct.TW::CommonTON::AddressData") align 1 %32, ptr noundef nonnull align 8 dereferenceable(40) %33, i8 noundef signext 0)
          to label %77 unwind label %120

77:                                               ; preds = %76
  invoke void @_ZSt11make_sharedIN2TW9CommonTON28ExternalInboundMessageHeaderEJNS1_11AddressDataEEESt10shared_ptrINSt9enable_ifIXntsr8is_arrayIT_EE5valueES6_E4typeEEDpOT0_(ptr dead_on_unwind writable sret(%"class.std::shared_ptr.29") align 8 %31, ptr noundef nonnull align 1 dereferenceable(33) %32)
          to label %78 unwind label %120

78:                                               ; preds = %77
  call void @_ZN2TW9Everscale8InitDataD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %33) #8
  call void @_ZN2TW9PublicKeyD2Ev(ptr noundef nonnull align 8 dereferenceable(28) %34) #8
  call void @llvm.lifetime.end.p0(i64 40, ptr %33) #8
  call void @llvm.lifetime.end.p0(i64 33, ptr %32) #8
  store i1 false, ptr %35, align 1
  call void @_ZNSt10shared_ptrIN2TW9CommonTON13CommonMsgInfoEEC2INS1_28ExternalInboundMessageHeaderEvEERKS_IT_E(ptr noundef nonnull align 8 dereferenceable(16) %36, ptr noundef nonnull align 8 dereferenceable(16) %31) #8
  invoke void @_ZN2TW9CommonTON11MessageDataC2ESt10shared_ptrINS0_13CommonMsgInfoEE(ptr noundef nonnull align 8 dereferenceable(80) %0, ptr noundef %36)
          to label %79 unwind label %126

79:                                               ; preds = %78
  call void @_ZNSt12__shared_ptrIN2TW9CommonTON13CommonMsgInfoELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %36) #8
  %80 = load ptr, ptr %21, align 8, !tbaa !5
  %81 = load i8, ptr %80, align 1, !tbaa !9, !range !15, !noundef !16
  %82 = trunc i8 %81 to i1
  br i1 %82, label %83, label %134

83:                                               ; preds = %79
  call void @llvm.lifetime.start.p0(i64 32, ptr %37) #8
  %84 = load ptr, ptr %20, align 8, !tbaa !5
  invoke void @_ZNK2TW9Everscale8InitData13makeStateInitEv(ptr dead_on_unwind writable sret(%"class.TW::CommonTON::StateInit") align 8 %37, ptr noundef nonnull align 8 dereferenceable(40) %84)
          to label %85 unwind label %130

85:                                               ; preds = %83
  %86 = getelementptr inbounds %"struct.TW::CommonTON::MessageData", ptr %0, i32 0, i32 1
  %87 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt8optionalIN2TW9CommonTON9StateInitEEaSIS2_EENSt9enable_ifIX7__and_vISt6__not_ISt7is_sameIS3_NSt9remove_cvINSt16remove_referenceIT_E4typeEE4typeEEES6_ISt6__and_IJSt9is_scalarIS2_ES7_IS2_NSt5decayISA_E4typeEEEEESt16is_constructibleIS2_JSA_EESt13is_assignableIRS2_SA_EEERS3_E4typeEOSA_(ptr noundef nonnull align 8 dereferenceable(40) %86, ptr noundef nonnull align 8 dereferenceable(32) %37) #8
  call void @_ZN2TW9CommonTON9StateInitD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %37) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %37) #8
  br label %134

88:                                               ; preds = %9
  %89 = landingpad { ptr, i32 }
          cleanup
  %90 = extractvalue { ptr, i32 } %89, 0
  store ptr %90, ptr %24, align 8
  %91 = extractvalue { ptr, i32 } %89, 1
  store i32 %91, ptr %25, align 4
  br label %153

92:                                               ; preds = %56
  %93 = landingpad { ptr, i32 }
          cleanup
  %94 = extractvalue { ptr, i32 } %93, 0
  store ptr %94, ptr %24, align 8
  %95 = extractvalue { ptr, i32 } %93, 1
  store i32 %95, ptr %25, align 4
  br label %152

96:                                               ; preds = %57
  %97 = landingpad { ptr, i32 }
          cleanup
  %98 = extractvalue { ptr, i32 } %97, 0
  store ptr %98, ptr %24, align 8
  %99 = extractvalue { ptr, i32 } %97, 1
  store i32 %99, ptr %25, align 4
  br label %151

100:                                              ; preds = %58
  %101 = landingpad { ptr, i32 }
          cleanup
  %102 = extractvalue { ptr, i32 } %101, 0
  store ptr %102, ptr %24, align 8
  %103 = extractvalue { ptr, i32 } %101, 1
  store i32 %103, ptr %25, align 4
  call void @_ZNSt15__new_allocatorIhED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %29) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %29) #8
  br label %150

104:                                              ; preds = %65
  %105 = landingpad { ptr, i32 }
          cleanup
  %106 = extractvalue { ptr, i32 } %105, 0
  store ptr %106, ptr %24, align 8
  %107 = extractvalue { ptr, i32 } %105, 1
  store i32 %107, ptr %25, align 4
  br label %149

108:                                              ; preds = %67
  %109 = landingpad { ptr, i32 }
          cleanup
  %110 = extractvalue { ptr, i32 } %109, 0
  store ptr %110, ptr %24, align 8
  %111 = extractvalue { ptr, i32 } %109, 1
  store i32 %111, ptr %25, align 4
  br label %148

112:                                              ; preds = %73
  %113 = landingpad { ptr, i32 }
          cleanup
  %114 = extractvalue { ptr, i32 } %113, 0
  store ptr %114, ptr %24, align 8
  %115 = extractvalue { ptr, i32 } %113, 1
  store i32 %115, ptr %25, align 4
  br label %125

116:                                              ; preds = %75
  %117 = landingpad { ptr, i32 }
          cleanup
  %118 = extractvalue { ptr, i32 } %117, 0
  store ptr %118, ptr %24, align 8
  %119 = extractvalue { ptr, i32 } %117, 1
  store i32 %119, ptr %25, align 4
  br label %124

120:                                              ; preds = %77, %76
  %121 = landingpad { ptr, i32 }
          cleanup
  %122 = extractvalue { ptr, i32 } %121, 0
  store ptr %122, ptr %24, align 8
  %123 = extractvalue { ptr, i32 } %121, 1
  store i32 %123, ptr %25, align 4
  call void @_ZN2TW9Everscale8InitDataD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %33) #8
  br label %124

124:                                              ; preds = %120, %116
  call void @_ZN2TW9PublicKeyD2Ev(ptr noundef nonnull align 8 dereferenceable(28) %34) #8
  br label %125

125:                                              ; preds = %124, %112
  call void @llvm.lifetime.end.p0(i64 40, ptr %33) #8
  call void @llvm.lifetime.end.p0(i64 33, ptr %32) #8
  br label %147

126:                                              ; preds = %78
  %127 = landingpad { ptr, i32 }
          cleanup
  %128 = extractvalue { ptr, i32 } %127, 0
  store ptr %128, ptr %24, align 8
  %129 = extractvalue { ptr, i32 } %127, 1
  store i32 %129, ptr %25, align 4
  call void @_ZNSt12__shared_ptrIN2TW9CommonTON13CommonMsgInfoELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %36) #8
  br label %146

130:                                              ; preds = %83
  %131 = landingpad { ptr, i32 }
          cleanup
  %132 = extractvalue { ptr, i32 } %131, 0
  store ptr %132, ptr %24, align 8
  %133 = extractvalue { ptr, i32 } %131, 1
  store i32 %133, ptr %25, align 4
  call void @llvm.lifetime.end.p0(i64 32, ptr %37) #8
  br label %145

134:                                              ; preds = %85, %79
  call void @llvm.lifetime.start.p0(i64 16, ptr %38) #8
  invoke void @_ZN2TW9CommonTON11CellBuilder8intoCellEv(ptr dead_on_unwind writable sret(%"class.std::shared_ptr") align 8 %38, ptr noundef nonnull align 8 dereferenceable(56) %23)
          to label %135 unwind label %139

135:                                              ; preds = %134
  %136 = getelementptr inbounds %"struct.TW::CommonTON::MessageData", ptr %0, i32 0, i32 2
  %137 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt8optionalISt10shared_ptrIN2TW9CommonTON4CellEEEaSIS4_EENSt9enable_ifIX7__and_vISt6__not_ISt7is_sameIS5_NSt9remove_cvINSt16remove_referenceIT_E4typeEE4typeEEES8_ISt6__and_IJSt9is_scalarIS4_ES9_IS4_NSt5decayISC_E4typeEEEEESt16is_constructibleIS4_JSC_EESt13is_assignableIRS4_SC_EEERS5_E4typeEOSC_(ptr noundef nonnull align 8 dereferenceable(24) %136, ptr noundef nonnull align 8 dereferenceable(16) %38) #8
  call void @_ZNSt12__shared_ptrIN2TW9CommonTON4CellELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %38) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %38) #8
  store i1 true, ptr %35, align 1
  %138 = load i1, ptr %35, align 1
  br i1 %138, label %144, label %143

139:                                              ; preds = %134
  %140 = landingpad { ptr, i32 }
          cleanup
  %141 = extractvalue { ptr, i32 } %140, 0
  store ptr %141, ptr %24, align 8
  %142 = extractvalue { ptr, i32 } %140, 1
  store i32 %142, ptr %25, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %38) #8
  br label %145

143:                                              ; preds = %135
  call void @_ZN2TW9CommonTON11MessageDataD2Ev(ptr noundef nonnull align 8 dereferenceable(80) %0) #8
  br label %144

144:                                              ; preds = %143, %135
  call void @_ZNSt12__shared_ptrIN2TW9CommonTON28ExternalInboundMessageHeaderELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %31) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %31) #8
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %30) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %30) #8
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %28) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %28) #8
  call void @_ZNSt12__shared_ptrIN2TW9CommonTON4CellELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %27) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %27) #8
  call void @_ZN2TW9CommonTON11CellBuilderD2Ev(ptr noundef nonnull align 8 dereferenceable(56) %26) #8
  call void @llvm.lifetime.end.p0(i64 56, ptr %26) #8
  call void @_ZN2TW9CommonTON11CellBuilderD2Ev(ptr noundef nonnull align 8 dereferenceable(56) %23) #8
  call void @llvm.lifetime.end.p0(i64 56, ptr %23) #8
  call void @llvm.lifetime.end.p0(i64 56, ptr %22) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #8
  call void @_ZNSt4pairIN2TW9Everscale8InitDataEbED2Ev(ptr noundef nonnull align 8 dereferenceable(41) %19) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #8
  ret void

145:                                              ; preds = %139, %130
  call void @_ZN2TW9CommonTON11MessageDataD2Ev(ptr noundef nonnull align 8 dereferenceable(80) %0) #8
  br label %146

146:                                              ; preds = %145, %126
  call void @_ZNSt12__shared_ptrIN2TW9CommonTON28ExternalInboundMessageHeaderELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %31) #8
  br label %147

147:                                              ; preds = %146, %125
  call void @llvm.lifetime.end.p0(i64 16, ptr %31) #8
  br label %148

148:                                              ; preds = %147, %108
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %30) #8
  br label %149

149:                                              ; preds = %148, %104
  call void @llvm.lifetime.end.p0(i64 24, ptr %30) #8
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %28) #8
  br label %150

150:                                              ; preds = %149, %100
  call void @llvm.lifetime.end.p0(i64 24, ptr %28) #8
  call void @_ZNSt12__shared_ptrIN2TW9CommonTON4CellELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %27) #8
  br label %151

151:                                              ; preds = %150, %96
  call void @llvm.lifetime.end.p0(i64 16, ptr %27) #8
  call void @_ZN2TW9CommonTON11CellBuilderD2Ev(ptr noundef nonnull align 8 dereferenceable(56) %26) #8
  br label %152

152:                                              ; preds = %151, %92
  call void @llvm.lifetime.end.p0(i64 56, ptr %26) #8
  call void @_ZN2TW9CommonTON11CellBuilderD2Ev(ptr noundef nonnull align 8 dereferenceable(56) %23) #8
  br label %153

153:                                              ; preds = %152, %88
  call void @llvm.lifetime.end.p0(i64 56, ptr %23) #8
  call void @llvm.lifetime.end.p0(i64 56, ptr %22) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #8
  call void @_ZNSt4pairIN2TW9Everscale8InitDataEbED2Ev(ptr noundef nonnull align 8 dereferenceable(41) %19) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #8
  br label %154

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

; Function Attrs: inlinehint mustprogress uwtable
declare hidden void @"_ZZN2TW9Everscale19createSignedMessageERNS_9PublicKeyERNS_10PrivateKeyEbjmjNS0_7AddressERKSt10shared_ptrINS_9CommonTON4CellEEENK3$_0clERKS1_SB_"(ptr dead_on_unwind noalias writable sret(%"struct.std::pair") align 8, ptr noundef nonnull align 1 dereferenceable(1), ptr noundef nonnull align 8 dereferenceable(28), ptr noundef nonnull align 8 dereferenceable(16)) #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(40) ptr @_ZSt3getILm0EN2TW9Everscale8InitDataEbEONSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeEOS7_(ptr noundef nonnull align 8 dereferenceable(41)) #5

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 1 dereferenceable(1) ptr @_ZSt3getILm1EN2TW9Everscale8InitDataEbEONSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeEOS7_(ptr noundef nonnull align 8 dereferenceable(41)) #5

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

declare void @_ZNK2TW9Everscale8InitData19makeTransferPayloadEjRKNS0_6Wallet4GiftE(ptr dead_on_unwind writable sret(%"class.TW::CommonTON::CellBuilder") align 8, ptr noundef nonnull align 8 dereferenceable(40), i32 noundef, ptr noundef nonnull align 8 dereferenceable(50)) #2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN2TW9CommonTON11CellBuilderC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(56)) unnamed_addr #4 align 2

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

; Function Attrs: mustprogress nounwind willreturn memory(none) uwtable
declare dso_local noundef ptr @_ZNSt5arrayIhLm32EE5beginEv(ptr noundef nonnull align 1 dereferenceable(32)) #7 align 2

; Function Attrs: mustprogress nounwind willreturn memory(none) uwtable
declare dso_local noundef ptr @_ZNSt5arrayIhLm32EE3endEv(ptr noundef nonnull align 1 dereferenceable(32)) #7 align 2

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

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

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

declare void @_ZNK2TW10PrivateKey4signERKSt6vectorIhSaIhEE7TWCurve(ptr dead_on_unwind writable sret(%"class.std::vector") align 8, ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 8 dereferenceable(24), i32 noundef) #2

declare void @_ZN2TW9CommonTON11CellBuilder10prependRawERSt6vectorIhSaIhEEt(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(24), i16 noundef zeroext) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIhSaIhEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) #5 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt11make_sharedIN2TW9CommonTON28ExternalInboundMessageHeaderEJNS1_11AddressDataEEESt10shared_ptrINSt9enable_ifIXntsr8is_arrayIT_EE5valueES6_E4typeEEDpOT0_(ptr dead_on_unwind noalias writable sret(%"class.std::shared_ptr.29") align 8, ptr noundef nonnull align 1 dereferenceable(33)) #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN2TW9PublicKeyC2ERKS0_(ptr noundef nonnull align 8 dereferenceable(28), ptr noundef nonnull align 8 dereferenceable(28)) unnamed_addr #4 align 2

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

declare void @_ZNK2TW9Everscale8InitData11computeAddrEa(ptr dead_on_unwind writable sret(%"struct.TW::CommonTON::AddressData") align 1, ptr noundef nonnull align 8 dereferenceable(40), i8 noundef signext) #2

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

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

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

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

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

declare void @_ZNK2TW9Everscale8InitData13makeStateInitEv(ptr dead_on_unwind writable sret(%"class.TW::CommonTON::StateInit") align 8, ptr noundef nonnull align 8 dereferenceable(40)) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt8optionalIN2TW9CommonTON9StateInitEEaSIS2_EENSt9enable_ifIX7__and_vISt6__not_ISt7is_sameIS3_NSt9remove_cvINSt16remove_referenceIT_E4typeEE4typeEEES6_ISt6__and_IJSt9is_scalarIS2_ES7_IS2_NSt5decayISA_E4typeEEEEESt16is_constructibleIS2_JSA_EESt13is_assignableIRS2_SA_EEERS3_E4typeEOSA_(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 8 dereferenceable(32)) #5 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt8optionalISt10shared_ptrIN2TW9CommonTON4CellEEEaSIS4_EENSt9enable_ifIX7__and_vISt6__not_ISt7is_sameIS5_NSt9remove_cvINSt16remove_referenceIT_E4typeEE4typeEEES8_ISt6__and_IJSt9is_scalarIS4_ES9_IS4_NSt5decayISC_E4typeEEEEESt16is_constructibleIS4_JSC_EESt13is_assignableIRS4_SC_EEERS5_E4typeEOSC_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(16)) #5 align 2

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

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

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

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { 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 #4 = { 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 #5 = { 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 #6 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #7 = { mustprogress nounwind willreturn memory(none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #8 = { nounwind }
attributes #9 = { nounwind willreturn memory(none) }

!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 = !{!"bool", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"long", !7, i64 0}
!15 = !{i8 0, i8 2}
!16 = !{}
!17 = !{!18, !10, i64 0}
!18 = !{!"_ZTSN2TW9Everscale6Wallet4GiftE", !10, i64 0, !14, i64 8, !19, i64 16, !7, i64 49}
!19 = !{!"_ZTSN2TW9Everscale7AddressE", !20, i64 0}
!20 = !{!"_ZTSN2TW9CommonTON11AddressDataE", !7, i64 0, !21, i64 1}
!21 = !{!"_ZTSSt5arrayIhLm32EE", !7, i64 0}
!22 = !{!18, !14, i64 8}
!23 = !{i64 0, i64 1, !24, i64 1, i64 32, !24}
!24 = !{!7, !7, i64 0}
!25 = !{!18, !7, i64 49}


; 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::shared_ptr" = type { %"class.std::__shared_ptr" }
%"class.std::__shared_ptr" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"struct.TW::CommonTON::MessageData" = type { %"class.std::shared_ptr.5", %"class.std::optional", %"class.std::optional.10" }
%"class.std::shared_ptr.5" = type { %"class.std::__shared_ptr.6" }
%"class.std::__shared_ptr.6" = type { ptr, %"class.std::__shared_count" }
%"class.std::optional" = type { %"struct.std::_Optional_base" }
%"struct.std::_Optional_base" = type { %"struct.std::_Optional_payload" }
%"struct.std::_Optional_payload" = type { %"struct.std::_Optional_payload.base", [7 x i8] }
%"struct.std::_Optional_payload.base" = type { %"struct.std::_Optional_payload_base.base" }
%"struct.std::_Optional_payload_base.base" = type <{ %"union.std::_Optional_payload_base<TW::CommonTON::StateInit>::_Storage", i8 }>
%"union.std::_Optional_payload_base<TW::CommonTON::StateInit>::_Storage" = type { %"class.TW::CommonTON::StateInit" }
%"class.TW::CommonTON::StateInit" = type { %"class.std::shared_ptr", %"class.std::shared_ptr" }
%"class.std::optional.10" = type { %"struct.std::_Optional_base.11" }
%"struct.std::_Optional_base.11" = type { %"struct.std::_Optional_payload.13" }
%"struct.std::_Optional_payload.13" = type { %"struct.std::_Optional_payload.base.17", [7 x i8] }
%"struct.std::_Optional_payload.base.17" = type { %"struct.std::_Optional_payload_base.base.16" }
%"struct.std::_Optional_payload_base.base.16" = type <{ %"union.std::_Optional_payload_base<std::shared_ptr<TW::CommonTON::Cell>>::_Storage", i8 }>
%"union.std::_Optional_payload_base<std::shared_ptr<TW::CommonTON::Cell>>::_Storage" = type { %"class.std::shared_ptr" }
%"class.TW::Everscale::Address" = type { %"struct.TW::CommonTON::AddressData" }
%"struct.TW::CommonTON::AddressData" = type { i8, %"struct.std::array" }
%"struct.std::array" = type { [32 x i8] }
%class.anon = type { i8 }
%"struct.std::pair" = type <{ %"class.TW::Everscale::InitData", i8, [7 x i8] }>
%"class.TW::Everscale::InitData" = type { i32, i32, %"class.TW::PublicKey" }
%"class.TW::PublicKey" = type <{ %"class.std::vector", i32, [4 x i8] }>
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = 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 }
%"struct.TW::Everscale::Wallet::Gift" = type <{ i8, [7 x i8], i64, %"class.TW::Everscale::Address", i8, [6 x i8] }>
%"class.TW::CommonTON::CellBuilder" = type { i16, %"class.std::vector", %"class.std::vector.0" }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<std::shared_ptr<TW::CommonTON::Cell>, std::allocator<std::shared_ptr<TW::CommonTON::Cell>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::shared_ptr<TW::CommonTON::Cell>, std::allocator<std::shared_ptr<TW::CommonTON::Cell>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::shared_ptr<TW::CommonTON::Cell>, std::allocator<std::shared_ptr<TW::CommonTON::Cell>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::shared_ptr<TW::CommonTON::Cell>, std::allocator<std::shared_ptr<TW::CommonTON::Cell>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator" = type { i8 }
%"class.std::shared_ptr.29" = type { %"class.std::__shared_ptr.30" }
%"class.std::__shared_ptr.30" = type { ptr, %"class.std::__shared_count" }

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

declare i32 @__gxx_personality_v0(...)

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

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

declare void @_ZN2TW9CommonTON11CellBuilder8intoCellEv(ptr dead_on_unwind writable sret(%"class.std::shared_ptr") align 8, ptr noundef nonnull align 8 dereferenceable(56)) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN2TW9Everscale19createSignedMessageERNS_9PublicKeyERNS_10PrivateKeyEbjmjNS0_7AddressERKSt10shared_ptrINS_9CommonTON4CellEE(ptr dead_on_unwind noalias writable sret(%"struct.TW::CommonTON::MessageData") align 8 %0, ptr noundef nonnull align 8 dereferenceable(28) %1, ptr noundef nonnull align 8 dereferenceable(40) %2, i1 noundef zeroext %3, i32 noundef %4, i64 noundef %5, i32 noundef %6, ptr nocapture noundef readonly byval(%"class.TW::Everscale::Address") align 8 %7, ptr noundef nonnull align 8 dereferenceable(16) %8) local_unnamed_addr #3 personality ptr @__gxx_personality_v0 {
  %10 = alloca %class.anon, align 1
  %11 = alloca %"struct.std::pair", align 8
  %12 = alloca %"struct.TW::Everscale::Wallet::Gift", align 8
  %13 = alloca %"class.TW::CommonTON::CellBuilder", align 8
  %14 = alloca %"class.TW::CommonTON::CellBuilder", align 8
  %15 = alloca %"class.std::shared_ptr", align 8
  %16 = alloca %"class.std::vector", align 8
  %17 = alloca %"class.std::allocator", align 1
  %18 = alloca %"class.std::vector", align 8
  %19 = alloca %"class.std::shared_ptr.29", align 8
  %20 = alloca %"struct.TW::CommonTON::AddressData", align 1
  %21 = alloca %"class.TW::Everscale::InitData", align 8
  %22 = alloca %"class.TW::PublicKey", align 8
  %23 = alloca %"class.std::shared_ptr.5", align 8
  %24 = alloca %"class.TW::CommonTON::StateInit", align 8
  %25 = alloca %"class.std::shared_ptr", align 8
  %26 = zext i1 %3 to i8
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %10) #8
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %11) #8
  call void @"_ZZN2TW9Everscale19createSignedMessageERNS_9PublicKeyERNS_10PrivateKeyEbjmjNS0_7AddressERKSt10shared_ptrINS_9CommonTON4CellEEENK3$_0clERKS1_SB_"(ptr dead_on_unwind nonnull writable sret(%"struct.std::pair") align 8 %11, ptr noundef nonnull align 1 dereferenceable(1) %10, ptr noundef nonnull align 8 dereferenceable(28) %1, ptr noundef nonnull align 8 dereferenceable(16) %8)
  %27 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZSt3getILm0EN2TW9Everscale8InitDataEbEONSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeEOS7_(ptr noundef nonnull align 8 dereferenceable(41) %11) #8
  %28 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZSt3getILm1EN2TW9Everscale8InitDataEbEONSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeEOS7_(ptr noundef nonnull align 8 dereferenceable(41) %11) #8
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %12) #8
  store i8 %26, ptr %12, align 8, !tbaa !5
  %29 = getelementptr inbounds i8, ptr %12, i64 8
  store i64 %5, ptr %29, align 8, !tbaa !14
  %30 = getelementptr inbounds i8, ptr %12, i64 16
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(33) %30, ptr noundef nonnull align 8 dereferenceable(33) %7, i64 33, i1 false), !tbaa.struct !15
  %31 = getelementptr inbounds i8, ptr %12, i64 49
  %32 = trunc i32 %4 to i8
  store i8 %32, ptr %31, align 1, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %13) #8
  invoke void @_ZNK2TW9Everscale8InitData19makeTransferPayloadEjRKNS0_6Wallet4GiftE(ptr dead_on_unwind nonnull writable sret(%"class.TW::CommonTON::CellBuilder") align 8 %13, ptr noundef nonnull align 8 dereferenceable(40) %27, i32 noundef %6, ptr noundef nonnull align 8 dereferenceable(50) %12)
          to label %33 unwind label %57

33:                                               ; preds = %9
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %14) #8
  invoke void @_ZN2TW9CommonTON11CellBuilderC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(56) %14, ptr noundef nonnull align 8 dereferenceable(56) %13)
          to label %34 unwind label %59

34:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %15) #8
  invoke void @_ZN2TW9CommonTON11CellBuilder8intoCellEv(ptr dead_on_unwind nonnull writable sret(%"class.std::shared_ptr") align 8 %15, ptr noundef nonnull align 8 dereferenceable(56) %14)
          to label %35 unwind label %61

35:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %16) #8
  %36 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN2TW9CommonTON4CellELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %15) #8
  %37 = getelementptr inbounds i8, ptr %36, i64 106
  %38 = call noundef ptr @_ZNSt5arrayIhLm32EE5beginEv(ptr noundef nonnull align 1 dereferenceable(32) %37) #9
  %39 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN2TW9CommonTON4CellELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %15) #8
  %40 = getelementptr inbounds i8, ptr %39, i64 106
  %41 = call noundef ptr @_ZNSt5arrayIhLm32EE3endEv(ptr noundef nonnull align 1 dereferenceable(32) %40) #9
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %17) #8
  call void @_ZNSaIhEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #8
  invoke void @_ZNSt6vectorIhSaIhEEC2IPhvEET_S4_RKS0_(ptr noundef nonnull align 8 dereferenceable(24) %16, ptr noundef %38, ptr noundef %41, ptr noundef nonnull align 1 dereferenceable(1) %17)
          to label %42 unwind label %63

42:                                               ; preds = %35
  call void @_ZNSt15__new_allocatorIhED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %17) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %18) #8
  invoke void @_ZNK2TW10PrivateKey4signERKSt6vectorIhSaIhEE7TWCurve(ptr dead_on_unwind nonnull writable sret(%"class.std::vector") align 8 %18, ptr noundef nonnull align 8 dereferenceable(40) %2, ptr noundef nonnull align 8 dereferenceable(24) %16, i32 noundef 1)
          to label %43 unwind label %65

43:                                               ; preds = %42
  %44 = call noundef i64 @_ZNKSt6vectorIhSaIhEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %18) #8
  %45 = trunc i64 %44 to i16
  %46 = shl i16 %45, 3
  invoke void @_ZN2TW9CommonTON11CellBuilder10prependRawERSt6vectorIhSaIhEEt(ptr noundef nonnull align 8 dereferenceable(56) %13, ptr noundef nonnull align 8 dereferenceable(24) %18, i16 noundef zeroext %46)
          to label %47 unwind label %67

47:                                               ; preds = %43
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %19) #8
  call void @llvm.lifetime.start.p0(i64 33, ptr nonnull %20) #8
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %21) #8
  invoke void @_ZN2TW9PublicKeyC2ERKS0_(ptr noundef nonnull align 8 dereferenceable(28) %22, ptr noundef nonnull align 8 dereferenceable(28) %1)
          to label %48 unwind label %69

48:                                               ; preds = %47
  call void @_ZN2TW9Everscale8InitDataC2ENS_9PublicKeyE(ptr noundef nonnull align 8 dereferenceable(40) %21, ptr noundef nonnull %22)
  invoke void @_ZNK2TW9Everscale8InitData11computeAddrEa(ptr dead_on_unwind nonnull writable sret(%"struct.TW::CommonTON::AddressData") align 1 %20, ptr noundef nonnull align 8 dereferenceable(40) %21, i8 noundef signext 0)
          to label %49 unwind label %71

49:                                               ; preds = %48
  invoke void @_ZSt11make_sharedIN2TW9CommonTON28ExternalInboundMessageHeaderEJNS1_11AddressDataEEESt10shared_ptrINSt9enable_ifIXntsr8is_arrayIT_EE5valueES6_E4typeEEDpOT0_(ptr dead_on_unwind nonnull writable sret(%"class.std::shared_ptr.29") align 8 %19, ptr noundef nonnull align 1 dereferenceable(33) %20)
          to label %50 unwind label %71

50:                                               ; preds = %49
  call void @_ZN2TW9Everscale8InitDataD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %21) #8
  call void @_ZN2TW9PublicKeyD2Ev(ptr noundef nonnull align 8 dereferenceable(28) %22) #8
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %21) #8
  call void @llvm.lifetime.end.p0(i64 33, ptr nonnull %20) #8
  call void @_ZNSt10shared_ptrIN2TW9CommonTON13CommonMsgInfoEEC2INS1_28ExternalInboundMessageHeaderEvEERKS_IT_E(ptr noundef nonnull align 8 dereferenceable(16) %23, ptr noundef nonnull align 8 dereferenceable(16) %19) #8
  call void @_ZN2TW9CommonTON11MessageDataC2ESt10shared_ptrINS0_13CommonMsgInfoEE(ptr noundef nonnull align 8 dereferenceable(80) %0, ptr noundef nonnull %23)
  call void @_ZNSt12__shared_ptrIN2TW9CommonTON13CommonMsgInfoELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %23) #8
  %51 = load i8, ptr %28, align 1, !tbaa !18, !range !19, !noundef !20
  %52 = trunc nuw i8 %51 to i1
  br i1 %52, label %53, label %76

53:                                               ; preds = %50
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %24) #8
  invoke void @_ZNK2TW9Everscale8InitData13makeStateInitEv(ptr dead_on_unwind nonnull writable sret(%"class.TW::CommonTON::StateInit") align 8 %24, ptr noundef nonnull align 8 dereferenceable(40) %27)
          to label %54 unwind label %74

54:                                               ; preds = %53
  %55 = getelementptr inbounds i8, ptr %0, i64 16
  %56 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt8optionalIN2TW9CommonTON9StateInitEEaSIS2_EENSt9enable_ifIX7__and_vISt6__not_ISt7is_sameIS3_NSt9remove_cvINSt16remove_referenceIT_E4typeEE4typeEEES6_ISt6__and_IJSt9is_scalarIS2_ES7_IS2_NSt5decayISA_E4typeEEEEESt16is_constructibleIS2_JSA_EESt13is_assignableIRS2_SA_EEERS3_E4typeEOSA_(ptr noundef nonnull align 8 dereferenceable(40) %55, ptr noundef nonnull align 8 dereferenceable(32) %24) #8
  call void @_ZN2TW9CommonTON9StateInitD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %24) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %24) #8
  br label %76

57:                                               ; preds = %9
  %58 = landingpad { ptr, i32 }
          cleanup
  br label %89

59:                                               ; preds = %33
  %60 = landingpad { ptr, i32 }
          cleanup
  br label %88

61:                                               ; preds = %34
  %62 = landingpad { ptr, i32 }
          cleanup
  br label %87

63:                                               ; preds = %35
  %64 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIhED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %17) #8
  br label %86

65:                                               ; preds = %42
  %66 = landingpad { ptr, i32 }
          cleanup
  br label %85

67:                                               ; preds = %43
  %68 = landingpad { ptr, i32 }
          cleanup
  br label %84

69:                                               ; preds = %47
  %70 = landingpad { ptr, i32 }
          cleanup
  br label %73

71:                                               ; preds = %49, %48
  %72 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN2TW9Everscale8InitDataD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %21) #8
  call void @_ZN2TW9PublicKeyD2Ev(ptr noundef nonnull align 8 dereferenceable(28) %22) #8
  br label %73

73:                                               ; preds = %71, %69
  %.pn = phi { ptr, i32 } [ %72, %71 ], [ %70, %69 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %21) #8
  call void @llvm.lifetime.end.p0(i64 33, ptr nonnull %20) #8
  br label %83

74:                                               ; preds = %53
  %75 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %24) #8
  br label %82

76:                                               ; preds = %54, %50
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %25) #8
  invoke void @_ZN2TW9CommonTON11CellBuilder8intoCellEv(ptr dead_on_unwind nonnull writable sret(%"class.std::shared_ptr") align 8 %25, ptr noundef nonnull align 8 dereferenceable(56) %13)
          to label %77 unwind label %80

77:                                               ; preds = %76
  %78 = getelementptr inbounds i8, ptr %0, i64 56
  %79 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt8optionalISt10shared_ptrIN2TW9CommonTON4CellEEEaSIS4_EENSt9enable_ifIX7__and_vISt6__not_ISt7is_sameIS5_NSt9remove_cvINSt16remove_referenceIT_E4typeEE4typeEEES8_ISt6__and_IJSt9is_scalarIS4_ES9_IS4_NSt5decayISC_E4typeEEEEESt16is_constructibleIS4_JSC_EESt13is_assignableIRS4_SC_EEERS5_E4typeEOSC_(ptr noundef nonnull align 8 dereferenceable(24) %78, ptr noundef nonnull align 8 dereferenceable(16) %25) #8
  call void @_ZNSt12__shared_ptrIN2TW9CommonTON4CellELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %25) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %25) #8
  call void @_ZNSt12__shared_ptrIN2TW9CommonTON28ExternalInboundMessageHeaderELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %19) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %19) #8
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %18) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %18) #8
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %16) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %16) #8
  call void @_ZNSt12__shared_ptrIN2TW9CommonTON4CellELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %15) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %15) #8
  call void @_ZN2TW9CommonTON11CellBuilderD2Ev(ptr noundef nonnull align 8 dereferenceable(56) %14) #8
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %14) #8
  call void @_ZN2TW9CommonTON11CellBuilderD2Ev(ptr noundef nonnull align 8 dereferenceable(56) %13) #8
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %13) #8
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %12) #8
  call void @_ZNSt4pairIN2TW9Everscale8InitDataEbED2Ev(ptr noundef nonnull align 8 dereferenceable(41) %11) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %11) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %10) #8
  ret void

80:                                               ; preds = %76
  %81 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %25) #8
  br label %82

82:                                               ; preds = %80, %74
  %.pn23 = phi { ptr, i32 } [ %81, %80 ], [ %75, %74 ]
  call void @_ZN2TW9CommonTON11MessageDataD2Ev(ptr noundef nonnull align 8 dereferenceable(80) %0) #8
  call void @_ZNSt12__shared_ptrIN2TW9CommonTON28ExternalInboundMessageHeaderELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %19) #8
  br label %83

83:                                               ; preds = %82, %73
  %.pn23.pn = phi { ptr, i32 } [ %.pn23, %82 ], [ %.pn, %73 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %19) #8
  br label %84

84:                                               ; preds = %83, %67
  %.pn23.pn.pn = phi { ptr, i32 } [ %.pn23.pn, %83 ], [ %68, %67 ]
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %18) #8
  br label %85

85:                                               ; preds = %84, %65
  %.pn23.pn.pn.pn = phi { ptr, i32 } [ %.pn23.pn.pn, %84 ], [ %66, %65 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %18) #8
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %16) #8
  br label %86

86:                                               ; preds = %85, %63
  %.pn23.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn23.pn.pn.pn, %85 ], [ %64, %63 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %16) #8
  call void @_ZNSt12__shared_ptrIN2TW9CommonTON4CellELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %15) #8
  br label %87

87:                                               ; preds = %86, %61
  %.pn23.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn23.pn.pn.pn.pn, %86 ], [ %62, %61 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %15) #8
  call void @_ZN2TW9CommonTON11CellBuilderD2Ev(ptr noundef nonnull align 8 dereferenceable(56) %14) #8
  br label %88

88:                                               ; preds = %87, %59
  %.pn23.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn23.pn.pn.pn.pn.pn, %87 ], [ %60, %59 ]
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %14) #8
  call void @_ZN2TW9CommonTON11CellBuilderD2Ev(ptr noundef nonnull align 8 dereferenceable(56) %13) #8
  br label %89

89:                                               ; preds = %88, %57
  %.pn23.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn23.pn.pn.pn.pn.pn.pn, %88 ], [ %58, %57 ]
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %13) #8
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %12) #8
  call void @_ZNSt4pairIN2TW9Everscale8InitDataEbED2Ev(ptr noundef nonnull align 8 dereferenceable(41) %11) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %11) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %10) #8
  resume { ptr, i32 } %.pn23.pn.pn.pn.pn.pn.pn.pn
}

; Function Attrs: inlinehint mustprogress uwtable
declare hidden void @"_ZZN2TW9Everscale19createSignedMessageERNS_9PublicKeyERNS_10PrivateKeyEbjmjNS0_7AddressERKSt10shared_ptrINS_9CommonTON4CellEEENK3$_0clERKS1_SB_"(ptr dead_on_unwind noalias writable sret(%"struct.std::pair") align 8, ptr noundef nonnull align 1 dereferenceable(1), ptr noundef nonnull align 8 dereferenceable(28), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(40) ptr @_ZSt3getILm0EN2TW9Everscale8InitDataEbEONSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeEOS7_(ptr noundef nonnull align 8 dereferenceable(41)) local_unnamed_addr #5

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 1 dereferenceable(1) ptr @_ZSt3getILm1EN2TW9Everscale8InitDataEbEONSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeEOS7_(ptr noundef nonnull align 8 dereferenceable(41)) local_unnamed_addr #5

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #6

declare void @_ZNK2TW9Everscale8InitData19makeTransferPayloadEjRKNS0_6Wallet4GiftE(ptr dead_on_unwind writable sret(%"class.TW::CommonTON::CellBuilder") align 8, ptr noundef nonnull align 8 dereferenceable(40), i32 noundef, ptr noundef nonnull align 8 dereferenceable(50)) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN2TW9CommonTON11CellBuilderC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(56)) unnamed_addr #4 align 2

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

; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) uwtable
declare dso_local noundef ptr @_ZNSt5arrayIhLm32EE5beginEv(ptr noundef nonnull align 1 dereferenceable(32)) local_unnamed_addr #7 align 2

; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) uwtable
declare dso_local noundef ptr @_ZNSt5arrayIhLm32EE3endEv(ptr noundef nonnull align 1 dereferenceable(32)) local_unnamed_addr #7 align 2

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

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

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

declare void @_ZNK2TW10PrivateKey4signERKSt6vectorIhSaIhEE7TWCurve(ptr dead_on_unwind writable sret(%"class.std::vector") align 8, ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 8 dereferenceable(24), i32 noundef) local_unnamed_addr #2

declare void @_ZN2TW9CommonTON11CellBuilder10prependRawERSt6vectorIhSaIhEEt(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(24), i16 noundef zeroext) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIhSaIhEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #5 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt11make_sharedIN2TW9CommonTON28ExternalInboundMessageHeaderEJNS1_11AddressDataEEESt10shared_ptrINSt9enable_ifIXntsr8is_arrayIT_EE5valueES6_E4typeEEDpOT0_(ptr dead_on_unwind noalias writable sret(%"class.std::shared_ptr.29") align 8, ptr noundef nonnull align 1 dereferenceable(33)) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN2TW9PublicKeyC2ERKS0_(ptr noundef nonnull align 8 dereferenceable(28), ptr noundef nonnull align 8 dereferenceable(28)) unnamed_addr #4 align 2

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

declare void @_ZNK2TW9Everscale8InitData11computeAddrEa(ptr dead_on_unwind writable sret(%"struct.TW::CommonTON::AddressData") align 1, ptr noundef nonnull align 8 dereferenceable(40), i8 noundef signext) local_unnamed_addr #2

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

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

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

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

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

declare void @_ZNK2TW9Everscale8InitData13makeStateInitEv(ptr dead_on_unwind writable sret(%"class.TW::CommonTON::StateInit") align 8, ptr noundef nonnull align 8 dereferenceable(40)) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt8optionalIN2TW9CommonTON9StateInitEEaSIS2_EENSt9enable_ifIX7__and_vISt6__not_ISt7is_sameIS3_NSt9remove_cvINSt16remove_referenceIT_E4typeEE4typeEEES6_ISt6__and_IJSt9is_scalarIS2_ES7_IS2_NSt5decayISA_E4typeEEEEESt16is_constructibleIS2_JSA_EESt13is_assignableIRS2_SA_EEERS3_E4typeEOSA_(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #5 align 2

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

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

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

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

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

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { 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 #4 = { 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 #5 = { 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 #6 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #7 = { mustprogress nofree nosync nounwind willreturn memory(none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #8 = { nounwind }
attributes #9 = { nounwind willreturn memory(none) }

!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, !7, i64 0}
!6 = !{!"_ZTSN2TW9Everscale6Wallet4GiftE", !7, i64 0, !10, i64 8, !11, i64 16, !8, i64 49}
!7 = !{!"bool", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"long", !8, i64 0}
!11 = !{!"_ZTSN2TW9Everscale7AddressE", !12, i64 0}
!12 = !{!"_ZTSN2TW9CommonTON11AddressDataE", !8, i64 0, !13, i64 1}
!13 = !{!"_ZTSSt5arrayIhLm32EE", !8, i64 0}
!14 = !{!6, !10, i64 8}
!15 = !{i64 0, i64 1, !16, i64 1, i64 32, !16}
!16 = !{!8, !8, i64 0}
!17 = !{!6, !8, i64 49}
!18 = !{!7, !7, i64 0}
!19 = !{i8 0, i8 2}
!20 = !{}


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