; LLVM IR from aspuru-guzik-group/qtorch :: src/main.ll (ZN6qtorch16ContractionTools13CalculateCostEiiiii)

; 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::weak_ptr" = type { %"class.std::__weak_ptr" }
%"class.std::__weak_ptr" = type { ptr, %"class.std::__weak_count" }
%"class.std::__weak_count" = type { ptr }
%"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 }
%"class.std::vector.14" = type { %"struct.std::_Vector_base.15" }
%"struct.std::_Vector_base.15" = type { %"struct.std::_Vector_base<std::shared_ptr<qtorch::Node>, std::allocator<std::shared_ptr<qtorch::Node>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::shared_ptr<qtorch::Node>, std::allocator<std::shared_ptr<qtorch::Node>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::shared_ptr<qtorch::Node>, std::allocator<std::shared_ptr<qtorch::Node>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::shared_ptr<qtorch::Node>, std::allocator<std::shared_ptr<qtorch::Node>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.__gnu_cxx::__normal_iterator.138" = type { ptr }
%"class.__gnu_cxx::__normal_iterator.115" = type { ptr }
%"class.std::uniform_int_distribution" = type { %"struct.std::uniform_int_distribution<>::param_type" }
%"struct.std::uniform_int_distribution<>::param_type" = type { i32, i32 }
%"class.std::initializer_list.215" = type { ptr, i64 }
%"class.std::allocator.16" = type { i8 }
%"class.qtorch::ContractionTools" = type { %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string", %"class.std::complex", %"class.std::vector.186", %"class.std::random_device", %"class.std::shared_ptr.178", %"class.std::mersenne_twister_engine", i8, i32 }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon.0 }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon.0 = type { i64, [8 x i8] }
%"class.std::complex" = type { { double, double } }
%"class.std::vector.186" = type { %"struct.std::_Vector_base.187" }
%"struct.std::_Vector_base.187" = type { %"struct.std::_Vector_base<std::shared_ptr<std::vector<std::shared_ptr<qtorch::Node>>>, std::allocator<std::shared_ptr<std::vector<std::shared_ptr<qtorch::Node>>>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::shared_ptr<std::vector<std::shared_ptr<qtorch::Node>>>, std::allocator<std::shared_ptr<std::vector<std::shared_ptr<qtorch::Node>>>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::shared_ptr<std::vector<std::shared_ptr<qtorch::Node>>>, std::allocator<std::shared_ptr<std::vector<std::shared_ptr<qtorch::Node>>>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::shared_ptr<std::vector<std::shared_ptr<qtorch::Node>>>, std::allocator<std::shared_ptr<std::vector<std::shared_ptr<qtorch::Node>>>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::random_device" = type { %union.anon.191 }
%union.anon.191 = type { %"class.std::mersenne_twister_engine" }
%"class.std::shared_ptr.178" = type { %"class.std::__shared_ptr.179" }
%"class.std::__shared_ptr.179" = type { ptr, %"class.std::__shared_count" }
%"class.std::mersenne_twister_engine" = type { [624 x i64], i64 }
%"class.qtorch::Node" = type { ptr, i32, i32, i32, i8, %"struct.std::pair", i8, %"class.std::vector", %"class.std::vector.4", %"class.std::vector.9", i32, %"class.std::__cxx11::basic_string" }
%"struct.std::pair" = type { i32, i32 }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::complex<double>, std::allocator<std::complex<double>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::complex<double>, std::allocator<std::complex<double>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::complex<double>, std::allocator<std::complex<double>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::complex<double>, std::allocator<std::complex<double>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.4" = type { %"struct.std::_Vector_base.5" }
%"struct.std::_Vector_base.5" = type { %"struct.std::_Vector_base<std::shared_ptr<qtorch::Wire>, std::allocator<std::shared_ptr<qtorch::Wire>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::shared_ptr<qtorch::Wire>, std::allocator<std::shared_ptr<qtorch::Wire>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::shared_ptr<qtorch::Wire>, std::allocator<std::shared_ptr<qtorch::Wire>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::shared_ptr<qtorch::Wire>, std::allocator<std::shared_ptr<qtorch::Wire>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.9" = type { %"struct.std::_Vector_base.10" }
%"struct.std::_Vector_base.10" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, 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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZN6qtorch4Node8GetWiresEv(ptr noundef nonnull align 8 dereferenceable(152)) #2 align 2

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6qtorch4Wire8GetNodeAEv(ptr dead_on_unwind noalias writable sret(%"class.std::weak_ptr") align 8, ptr noundef nonnull align 8 dereferenceable(44)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6qtorch4Wire8GetNodeBEv(ptr dead_on_unwind noalias writable sret(%"class.std::weak_ptr") align 8, ptr noundef nonnull align 8 dereferenceable(44)) #1 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNKSt8weak_ptrIN6qtorch4NodeEE4lockEv(ptr dead_on_unwind noalias writable sret(%"class.std::shared_ptr") align 8, ptr noundef nonnull align 8 dereferenceable(16)) #1 align 2

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPSt10shared_ptrIN6qtorch4WireEESt6vectorIS4_SaIS4_EEEEbRKNS_17__normal_iteratorIT_T0_EESE_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #3

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPSt10shared_ptrIN6qtorch4NodeEESt6vectorIS4_SaIS4_EEEEbRKNS_17__normal_iteratorIT_T0_EESE_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #3

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZStneIN6qtorch4NodeEEbRKSt10shared_ptrIT_EDn(ptr noundef nonnull align 8 dereferenceable(16), ptr) #3

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNSt24uniform_int_distributionIiEclISt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EEEEiRT_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(5000)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN6qtorch16ContractionTools22NumberOfConnectedWiresESt10shared_ptrINS_4NodeEES3_(ptr noundef nonnull align 8 dereferenceable(10128), ptr noundef, ptr noundef) #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef i64 @_ZN6qtorch16ContractionTools13CalculateCostEiiiii(ptr noundef nonnull align 8 dereferenceable(10128) %0, i32 noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4, i32 noundef %5) #2 align 2 personality ptr @__gxx_personality_v0 {
  %7 = alloca i64, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca %"class.std::shared_ptr", align 8
  %15 = alloca %"class.std::shared_ptr", align 8
  %16 = alloca ptr, align 8
  %17 = alloca i32, align 4
  %18 = alloca %"class.std::shared_ptr", align 8
  %19 = alloca %"class.std::shared_ptr", align 8
  %20 = alloca %"class.std::shared_ptr", align 8
  %21 = alloca i1, align 1
  %22 = alloca %"class.std::shared_ptr", align 8
  %23 = alloca i1, align 1
  %24 = alloca %"class.std::vector.14", align 8
  %25 = alloca %"class.std::vector.14", align 8
  %26 = alloca i32, align 4
  %27 = alloca %"class.std::shared_ptr", align 8
  %28 = alloca %"class.std::shared_ptr", align 8
  %29 = alloca i64, align 8
  %30 = alloca i32, align 4
  %31 = alloca ptr, align 8
  %32 = alloca %"class.__gnu_cxx::__normal_iterator.138", align 8
  %33 = alloca %"class.__gnu_cxx::__normal_iterator.138", align 8
  %34 = alloca i32, align 4
  %35 = alloca ptr, align 8
  %36 = alloca ptr, align 8
  %37 = alloca %"class.__gnu_cxx::__normal_iterator.115", align 8
  %38 = alloca %"class.__gnu_cxx::__normal_iterator.115", align 8
  %39 = alloca ptr, align 8
  %40 = alloca %"class.std::shared_ptr", align 8
  %41 = alloca %"class.std::weak_ptr", align 8
  %42 = alloca %"class.std::shared_ptr", align 8
  %43 = alloca i1, align 1
  %44 = alloca %"class.std::weak_ptr", align 8
  %45 = alloca i1, align 1
  %46 = alloca i1, align 1
  %47 = alloca i1, align 1
  %48 = alloca %"class.std::shared_ptr", align 8
  %49 = alloca %"class.std::weak_ptr", align 8
  %50 = alloca %"class.std::shared_ptr", align 8
  %51 = alloca %"class.std::weak_ptr", align 8
  %52 = alloca %"class.std::shared_ptr", align 8
  %53 = alloca %"class.std::weak_ptr", align 8
  %54 = alloca %"class.std::shared_ptr", align 8
  %55 = alloca %"class.std::weak_ptr", align 8
  %56 = alloca %"class.std::shared_ptr", align 8
  %57 = alloca %"class.std::weak_ptr", align 8
  %58 = alloca i32, align 4
  %59 = alloca i32, align 4
  %60 = alloca %"class.std::uniform_int_distribution", align 4
  %61 = alloca i32, align 4
  %62 = alloca %"class.std::vector.14", align 8
  %63 = alloca %"class.std::initializer_list.215", align 8
  %64 = alloca [1 x %"class.std::shared_ptr"], align 8
  %65 = alloca %"class.std::allocator.16", align 1
  %66 = alloca ptr, align 8
  %67 = alloca %"class.__gnu_cxx::__normal_iterator.115", align 8
  %68 = alloca %"class.__gnu_cxx::__normal_iterator.115", align 8
  %69 = alloca ptr, align 8
  %70 = alloca %"class.std::shared_ptr", align 8
  %71 = alloca %"class.std::weak_ptr", align 8
  %72 = alloca %"class.std::shared_ptr", align 8
  %73 = alloca i1, align 1
  %74 = alloca %"class.std::weak_ptr", align 8
  %75 = alloca i1, align 1
  %76 = alloca i1, align 1
  %77 = alloca i1, align 1
  %78 = alloca %"class.std::shared_ptr", align 8
  %79 = alloca %"class.std::weak_ptr", align 8
  %80 = alloca %"class.std::shared_ptr", align 8
  %81 = alloca %"class.std::weak_ptr", align 8
  %82 = alloca %"class.std::shared_ptr", align 8
  %83 = alloca %"class.std::weak_ptr", align 8
  %84 = alloca %"class.std::shared_ptr", align 8
  %85 = alloca %"class.std::weak_ptr", align 8
  %86 = alloca %"class.std::shared_ptr", align 8
  %87 = alloca %"class.std::weak_ptr", align 8
  %88 = alloca ptr, align 8
  %89 = alloca %"class.__gnu_cxx::__normal_iterator.138", align 8
  %90 = alloca %"class.__gnu_cxx::__normal_iterator.138", align 8
  %91 = alloca ptr, align 8
  %92 = alloca ptr, align 8
  %93 = alloca %"class.__gnu_cxx::__normal_iterator.138", align 8
  %94 = alloca %"class.__gnu_cxx::__normal_iterator.138", align 8
  %95 = alloca ptr, align 8
  store ptr %0, ptr %8, align 8, !tbaa !5
  store i32 %1, ptr %9, align 4, !tbaa !9
  store i32 %2, ptr %10, align 4, !tbaa !9
  store i32 %3, ptr %11, align 4, !tbaa !9
  store i32 %4, ptr %12, align 4, !tbaa !9
  store i32 %5, ptr %13, align 4, !tbaa !9
  %96 = load ptr, ptr %8, align 8
  %97 = load i32, ptr %9, align 4, !tbaa !9
  %98 = icmp eq i32 %97, 0
  br i1 %98, label %99, label %139

99:                                               ; preds = %6
  %100 = getelementptr inbounds %"class.qtorch::ContractionTools", ptr %96, i32 0, i32 5
  %101 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %100) #5
  %102 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6qtorch7Network20GetUncontractedNodesEv(ptr noundef nonnull align 8 dereferenceable(380) %101) #5
  %103 = load i32, ptr %10, align 4, !tbaa !9
  %104 = sext i32 %103 to i64
  %105 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %102, i64 noundef %104) #5
  %106 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %105) #5
  %107 = getelementptr inbounds %"class.qtorch::Node", ptr %106, i32 0, i32 1
  %108 = load i32, ptr %107, align 8, !tbaa !11
  %109 = getelementptr inbounds %"class.qtorch::ContractionTools", ptr %96, i32 0, i32 5
  %110 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %109) #5
  %111 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6qtorch7Network20GetUncontractedNodesEv(ptr noundef nonnull align 8 dereferenceable(380) %110) #5
  %112 = load i32, ptr %11, align 4, !tbaa !9
  %113 = sext i32 %112 to i64
  %114 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %111, i64 noundef %113) #5
  %115 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %114) #5
  %116 = getelementptr inbounds %"class.qtorch::Node", ptr %115, i32 0, i32 1
  %117 = load i32, ptr %116, align 8, !tbaa !11
  %118 = add nsw i32 %108, %117
  %119 = getelementptr inbounds %"class.qtorch::ContractionTools", ptr %96, i32 0, i32 5
  %120 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %119) #5
  %121 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6qtorch7Network20GetUncontractedNodesEv(ptr noundef nonnull align 8 dereferenceable(380) %120) #5
  %122 = load i32, ptr %10, align 4, !tbaa !9
  %123 = sext i32 %122 to i64
  %124 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %121, i64 noundef %123) #5
  call void @_ZNSt10shared_ptrIN6qtorch4NodeEEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(16) %14, ptr noundef nonnull align 8 dereferenceable(16) %124) #5
  %125 = getelementptr inbounds %"class.qtorch::ContractionTools", ptr %96, i32 0, i32 5
  %126 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %125) #5
  %127 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6qtorch7Network20GetUncontractedNodesEv(ptr noundef nonnull align 8 dereferenceable(380) %126) #5
  %128 = load i32, ptr %11, align 4, !tbaa !9
  %129 = sext i32 %128 to i64
  %130 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %127, i64 noundef %129) #5
  call void @_ZNSt10shared_ptrIN6qtorch4NodeEEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(16) %15, ptr noundef nonnull align 8 dereferenceable(16) %130) #5
  %131 = invoke noundef i32 @_ZN6qtorch16ContractionTools22NumberOfConnectedWiresESt10shared_ptrINS_4NodeEES3_(ptr noundef nonnull align 8 dereferenceable(10128) %96, ptr noundef %14, ptr noundef %15)
          to label %132 unwind label %135

132:                                              ; preds = %99
  %133 = sub nsw i32 %118, %131
  %134 = sext i32 %133 to i64
  store i64 %134, ptr %7, align 8
  call void @_ZNSt12__shared_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %15) #5
  call void @_ZNSt12__shared_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %14) #5
  br label %782

135:                                              ; preds = %99
  %136 = landingpad { ptr, i32 }
          cleanup
  %137 = extractvalue { ptr, i32 } %136, 0
  store ptr %137, ptr %16, align 8
  %138 = extractvalue { ptr, i32 } %136, 1
  store i32 %138, ptr %17, align 4
  call void @_ZNSt12__shared_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %15) #5
  call void @_ZNSt12__shared_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %14) #5
  br label %784

139:                                              ; preds = %6
  %140 = getelementptr inbounds %"class.qtorch::ContractionTools", ptr %96, i32 0, i32 5
  %141 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %140) #5
  %142 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6qtorch7Network20GetUncontractedNodesEv(ptr noundef nonnull align 8 dereferenceable(380) %141) #5
  %143 = load i32, ptr %10, align 4, !tbaa !9
  %144 = sext i32 %143 to i64
  %145 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %142, i64 noundef %144) #5
  %146 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %145) #5
  %147 = getelementptr inbounds %"class.qtorch::Node", ptr %146, i32 0, i32 1
  %148 = load i32, ptr %147, align 8, !tbaa !11
  %149 = getelementptr inbounds %"class.qtorch::ContractionTools", ptr %96, i32 0, i32 5
  %150 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %149) #5
  %151 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6qtorch7Network20GetUncontractedNodesEv(ptr noundef nonnull align 8 dereferenceable(380) %150) #5
  %152 = load i32, ptr %11, align 4, !tbaa !9
  %153 = sext i32 %152 to i64
  %154 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %151, i64 noundef %153) #5
  %155 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %154) #5
  %156 = getelementptr inbounds %"class.qtorch::Node", ptr %155, i32 0, i32 1
  %157 = load i32, ptr %156, align 8, !tbaa !11
  %158 = add nsw i32 %148, %157
  %159 = getelementptr inbounds %"class.qtorch::ContractionTools", ptr %96, i32 0, i32 5
  %160 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %159) #5
  %161 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6qtorch7Network20GetUncontractedNodesEv(ptr noundef nonnull align 8 dereferenceable(380) %160) #5
  %162 = load i32, ptr %10, align 4, !tbaa !9
  %163 = sext i32 %162 to i64
  %164 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %161, i64 noundef %163) #5
  call void @_ZNSt10shared_ptrIN6qtorch4NodeEEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(16) %18, ptr noundef nonnull align 8 dereferenceable(16) %164) #5
  %165 = getelementptr inbounds %"class.qtorch::ContractionTools", ptr %96, i32 0, i32 5
  %166 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %165) #5
  %167 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6qtorch7Network20GetUncontractedNodesEv(ptr noundef nonnull align 8 dereferenceable(380) %166) #5
  %168 = load i32, ptr %11, align 4, !tbaa !9
  %169 = sext i32 %168 to i64
  %170 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %167, i64 noundef %169) #5
  call void @_ZNSt10shared_ptrIN6qtorch4NodeEEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(16) %19, ptr noundef nonnull align 8 dereferenceable(16) %170) #5
  store i1 false, ptr %21, align 1
  store i1 false, ptr %23, align 1
  %171 = invoke noundef i32 @_ZN6qtorch16ContractionTools22NumberOfConnectedWiresESt10shared_ptrINS_4NodeEES3_(ptr noundef nonnull align 8 dereferenceable(10128) %96, ptr noundef %18, ptr noundef %19)
          to label %172 unwind label %203

172:                                              ; preds = %139
  %173 = mul nsw i32 2, %171
  %174 = sub nsw i32 %158, %173
  %175 = load i32, ptr %12, align 4, !tbaa !9
  %176 = icmp sgt i32 %174, %175
  br i1 %176, label %194, label %177

177:                                              ; preds = %172
  %178 = getelementptr inbounds %"class.qtorch::ContractionTools", ptr %96, i32 0, i32 5
  %179 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %178) #5
  %180 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6qtorch7Network20GetUncontractedNodesEv(ptr noundef nonnull align 8 dereferenceable(380) %179) #5
  %181 = load i32, ptr %10, align 4, !tbaa !9
  %182 = sext i32 %181 to i64
  %183 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %180, i64 noundef %182) #5
  call void @_ZNSt10shared_ptrIN6qtorch4NodeEEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(16) %20, ptr noundef nonnull align 8 dereferenceable(16) %183) #5
  store i1 true, ptr %21, align 1
  %184 = getelementptr inbounds %"class.qtorch::ContractionTools", ptr %96, i32 0, i32 5
  %185 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %184) #5
  %186 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6qtorch7Network20GetUncontractedNodesEv(ptr noundef nonnull align 8 dereferenceable(380) %185) #5
  %187 = load i32, ptr %11, align 4, !tbaa !9
  %188 = sext i32 %187 to i64
  %189 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %186, i64 noundef %188) #5
  call void @_ZNSt10shared_ptrIN6qtorch4NodeEEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(16) %22, ptr noundef nonnull align 8 dereferenceable(16) %189) #5
  store i1 true, ptr %23, align 1
  %190 = invoke noundef i32 @_ZN6qtorch16ContractionTools22NumberOfConnectedWiresESt10shared_ptrINS_4NodeEES3_(ptr noundef nonnull align 8 dereferenceable(10128) %96, ptr noundef %20, ptr noundef %22)
          to label %191 unwind label %207

191:                                              ; preds = %177
  %192 = load i32, ptr %13, align 4, !tbaa !9
  %193 = icmp sgt i32 %190, %192
  br label %194

194:                                              ; preds = %191, %172
  %195 = phi i1 [ true, %172 ], [ %193, %191 ]
  %196 = load i1, ptr %23, align 1
  br i1 %196, label %197, label %198

197:                                              ; preds = %194
  call void @_ZNSt12__shared_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %22) #5
  br label %198

198:                                              ; preds = %197, %194
  %199 = load i1, ptr %21, align 1
  br i1 %199, label %200, label %201

200:                                              ; preds = %198
  call void @_ZNSt12__shared_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %20) #5
  br label %201

201:                                              ; preds = %200, %198
  call void @_ZNSt12__shared_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %19) #5
  call void @_ZNSt12__shared_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %18) #5
  br i1 %195, label %202, label %218

202:                                              ; preds = %201
  store i64 -1, ptr %7, align 8
  br label %782

203:                                              ; preds = %139
  %204 = landingpad { ptr, i32 }
          cleanup
  %205 = extractvalue { ptr, i32 } %204, 0
  store ptr %205, ptr %16, align 8
  %206 = extractvalue { ptr, i32 } %204, 1
  store i32 %206, ptr %17, align 4
  br label %217

207:                                              ; preds = %177
  %208 = landingpad { ptr, i32 }
          cleanup
  %209 = extractvalue { ptr, i32 } %208, 0
  store ptr %209, ptr %16, align 8
  %210 = extractvalue { ptr, i32 } %208, 1
  store i32 %210, ptr %17, align 4
  %211 = load i1, ptr %23, align 1
  br i1 %211, label %212, label %213

212:                                              ; preds = %207
  call void @_ZNSt12__shared_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %22) #5
  br label %213

213:                                              ; preds = %212, %207
  %214 = load i1, ptr %21, align 1
  br i1 %214, label %215, label %216

215:                                              ; preds = %213
  call void @_ZNSt12__shared_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %20) #5
  br label %216

216:                                              ; preds = %215, %213
  br label %217

217:                                              ; preds = %216, %203
  call void @_ZNSt12__shared_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %19) #5
  call void @_ZNSt12__shared_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %18) #5
  br label %784

218:                                              ; preds = %201
  call void @llvm.lifetime.start.p0(i64 24, ptr %24) #5
  call void @_ZNSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %24) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr %25) #5
  call void @_ZNSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %25) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #5
  %219 = getelementptr inbounds %"class.qtorch::ContractionTools", ptr %96, i32 0, i32 5
  %220 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %219) #5
  %221 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6qtorch7Network20GetUncontractedNodesEv(ptr noundef nonnull align 8 dereferenceable(380) %220) #5
  %222 = load i32, ptr %10, align 4, !tbaa !9
  %223 = sext i32 %222 to i64
  %224 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %221, i64 noundef %223) #5
  call void @_ZNSt10shared_ptrIN6qtorch4NodeEEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(16) %27, ptr noundef nonnull align 8 dereferenceable(16) %224) #5
  %225 = getelementptr inbounds %"class.qtorch::ContractionTools", ptr %96, i32 0, i32 5
  %226 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %225) #5
  %227 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6qtorch7Network20GetUncontractedNodesEv(ptr noundef nonnull align 8 dereferenceable(380) %226) #5
  %228 = load i32, ptr %11, align 4, !tbaa !9
  %229 = sext i32 %228 to i64
  %230 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %227, i64 noundef %229) #5
  call void @_ZNSt10shared_ptrIN6qtorch4NodeEEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(16) %28, ptr noundef nonnull align 8 dereferenceable(16) %230) #5
  %231 = invoke noundef i32 @_ZN6qtorch16ContractionTools22NumberOfConnectedWiresESt10shared_ptrINS_4NodeEES3_(ptr noundef nonnull align 8 dereferenceable(10128) %96, ptr noundef %27, ptr noundef %28)
          to label %232 unwind label %318

232:                                              ; preds = %218
  call void @_ZNSt12__shared_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %28) #5
  call void @_ZNSt12__shared_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %27) #5
  store i32 %231, ptr %26, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #5
  %233 = getelementptr inbounds %"class.qtorch::ContractionTools", ptr %96, i32 0, i32 5
  %234 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %233) #5
  %235 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6qtorch7Network20GetUncontractedNodesEv(ptr noundef nonnull align 8 dereferenceable(380) %234) #5
  %236 = load i32, ptr %10, align 4, !tbaa !9
  %237 = sext i32 %236 to i64
  %238 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %235, i64 noundef %237) #5
  %239 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %238) #5
  %240 = getelementptr inbounds %"class.qtorch::Node", ptr %239, i32 0, i32 1
  %241 = load i32, ptr %240, align 8, !tbaa !11
  %242 = getelementptr inbounds %"class.qtorch::ContractionTools", ptr %96, i32 0, i32 5
  %243 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %242) #5
  %244 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6qtorch7Network20GetUncontractedNodesEv(ptr noundef nonnull align 8 dereferenceable(380) %243) #5
  %245 = load i32, ptr %11, align 4, !tbaa !9
  %246 = sext i32 %245 to i64
  %247 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %244, i64 noundef %246) #5
  %248 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %247) #5
  %249 = getelementptr inbounds %"class.qtorch::Node", ptr %248, i32 0, i32 1
  %250 = load i32, ptr %249, align 8, !tbaa !11
  %251 = add nsw i32 %241, %250
  %252 = load i32, ptr %26, align 4, !tbaa !9
  %253 = sub nsw i32 %251, %252
  %254 = sitofp i32 %253 to double
  %255 = call double @pow(double noundef 4.000000e+00, double noundef %254) #5
  %256 = fptosi double %255 to i64
  store i64 %256, ptr %29, align 8, !tbaa !31
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #5
  %257 = getelementptr inbounds %"class.qtorch::ContractionTools", ptr %96, i32 0, i32 5
  %258 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %257) #5
  %259 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6qtorch7Network20GetUncontractedNodesEv(ptr noundef nonnull align 8 dereferenceable(380) %258) #5
  %260 = load i32, ptr %10, align 4, !tbaa !9
  %261 = sext i32 %260 to i64
  %262 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %259, i64 noundef %261) #5
  %263 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %262) #5
  %264 = getelementptr inbounds %"class.qtorch::Node", ptr %263, i32 0, i32 1
  %265 = load i32, ptr %264, align 8, !tbaa !11
  %266 = getelementptr inbounds %"class.qtorch::ContractionTools", ptr %96, i32 0, i32 5
  %267 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %266) #5
  %268 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6qtorch7Network20GetUncontractedNodesEv(ptr noundef nonnull align 8 dereferenceable(380) %267) #5
  %269 = load i32, ptr %11, align 4, !tbaa !9
  %270 = sext i32 %269 to i64
  %271 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %268, i64 noundef %270) #5
  %272 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %271) #5
  %273 = getelementptr inbounds %"class.qtorch::Node", ptr %272, i32 0, i32 1
  %274 = load i32, ptr %273, align 8, !tbaa !11
  %275 = add nsw i32 %265, %274
  %276 = load i32, ptr %26, align 4, !tbaa !9
  %277 = mul nsw i32 2, %276
  %278 = sub nsw i32 %275, %277
  store i32 %278, ptr %30, align 4, !tbaa !9
  %279 = getelementptr inbounds %"class.qtorch::ContractionTools", ptr %96, i32 0, i32 5
  %280 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %279) #5
  %281 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6qtorch7Network20GetUncontractedNodesEv(ptr noundef nonnull align 8 dereferenceable(380) %280) #5
  %282 = load i32, ptr %10, align 4, !tbaa !9
  %283 = sext i32 %282 to i64
  %284 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %281, i64 noundef %283) #5
  invoke void @_ZNSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EE9push_backERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %24, ptr noundef nonnull align 8 dereferenceable(16) %284)
          to label %285 unwind label %322

285:                                              ; preds = %232
  %286 = getelementptr inbounds %"class.qtorch::ContractionTools", ptr %96, i32 0, i32 5
  %287 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %286) #5
  %288 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6qtorch7Network20GetUncontractedNodesEv(ptr noundef nonnull align 8 dereferenceable(380) %287) #5
  %289 = load i32, ptr %10, align 4, !tbaa !9
  %290 = sext i32 %289 to i64
  %291 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %288, i64 noundef %290) #5
  %292 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %291) #5
  %293 = getelementptr inbounds %"class.qtorch::Node", ptr %292, i32 0, i32 6
  store i8 1, ptr %293, align 8, !tbaa !33
  %294 = getelementptr inbounds %"class.qtorch::ContractionTools", ptr %96, i32 0, i32 5
  %295 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %294) #5
  %296 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6qtorch7Network20GetUncontractedNodesEv(ptr noundef nonnull align 8 dereferenceable(380) %295) #5
  %297 = load i32, ptr %11, align 4, !tbaa !9
  %298 = sext i32 %297 to i64
  %299 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %296, i64 noundef %298) #5
  invoke void @_ZNSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EE9push_backERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %24, ptr noundef nonnull align 8 dereferenceable(16) %299)
          to label %300 unwind label %322

300:                                              ; preds = %285
  %301 = getelementptr inbounds %"class.qtorch::ContractionTools", ptr %96, i32 0, i32 5
  %302 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %301) #5
  %303 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6qtorch7Network20GetUncontractedNodesEv(ptr noundef nonnull align 8 dereferenceable(380) %302) #5
  %304 = load i32, ptr %11, align 4, !tbaa !9
  %305 = sext i32 %304 to i64
  %306 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %303, i64 noundef %305) #5
  %307 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %306) #5
  %308 = getelementptr inbounds %"class.qtorch::Node", ptr %307, i32 0, i32 6
  store i8 1, ptr %308, align 8, !tbaa !33
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #5
  store ptr %24, ptr %31, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #5
  %309 = load ptr, ptr %31, align 8, !tbaa !5
  %310 = call ptr @_ZNSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %309) #5
  %311 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.138", ptr %32, i32 0, i32 0
  store ptr %310, ptr %311, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #5
  %312 = load ptr, ptr %31, align 8, !tbaa !5
  %313 = call ptr @_ZNSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %312) #5
  %314 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.138", ptr %33, i32 0, i32 0
  store ptr %313, ptr %314, align 8
  br label %315

315:                                              ; preds = %457, %300
  %316 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt10shared_ptrIN6qtorch4NodeEESt6vectorIS4_SaIS4_EEEEbRKNS_17__normal_iteratorIT_T0_EESE_(ptr noundef nonnull align 8 dereferenceable(8) %32, ptr noundef nonnull align 8 dereferenceable(8) %33) #5
  br i1 %316, label %326, label %317

317:                                              ; preds = %315
  store i32 2, ptr %34, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #5
  br label %459

318:                                              ; preds = %218
  %319 = landingpad { ptr, i32 }
          cleanup
  %320 = extractvalue { ptr, i32 } %319, 0
  store ptr %320, ptr %16, align 8
  %321 = extractvalue { ptr, i32 } %319, 1
  store i32 %321, ptr %17, align 4
  call void @_ZNSt12__shared_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %28) #5
  call void @_ZNSt12__shared_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %27) #5
  br label %781

322:                                              ; preds = %285, %232
  %323 = landingpad { ptr, i32 }
          cleanup
  %324 = extractvalue { ptr, i32 } %323, 0
  store ptr %324, ptr %16, align 8
  %325 = extractvalue { ptr, i32 } %323, 1
  store i32 %325, ptr %17, align 4
  br label %780

326:                                              ; preds = %315
  call void @llvm.lifetime.start.p0(i64 8, ptr %35) #5
  %327 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt10shared_ptrIN6qtorch4NodeEESt6vectorIS4_SaIS4_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %32) #5
  store ptr %327, ptr %35, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %36) #5
  %328 = load ptr, ptr %35, align 8, !tbaa !5
  %329 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %328) #5
  %330 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN6qtorch4Node8GetWiresEv(ptr noundef nonnull align 8 dereferenceable(152) %329)
          to label %331 unwind label %341

331:                                              ; preds = %326
  store ptr %330, ptr %36, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %37) #5
  %332 = load ptr, ptr %36, align 8, !tbaa !5
  %333 = call ptr @_ZNSt6vectorISt10shared_ptrIN6qtorch4WireEESaIS3_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %332) #5
  %334 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.115", ptr %37, i32 0, i32 0
  store ptr %333, ptr %334, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %38) #5
  %335 = load ptr, ptr %36, align 8, !tbaa !5
  %336 = call ptr @_ZNSt6vectorISt10shared_ptrIN6qtorch4WireEESaIS3_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %335) #5
  %337 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.115", ptr %38, i32 0, i32 0
  store ptr %336, ptr %337, align 8
  br label %338

338:                                              ; preds = %452, %331
  %339 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt10shared_ptrIN6qtorch4WireEESt6vectorIS4_SaIS4_EEEEbRKNS_17__normal_iteratorIT_T0_EESE_(ptr noundef nonnull align 8 dereferenceable(8) %37, ptr noundef nonnull align 8 dereferenceable(8) %38) #5
  br i1 %339, label %345, label %340

340:                                              ; preds = %338
  store i32 4, ptr %34, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #5
  br label %456

341:                                              ; preds = %326
  %342 = landingpad { ptr, i32 }
          cleanup
  %343 = extractvalue { ptr, i32 } %342, 0
  store ptr %343, ptr %16, align 8
  %344 = extractvalue { ptr, i32 } %342, 1
  store i32 %344, ptr %17, align 4
  br label %455

345:                                              ; preds = %338
  call void @llvm.lifetime.start.p0(i64 8, ptr %39) #5
  %346 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt10shared_ptrIN6qtorch4WireEESt6vectorIS4_SaIS4_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %37) #5
  store ptr %346, ptr %39, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %40) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %41) #5
  %347 = load ptr, ptr %39, align 8, !tbaa !5
  %348 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch4WireELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %347) #5
  store i1 false, ptr %43, align 1
  store i1 false, ptr %45, align 1
  store i1 false, ptr %46, align 1
  store i1 false, ptr %47, align 1
  invoke void @_ZN6qtorch4Wire8GetNodeAEv(ptr dead_on_unwind writable sret(%"class.std::weak_ptr") align 8 %41, ptr noundef nonnull align 8 dereferenceable(44) %348)
          to label %349 unwind label %395

349:                                              ; preds = %345
  call void @_ZNKSt8weak_ptrIN6qtorch4NodeEE4lockEv(ptr dead_on_unwind writable sret(%"class.std::shared_ptr") align 8 %40, ptr noundef nonnull align 8 dereferenceable(16) %41) #5
  %350 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %40) #5
  %351 = getelementptr inbounds %"class.qtorch::Node", ptr %350, i32 0, i32 6
  %352 = load i8, ptr %351, align 8, !tbaa !33, !range !34, !noundef !35
  %353 = trunc i8 %352 to i1
  br i1 %353, label %354, label %362

354:                                              ; preds = %349
  call void @llvm.lifetime.start.p0(i64 16, ptr %42) #5
  store i1 true, ptr %43, align 1
  call void @llvm.lifetime.start.p0(i64 16, ptr %44) #5
  store i1 true, ptr %45, align 1
  %355 = load ptr, ptr %39, align 8, !tbaa !5
  %356 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch4WireELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %355) #5
  invoke void @_ZN6qtorch4Wire8GetNodeBEv(ptr dead_on_unwind writable sret(%"class.std::weak_ptr") align 8 %44, ptr noundef nonnull align 8 dereferenceable(44) %356)
          to label %357 unwind label %399

357:                                              ; preds = %354
  store i1 true, ptr %46, align 1
  call void @_ZNKSt8weak_ptrIN6qtorch4NodeEE4lockEv(ptr dead_on_unwind writable sret(%"class.std::shared_ptr") align 8 %42, ptr noundef nonnull align 8 dereferenceable(16) %44) #5
  store i1 true, ptr %47, align 1
  %358 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %42) #5
  %359 = getelementptr inbounds %"class.qtorch::Node", ptr %358, i32 0, i32 6
  %360 = load i8, ptr %359, align 8, !tbaa !33, !range !34, !noundef !35
  %361 = trunc i8 %360 to i1
  br label %362

362:                                              ; preds = %357, %349
  %363 = phi i1 [ false, %349 ], [ %361, %357 ]
  %364 = xor i1 %363, true
  %365 = load i1, ptr %47, align 1
  br i1 %365, label %366, label %367

366:                                              ; preds = %362
  call void @_ZNSt12__shared_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %42) #5
  br label %367

367:                                              ; preds = %366, %362
  %368 = load i1, ptr %46, align 1
  br i1 %368, label %369, label %370

369:                                              ; preds = %367
  call void @_ZNSt10__weak_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %44) #5
  br label %370

370:                                              ; preds = %369, %367
  %371 = load i1, ptr %45, align 1
  br i1 %371, label %372, label %373

372:                                              ; preds = %370
  call void @llvm.lifetime.end.p0(i64 16, ptr %44) #5
  br label %373

373:                                              ; preds = %372, %370
  %374 = load i1, ptr %43, align 1
  br i1 %374, label %375, label %376

375:                                              ; preds = %373
  call void @llvm.lifetime.end.p0(i64 16, ptr %42) #5
  br label %376

376:                                              ; preds = %375, %373
  call void @_ZNSt12__shared_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %40) #5
  call void @_ZNSt10__weak_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %41) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %41) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %40) #5
  br i1 %364, label %377, label %451

377:                                              ; preds = %376
  call void @llvm.lifetime.start.p0(i64 16, ptr %48) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %49) #5
  %378 = load ptr, ptr %39, align 8, !tbaa !5
  %379 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch4WireELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %378) #5
  invoke void @_ZN6qtorch4Wire8GetNodeAEv(ptr dead_on_unwind writable sret(%"class.std::weak_ptr") align 8 %49, ptr noundef nonnull align 8 dereferenceable(44) %379)
          to label %380 unwind label %410

380:                                              ; preds = %377
  call void @_ZNKSt8weak_ptrIN6qtorch4NodeEE4lockEv(ptr dead_on_unwind writable sret(%"class.std::shared_ptr") align 8 %48, ptr noundef nonnull align 8 dereferenceable(16) %49) #5
  %381 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %48) #5
  %382 = getelementptr inbounds %"class.qtorch::Node", ptr %381, i32 0, i32 6
  %383 = load i8, ptr %382, align 8, !tbaa !33, !range !34, !noundef !35
  %384 = trunc i8 %383 to i1
  call void @_ZNSt12__shared_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %48) #5
  call void @_ZNSt10__weak_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %49) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %49) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %48) #5
  br i1 %384, label %385, label %427

385:                                              ; preds = %380
  call void @llvm.lifetime.start.p0(i64 16, ptr %50) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %51) #5
  %386 = load ptr, ptr %39, align 8, !tbaa !5
  %387 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch4WireELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %386) #5
  invoke void @_ZN6qtorch4Wire8GetNodeBEv(ptr dead_on_unwind writable sret(%"class.std::weak_ptr") align 8 %51, ptr noundef nonnull align 8 dereferenceable(44) %387)
          to label %388 unwind label %414

388:                                              ; preds = %385
  call void @_ZNKSt8weak_ptrIN6qtorch4NodeEE4lockEv(ptr dead_on_unwind writable sret(%"class.std::shared_ptr") align 8 %50, ptr noundef nonnull align 8 dereferenceable(16) %51) #5
  %389 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %50) #5
  %390 = getelementptr inbounds %"class.qtorch::Node", ptr %389, i32 0, i32 6
  store i8 1, ptr %390, align 8, !tbaa !33
  call void @_ZNSt12__shared_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %50) #5
  call void @_ZNSt10__weak_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %51) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %51) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %50) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %52) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %53) #5
  %391 = load ptr, ptr %39, align 8, !tbaa !5
  %392 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch4WireELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %391) #5
  invoke void @_ZN6qtorch4Wire8GetNodeBEv(ptr dead_on_unwind writable sret(%"class.std::weak_ptr") align 8 %53, ptr noundef nonnull align 8 dereferenceable(44) %392)
          to label %393 unwind label %418

393:                                              ; preds = %388
  call void @_ZNKSt8weak_ptrIN6qtorch4NodeEE4lockEv(ptr dead_on_unwind writable sret(%"class.std::shared_ptr") align 8 %52, ptr noundef nonnull align 8 dereferenceable(16) %53) #5
  invoke void @_ZNSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EE9push_backEOS3_(ptr noundef nonnull align 8 dereferenceable(24) %25, ptr noundef nonnull align 8 dereferenceable(16) %52)
          to label %394 unwind label %422

394:                                              ; preds = %393
  call void @_ZNSt12__shared_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %52) #5
  call void @_ZNSt10__weak_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %53) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %53) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %52) #5
  br label %450

395:                                              ; preds = %345
  %396 = landingpad { ptr, i32 }
          cleanup
  %397 = extractvalue { ptr, i32 } %396, 0
  store ptr %397, ptr %16, align 8
  %398 = extractvalue { ptr, i32 } %396, 1
  store i32 %398, ptr %17, align 4
  br label %409

399:                                              ; preds = %354
  %400 = landingpad { ptr, i32 }
          cleanup
  %401 = extractvalue { ptr, i32 } %400, 0
  store ptr %401, ptr %16, align 8
  %402 = extractvalue { ptr, i32 } %400, 1
  store i32 %402, ptr %17, align 4
  %403 = load i1, ptr %45, align 1
  br i1 %403, label %404, label %405

404:                                              ; preds = %399
  call void @llvm.lifetime.end.p0(i64 16, ptr %44) #5
  br label %405

405:                                              ; preds = %404, %399
  %406 = load i1, ptr %43, align 1
  br i1 %406, label %407, label %408

407:                                              ; preds = %405
  call void @llvm.lifetime.end.p0(i64 16, ptr %42) #5
  br label %408

408:                                              ; preds = %407, %405
  call void @_ZNSt12__shared_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %40) #5
  call void @_ZNSt10__weak_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %41) #5
  br label %409

409:                                              ; preds = %408, %395
  call void @llvm.lifetime.end.p0(i64 16, ptr %41) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %40) #5
  br label %454

410:                                              ; preds = %377
  %411 = landingpad { ptr, i32 }
          cleanup
  %412 = extractvalue { ptr, i32 } %411, 0
  store ptr %412, ptr %16, align 8
  %413 = extractvalue { ptr, i32 } %411, 1
  store i32 %413, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %49) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %48) #5
  br label %454

414:                                              ; preds = %385
  %415 = landingpad { ptr, i32 }
          cleanup
  %416 = extractvalue { ptr, i32 } %415, 0
  store ptr %416, ptr %16, align 8
  %417 = extractvalue { ptr, i32 } %415, 1
  store i32 %417, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %51) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %50) #5
  br label %454

418:                                              ; preds = %388
  %419 = landingpad { ptr, i32 }
          cleanup
  %420 = extractvalue { ptr, i32 } %419, 0
  store ptr %420, ptr %16, align 8
  %421 = extractvalue { ptr, i32 } %419, 1
  store i32 %421, ptr %17, align 4
  br label %426

422:                                              ; preds = %393
  %423 = landingpad { ptr, i32 }
          cleanup
  %424 = extractvalue { ptr, i32 } %423, 0
  store ptr %424, ptr %16, align 8
  %425 = extractvalue { ptr, i32 } %423, 1
  store i32 %425, ptr %17, align 4
  call void @_ZNSt12__shared_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %52) #5
  call void @_ZNSt10__weak_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %53) #5
  br label %426

426:                                              ; preds = %422, %418
  call void @llvm.lifetime.end.p0(i64 16, ptr %53) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %52) #5
  br label %454

427:                                              ; preds = %380
  call void @llvm.lifetime.start.p0(i64 16, ptr %54) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %55) #5
  %428 = load ptr, ptr %39, align 8, !tbaa !5
  %429 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch4WireELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %428) #5
  invoke void @_ZN6qtorch4Wire8GetNodeAEv(ptr dead_on_unwind writable sret(%"class.std::weak_ptr") align 8 %55, ptr noundef nonnull align 8 dereferenceable(44) %429)
          to label %430 unwind label %437

430:                                              ; preds = %427
  call void @_ZNKSt8weak_ptrIN6qtorch4NodeEE4lockEv(ptr dead_on_unwind writable sret(%"class.std::shared_ptr") align 8 %54, ptr noundef nonnull align 8 dereferenceable(16) %55) #5
  %431 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %54) #5
  %432 = getelementptr inbounds %"class.qtorch::Node", ptr %431, i32 0, i32 6
  store i8 1, ptr %432, align 8, !tbaa !33
  call void @_ZNSt12__shared_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %54) #5
  call void @_ZNSt10__weak_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %55) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %55) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %54) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %56) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %57) #5
  %433 = load ptr, ptr %39, align 8, !tbaa !5
  %434 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch4WireELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %433) #5
  invoke void @_ZN6qtorch4Wire8GetNodeAEv(ptr dead_on_unwind writable sret(%"class.std::weak_ptr") align 8 %57, ptr noundef nonnull align 8 dereferenceable(44) %434)
          to label %435 unwind label %441

435:                                              ; preds = %430
  call void @_ZNKSt8weak_ptrIN6qtorch4NodeEE4lockEv(ptr dead_on_unwind writable sret(%"class.std::shared_ptr") align 8 %56, ptr noundef nonnull align 8 dereferenceable(16) %57) #5
  invoke void @_ZNSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EE9push_backEOS3_(ptr noundef nonnull align 8 dereferenceable(24) %25, ptr noundef nonnull align 8 dereferenceable(16) %56)
          to label %436 unwind label %445

436:                                              ; preds = %435
  call void @_ZNSt12__shared_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %56) #5
  call void @_ZNSt10__weak_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %57) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %57) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %56) #5
  br label %450

437:                                              ; preds = %427
  %438 = landingpad { ptr, i32 }
          cleanup
  %439 = extractvalue { ptr, i32 } %438, 0
  store ptr %439, ptr %16, align 8
  %440 = extractvalue { ptr, i32 } %438, 1
  store i32 %440, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %55) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %54) #5
  br label %454

441:                                              ; preds = %430
  %442 = landingpad { ptr, i32 }
          cleanup
  %443 = extractvalue { ptr, i32 } %442, 0
  store ptr %443, ptr %16, align 8
  %444 = extractvalue { ptr, i32 } %442, 1
  store i32 %444, ptr %17, align 4
  br label %449

445:                                              ; preds = %435
  %446 = landingpad { ptr, i32 }
          cleanup
  %447 = extractvalue { ptr, i32 } %446, 0
  store ptr %447, ptr %16, align 8
  %448 = extractvalue { ptr, i32 } %446, 1
  store i32 %448, ptr %17, align 4
  call void @_ZNSt12__shared_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %56) #5
  call void @_ZNSt10__weak_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %57) #5
  br label %449

449:                                              ; preds = %445, %441
  call void @llvm.lifetime.end.p0(i64 16, ptr %57) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %56) #5
  br label %454

450:                                              ; preds = %436, %394
  br label %451

451:                                              ; preds = %450, %376
  call void @llvm.lifetime.end.p0(i64 8, ptr %39) #5
  br label %452

452:                                              ; preds = %451
  %453 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt10shared_ptrIN6qtorch4WireEESt6vectorIS4_SaIS4_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %37) #5
  br label %338

454:                                              ; preds = %449, %437, %426, %414, %410, %409
  call void @llvm.lifetime.end.p0(i64 8, ptr %39) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #5
  br label %455

455:                                              ; preds = %454, %341
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #5
  br label %780

456:                                              ; preds = %340
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #5
  br label %457

457:                                              ; preds = %456
  %458 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt10shared_ptrIN6qtorch4NodeEESt6vectorIS4_SaIS4_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %32) #5
  br label %315

459:                                              ; preds = %317
  call void @llvm.lifetime.start.p0(i64 4, ptr %58) #5
  store i32 0, ptr %58, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %59) #5
  store i32 0, ptr %59, align 4, !tbaa !9
  br label %460

460:                                              ; preds = %732, %459
  %461 = load i32, ptr %59, align 4, !tbaa !9
  %462 = load i32, ptr %9, align 4, !tbaa !9
  %463 = icmp slt i32 %461, %462
  br i1 %463, label %465, label %464

464:                                              ; preds = %460
  store i32 6, ptr %34, align 4
  br label %737

465:                                              ; preds = %460
  %466 = call noundef i64 @_ZNKSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %25) #5
  %467 = icmp eq i64 %466, 0
  br i1 %467, label %468, label %470

468:                                              ; preds = %465
  %469 = load i64, ptr %29, align 8, !tbaa !31
  store i64 %469, ptr %7, align 8
  store i32 1, ptr %34, align 4
  br label %737

470:                                              ; preds = %465
  call void @llvm.lifetime.start.p0(i64 8, ptr %60) #5
  %471 = call noundef i64 @_ZNKSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %25) #5
  %472 = sub i64 %471, 1
  %473 = trunc i64 %472 to i32
  invoke void @_ZNSt24uniform_int_distributionIiEC2Eii(ptr noundef nonnull align 4 dereferenceable(8) %60, i32 noundef 0, i32 noundef %473)
          to label %474 unwind label %487

474:                                              ; preds = %470
  call void @llvm.lifetime.start.p0(i64 4, ptr %61) #5
  %475 = getelementptr inbounds %"class.qtorch::ContractionTools", ptr %96, i32 0, i32 6
  %476 = invoke noundef i32 @_ZNSt24uniform_int_distributionIiEclISt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EEEEiRT_(ptr noundef nonnull align 4 dereferenceable(8) %60, ptr noundef nonnull align 8 dereferenceable(5000) %475)
          to label %477 unwind label %491

477:                                              ; preds = %474
  store i32 %476, ptr %61, align 4, !tbaa !9
  br label %478

478:                                              ; preds = %486, %477
  %479 = load i32, ptr %61, align 4, !tbaa !9
  %480 = sext i32 %479 to i64
  %481 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %25, i64 noundef %480) #5
  %482 = call noundef zeroext i1 @_ZSteqIN6qtorch4NodeEEbRKSt10shared_ptrIT_EDn(ptr noundef nonnull align 8 dereferenceable(16) %481, ptr null) #5
  br i1 %482, label %483, label %495

483:                                              ; preds = %478
  %484 = getelementptr inbounds %"class.qtorch::ContractionTools", ptr %96, i32 0, i32 6
  %485 = invoke noundef i32 @_ZNSt24uniform_int_distributionIiEclISt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EEEEiRT_(ptr noundef nonnull align 4 dereferenceable(8) %60, ptr noundef nonnull align 8 dereferenceable(5000) %484)
          to label %486 unwind label %491

486:                                              ; preds = %483
  store i32 %485, ptr %61, align 4, !tbaa !9
  br label %478, !llvm.loop !36

487:                                              ; preds = %470
  %488 = landingpad { ptr, i32 }
          cleanup
  %489 = extractvalue { ptr, i32 } %488, 0
  store ptr %489, ptr %16, align 8
  %490 = extractvalue { ptr, i32 } %488, 1
  store i32 %490, ptr %17, align 4
  br label %736

491:                                              ; preds = %724, %483, %474
  %492 = landingpad { ptr, i32 }
          cleanup
  %493 = extractvalue { ptr, i32 } %492, 0
  store ptr %493, ptr %16, align 8
  %494 = extractvalue { ptr, i32 } %492, 1
  store i32 %494, ptr %17, align 4
  br label %735

495:                                              ; preds = %478
  call void @llvm.lifetime.start.p0(i64 24, ptr %62) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %64) #5
  %496 = load i32, ptr %61, align 4, !tbaa !9
  %497 = sext i32 %496 to i64
  %498 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %25, i64 noundef %497) #5
  call void @_ZNSt10shared_ptrIN6qtorch4NodeEEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(16) %64, ptr noundef nonnull align 8 dereferenceable(16) %498) #5
  %499 = getelementptr inbounds %"class.std::initializer_list.215", ptr %63, i32 0, i32 0
  store ptr %64, ptr %499, align 8, !tbaa !38
  %500 = getelementptr inbounds %"class.std::initializer_list.215", ptr %63, i32 0, i32 1
  store i64 1, ptr %500, align 8, !tbaa !40
  call void @llvm.lifetime.start.p0(i64 1, ptr %65) #5
  call void @_ZNSaISt10shared_ptrIN6qtorch4NodeEEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %65) #5
  %501 = getelementptr inbounds { ptr, i64 }, ptr %63, i32 0, i32 0
  %502 = load ptr, ptr %501, align 8
  %503 = getelementptr inbounds { ptr, i64 }, ptr %63, i32 0, i32 1
  %504 = load i64, ptr %503, align 8
  invoke void @_ZNSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EEC2ESt16initializer_listIS3_ERKS4_(ptr noundef nonnull align 8 dereferenceable(24) %62, ptr %502, i64 %504, ptr noundef nonnull align 1 dereferenceable(1) %65)
          to label %505 unwind label %537

505:                                              ; preds = %495
  %506 = invoke noundef i32 @_ZN6qtorch16ContractionTools37NumberOfConnectedBetweenTwoSuperNodesERKSt6vectorISt10shared_ptrINS_4NodeEESaIS4_EES8_(ptr noundef nonnull align 8 dereferenceable(10128) %96, ptr noundef nonnull align 8 dereferenceable(24) %24, ptr noundef nonnull align 8 dereferenceable(24) %62)
          to label %507 unwind label %541

507:                                              ; preds = %505
  store i32 %506, ptr %26, align 4, !tbaa !9
  call void @_ZNSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %62) #5
  call void @_ZNSt15__new_allocatorISt10shared_ptrIN6qtorch4NodeEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %65) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %65) #5
  %508 = getelementptr inbounds [1 x %"class.std::shared_ptr"], ptr %64, i32 0, i32 0
  %509 = getelementptr inbounds %"class.std::shared_ptr", ptr %508, i64 1
  br label %510

510:                                              ; preds = %510, %507
  %511 = phi ptr [ %509, %507 ], [ %512, %510 ]
  %512 = getelementptr inbounds %"class.std::shared_ptr", ptr %511, i64 -1
  call void @_ZNSt12__shared_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %512) #5
  %513 = icmp eq ptr %512, %508
  br i1 %513, label %514, label %510

514:                                              ; preds = %510
  call void @llvm.lifetime.end.p0(i64 16, ptr %64) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %62) #5
  %515 = load i32, ptr %30, align 4, !tbaa !9
  %516 = load i32, ptr %61, align 4, !tbaa !9
  %517 = sext i32 %516 to i64
  %518 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %25, i64 noundef %517) #5
  %519 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %518) #5
  %520 = getelementptr inbounds %"class.qtorch::Node", ptr %519, i32 0, i32 1
  %521 = load i32, ptr %520, align 8, !tbaa !11
  %522 = add nsw i32 %515, %521
  %523 = load i32, ptr %26, align 4, !tbaa !9
  %524 = sub nsw i32 %522, %523
  %525 = icmp sge i32 %524, 12
  br i1 %525, label %526, label %553

526:                                              ; preds = %514
  %527 = load i32, ptr %58, align 4, !tbaa !9
  %528 = sext i32 %527 to i64
  %529 = call noundef i64 @_ZNKSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %25) #5
  %530 = mul i64 %529, 2
  %531 = icmp ult i64 %528, %530
  br i1 %531, label %532, label %553

532:                                              ; preds = %526
  %533 = load i32, ptr %58, align 4, !tbaa !9
  %534 = add nsw i32 %533, 1
  store i32 %534, ptr %58, align 4, !tbaa !9
  %535 = load i32, ptr %59, align 4, !tbaa !9
  %536 = add nsw i32 %535, -1
  store i32 %536, ptr %59, align 4, !tbaa !9
  store i32 8, ptr %34, align 4
  br label %729

537:                                              ; preds = %495
  %538 = landingpad { ptr, i32 }
          cleanup
  %539 = extractvalue { ptr, i32 } %538, 0
  store ptr %539, ptr %16, align 8
  %540 = extractvalue { ptr, i32 } %538, 1
  store i32 %540, ptr %17, align 4
  br label %545

541:                                              ; preds = %505
  %542 = landingpad { ptr, i32 }
          cleanup
  %543 = extractvalue { ptr, i32 } %542, 0
  store ptr %543, ptr %16, align 8
  %544 = extractvalue { ptr, i32 } %542, 1
  store i32 %544, ptr %17, align 4
  call void @_ZNSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %62) #5
  br label %545

545:                                              ; preds = %541, %537
  call void @_ZNSt15__new_allocatorISt10shared_ptrIN6qtorch4NodeEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %65) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %65) #5
  %546 = getelementptr inbounds [1 x %"class.std::shared_ptr"], ptr %64, i32 0, i32 0
  %547 = getelementptr inbounds %"class.std::shared_ptr", ptr %546, i64 1
  br label %548

548:                                              ; preds = %548, %545
  %549 = phi ptr [ %547, %545 ], [ %550, %548 ]
  %550 = getelementptr inbounds %"class.std::shared_ptr", ptr %549, i64 -1
  call void @_ZNSt12__shared_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %550) #5
  %551 = icmp eq ptr %550, %546
  br i1 %551, label %552, label %548

552:                                              ; preds = %548
  call void @llvm.lifetime.end.p0(i64 16, ptr %64) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %62) #5
  br label %735

553:                                              ; preds = %526, %514
  %554 = load i32, ptr %58, align 4, !tbaa !9
  %555 = sext i32 %554 to i64
  %556 = call noundef i64 @_ZNKSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %25) #5
  %557 = mul i64 %556, 2
  %558 = icmp ugt i64 %555, %557
  br i1 %558, label %559, label %560

559:                                              ; preds = %553
  store i64 -1, ptr %7, align 8
  store i32 1, ptr %34, align 4
  br label %729

560:                                              ; preds = %553
  store i32 0, ptr %58, align 4, !tbaa !9
  br label %561

561:                                              ; preds = %560
  br label %562

562:                                              ; preds = %561
  %563 = load i32, ptr %30, align 4, !tbaa !9
  %564 = sitofp i32 %563 to double
  %565 = call double @pow(double noundef 4.000000e+00, double noundef %564) #5
  %566 = load i32, ptr %61, align 4, !tbaa !9
  %567 = sext i32 %566 to i64
  %568 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %25, i64 noundef %567) #5
  %569 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %568) #5
  %570 = getelementptr inbounds %"class.qtorch::Node", ptr %569, i32 0, i32 1
  %571 = load i32, ptr %570, align 8, !tbaa !11
  %572 = sitofp i32 %571 to double
  %573 = call double @pow(double noundef 4.000000e+00, double noundef %572) #5
  %574 = fmul double %565, %573
  %575 = load i32, ptr %26, align 4, !tbaa !9
  %576 = sitofp i32 %575 to double
  %577 = call double @pow(double noundef 4.000000e+00, double noundef %576) #5
  %578 = fdiv double %574, %577
  %579 = load i64, ptr %29, align 8, !tbaa !31
  %580 = sitofp i64 %579 to double
  %581 = fadd double %580, %578
  %582 = fptosi double %581 to i64
  store i64 %582, ptr %29, align 8, !tbaa !31
  %583 = load i32, ptr %30, align 4, !tbaa !9
  %584 = load i32, ptr %61, align 4, !tbaa !9
  %585 = sext i32 %584 to i64
  %586 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %25, i64 noundef %585) #5
  %587 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %586) #5
  %588 = getelementptr inbounds %"class.qtorch::Node", ptr %587, i32 0, i32 1
  %589 = load i32, ptr %588, align 8, !tbaa !11
  %590 = add nsw i32 %583, %589
  %591 = load i32, ptr %26, align 4, !tbaa !9
  %592 = mul nsw i32 2, %591
  %593 = sub nsw i32 %590, %592
  store i32 %593, ptr %30, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %66) #5
  %594 = load i32, ptr %61, align 4, !tbaa !9
  %595 = sext i32 %594 to i64
  %596 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %25, i64 noundef %595) #5
  %597 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %596) #5
  %598 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN6qtorch4Node8GetWiresEv(ptr noundef nonnull align 8 dereferenceable(152) %597)
          to label %599 unwind label %609

599:                                              ; preds = %562
  store ptr %598, ptr %66, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %67) #5
  %600 = load ptr, ptr %66, align 8, !tbaa !5
  %601 = call ptr @_ZNSt6vectorISt10shared_ptrIN6qtorch4WireEESaIS3_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %600) #5
  %602 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.115", ptr %67, i32 0, i32 0
  store ptr %601, ptr %602, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %68) #5
  %603 = load ptr, ptr %66, align 8, !tbaa !5
  %604 = call ptr @_ZNSt6vectorISt10shared_ptrIN6qtorch4WireEESaIS3_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %603) #5
  %605 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.115", ptr %68, i32 0, i32 0
  store ptr %604, ptr %605, align 8
  br label %606

606:                                              ; preds = %720, %599
  %607 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt10shared_ptrIN6qtorch4WireEESt6vectorIS4_SaIS4_EEEEbRKNS_17__normal_iteratorIT_T0_EESE_(ptr noundef nonnull align 8 dereferenceable(8) %67, ptr noundef nonnull align 8 dereferenceable(8) %68) #5
  br i1 %607, label %613, label %608

608:                                              ; preds = %606
  store i32 11, ptr %34, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %68) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %67) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %66) #5
  br label %724

609:                                              ; preds = %562
  %610 = landingpad { ptr, i32 }
          cleanup
  %611 = extractvalue { ptr, i32 } %610, 0
  store ptr %611, ptr %16, align 8
  %612 = extractvalue { ptr, i32 } %610, 1
  store i32 %612, ptr %17, align 4
  br label %723

613:                                              ; preds = %606
  call void @llvm.lifetime.start.p0(i64 8, ptr %69) #5
  %614 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt10shared_ptrIN6qtorch4WireEESt6vectorIS4_SaIS4_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %67) #5
  store ptr %614, ptr %69, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %70) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %71) #5
  %615 = load ptr, ptr %69, align 8, !tbaa !5
  %616 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch4WireELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %615) #5
  store i1 false, ptr %73, align 1
  store i1 false, ptr %75, align 1
  store i1 false, ptr %76, align 1
  store i1 false, ptr %77, align 1
  invoke void @_ZN6qtorch4Wire8GetNodeAEv(ptr dead_on_unwind writable sret(%"class.std::weak_ptr") align 8 %71, ptr noundef nonnull align 8 dereferenceable(44) %616)
          to label %617 unwind label %663

617:                                              ; preds = %613
  call void @_ZNKSt8weak_ptrIN6qtorch4NodeEE4lockEv(ptr dead_on_unwind writable sret(%"class.std::shared_ptr") align 8 %70, ptr noundef nonnull align 8 dereferenceable(16) %71) #5
  %618 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %70) #5
  %619 = getelementptr inbounds %"class.qtorch::Node", ptr %618, i32 0, i32 6
  %620 = load i8, ptr %619, align 8, !tbaa !33, !range !34, !noundef !35
  %621 = trunc i8 %620 to i1
  br i1 %621, label %622, label %630

622:                                              ; preds = %617
  call void @llvm.lifetime.start.p0(i64 16, ptr %72) #5
  store i1 true, ptr %73, align 1
  call void @llvm.lifetime.start.p0(i64 16, ptr %74) #5
  store i1 true, ptr %75, align 1
  %623 = load ptr, ptr %69, align 8, !tbaa !5
  %624 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch4WireELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %623) #5
  invoke void @_ZN6qtorch4Wire8GetNodeBEv(ptr dead_on_unwind writable sret(%"class.std::weak_ptr") align 8 %74, ptr noundef nonnull align 8 dereferenceable(44) %624)
          to label %625 unwind label %667

625:                                              ; preds = %622
  store i1 true, ptr %76, align 1
  call void @_ZNKSt8weak_ptrIN6qtorch4NodeEE4lockEv(ptr dead_on_unwind writable sret(%"class.std::shared_ptr") align 8 %72, ptr noundef nonnull align 8 dereferenceable(16) %74) #5
  store i1 true, ptr %77, align 1
  %626 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %72) #5
  %627 = getelementptr inbounds %"class.qtorch::Node", ptr %626, i32 0, i32 6
  %628 = load i8, ptr %627, align 8, !tbaa !33, !range !34, !noundef !35
  %629 = trunc i8 %628 to i1
  br label %630

630:                                              ; preds = %625, %617
  %631 = phi i1 [ false, %617 ], [ %629, %625 ]
  %632 = xor i1 %631, true
  %633 = load i1, ptr %77, align 1
  br i1 %633, label %634, label %635

634:                                              ; preds = %630
  call void @_ZNSt12__shared_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %72) #5
  br label %635

635:                                              ; preds = %634, %630
  %636 = load i1, ptr %76, align 1
  br i1 %636, label %637, label %638

637:                                              ; preds = %635
  call void @_ZNSt10__weak_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %74) #5
  br label %638

638:                                              ; preds = %637, %635
  %639 = load i1, ptr %75, align 1
  br i1 %639, label %640, label %641

640:                                              ; preds = %638
  call void @llvm.lifetime.end.p0(i64 16, ptr %74) #5
  br label %641

641:                                              ; preds = %640, %638
  %642 = load i1, ptr %73, align 1
  br i1 %642, label %643, label %644

643:                                              ; preds = %641
  call void @llvm.lifetime.end.p0(i64 16, ptr %72) #5
  br label %644

644:                                              ; preds = %643, %641
  call void @_ZNSt12__shared_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %70) #5
  call void @_ZNSt10__weak_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %71) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %71) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %70) #5
  br i1 %632, label %645, label %719

645:                                              ; preds = %644
  call void @llvm.lifetime.start.p0(i64 16, ptr %78) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %79) #5
  %646 = load ptr, ptr %69, align 8, !tbaa !5
  %647 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch4WireELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %646) #5
  invoke void @_ZN6qtorch4Wire8GetNodeAEv(ptr dead_on_unwind writable sret(%"class.std::weak_ptr") align 8 %79, ptr noundef nonnull align 8 dereferenceable(44) %647)
          to label %648 unwind label %678

648:                                              ; preds = %645
  call void @_ZNKSt8weak_ptrIN6qtorch4NodeEE4lockEv(ptr dead_on_unwind writable sret(%"class.std::shared_ptr") align 8 %78, ptr noundef nonnull align 8 dereferenceable(16) %79) #5
  %649 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %78) #5
  %650 = getelementptr inbounds %"class.qtorch::Node", ptr %649, i32 0, i32 6
  %651 = load i8, ptr %650, align 8, !tbaa !33, !range !34, !noundef !35
  %652 = trunc i8 %651 to i1
  call void @_ZNSt12__shared_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %78) #5
  call void @_ZNSt10__weak_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %79) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %79) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %78) #5
  br i1 %652, label %653, label %695

653:                                              ; preds = %648
  call void @llvm.lifetime.start.p0(i64 16, ptr %80) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %81) #5
  %654 = load ptr, ptr %69, align 8, !tbaa !5
  %655 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch4WireELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %654) #5
  invoke void @_ZN6qtorch4Wire8GetNodeBEv(ptr dead_on_unwind writable sret(%"class.std::weak_ptr") align 8 %81, ptr noundef nonnull align 8 dereferenceable(44) %655)
          to label %656 unwind label %682

656:                                              ; preds = %653
  call void @_ZNKSt8weak_ptrIN6qtorch4NodeEE4lockEv(ptr dead_on_unwind writable sret(%"class.std::shared_ptr") align 8 %80, ptr noundef nonnull align 8 dereferenceable(16) %81) #5
  %657 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %80) #5
  %658 = getelementptr inbounds %"class.qtorch::Node", ptr %657, i32 0, i32 6
  store i8 1, ptr %658, align 8, !tbaa !33
  call void @_ZNSt12__shared_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %80) #5
  call void @_ZNSt10__weak_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %81) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %81) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %80) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %82) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %83) #5
  %659 = load ptr, ptr %69, align 8, !tbaa !5
  %660 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch4WireELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %659) #5
  invoke void @_ZN6qtorch4Wire8GetNodeBEv(ptr dead_on_unwind writable sret(%"class.std::weak_ptr") align 8 %83, ptr noundef nonnull align 8 dereferenceable(44) %660)
          to label %661 unwind label %686

661:                                              ; preds = %656
  call void @_ZNKSt8weak_ptrIN6qtorch4NodeEE4lockEv(ptr dead_on_unwind writable sret(%"class.std::shared_ptr") align 8 %82, ptr noundef nonnull align 8 dereferenceable(16) %83) #5
  invoke void @_ZNSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EE9push_backEOS3_(ptr noundef nonnull align 8 dereferenceable(24) %25, ptr noundef nonnull align 8 dereferenceable(16) %82)
          to label %662 unwind label %690

662:                                              ; preds = %661
  call void @_ZNSt12__shared_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %82) #5
  call void @_ZNSt10__weak_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %83) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %83) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %82) #5
  br label %718

663:                                              ; preds = %613
  %664 = landingpad { ptr, i32 }
          cleanup
  %665 = extractvalue { ptr, i32 } %664, 0
  store ptr %665, ptr %16, align 8
  %666 = extractvalue { ptr, i32 } %664, 1
  store i32 %666, ptr %17, align 4
  br label %677

667:                                              ; preds = %622
  %668 = landingpad { ptr, i32 }
          cleanup
  %669 = extractvalue { ptr, i32 } %668, 0
  store ptr %669, ptr %16, align 8
  %670 = extractvalue { ptr, i32 } %668, 1
  store i32 %670, ptr %17, align 4
  %671 = load i1, ptr %75, align 1
  br i1 %671, label %672, label %673

672:                                              ; preds = %667
  call void @llvm.lifetime.end.p0(i64 16, ptr %74) #5
  br label %673

673:                                              ; preds = %672, %667
  %674 = load i1, ptr %73, align 1
  br i1 %674, label %675, label %676

675:                                              ; preds = %673
  call void @llvm.lifetime.end.p0(i64 16, ptr %72) #5
  br label %676

676:                                              ; preds = %675, %673
  call void @_ZNSt12__shared_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %70) #5
  call void @_ZNSt10__weak_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %71) #5
  br label %677

677:                                              ; preds = %676, %663
  call void @llvm.lifetime.end.p0(i64 16, ptr %71) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %70) #5
  br label %722

678:                                              ; preds = %645
  %679 = landingpad { ptr, i32 }
          cleanup
  %680 = extractvalue { ptr, i32 } %679, 0
  store ptr %680, ptr %16, align 8
  %681 = extractvalue { ptr, i32 } %679, 1
  store i32 %681, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %79) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %78) #5
  br label %722

682:                                              ; preds = %653
  %683 = landingpad { ptr, i32 }
          cleanup
  %684 = extractvalue { ptr, i32 } %683, 0
  store ptr %684, ptr %16, align 8
  %685 = extractvalue { ptr, i32 } %683, 1
  store i32 %685, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %81) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %80) #5
  br label %722

686:                                              ; preds = %656
  %687 = landingpad { ptr, i32 }
          cleanup
  %688 = extractvalue { ptr, i32 } %687, 0
  store ptr %688, ptr %16, align 8
  %689 = extractvalue { ptr, i32 } %687, 1
  store i32 %689, ptr %17, align 4
  br label %694

690:                                              ; preds = %661
  %691 = landingpad { ptr, i32 }
          cleanup
  %692 = extractvalue { ptr, i32 } %691, 0
  store ptr %692, ptr %16, align 8
  %693 = extractvalue { ptr, i32 } %691, 1
  store i32 %693, ptr %17, align 4
  call void @_ZNSt12__shared_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %82) #5
  call void @_ZNSt10__weak_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %83) #5
  br label %694

694:                                              ; preds = %690, %686
  call void @llvm.lifetime.end.p0(i64 16, ptr %83) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %82) #5
  br label %722

695:                                              ; preds = %648
  call void @llvm.lifetime.start.p0(i64 16, ptr %84) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %85) #5
  %696 = load ptr, ptr %69, align 8, !tbaa !5
  %697 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch4WireELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %696) #5
  invoke void @_ZN6qtorch4Wire8GetNodeAEv(ptr dead_on_unwind writable sret(%"class.std::weak_ptr") align 8 %85, ptr noundef nonnull align 8 dereferenceable(44) %697)
          to label %698 unwind label %705

698:                                              ; preds = %695
  call void @_ZNKSt8weak_ptrIN6qtorch4NodeEE4lockEv(ptr dead_on_unwind writable sret(%"class.std::shared_ptr") align 8 %84, ptr noundef nonnull align 8 dereferenceable(16) %85) #5
  %699 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %84) #5
  %700 = getelementptr inbounds %"class.qtorch::Node", ptr %699, i32 0, i32 6
  store i8 1, ptr %700, align 8, !tbaa !33
  call void @_ZNSt12__shared_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %84) #5
  call void @_ZNSt10__weak_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %85) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %85) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %84) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %86) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %87) #5
  %701 = load ptr, ptr %69, align 8, !tbaa !5
  %702 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch4WireELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %701) #5
  invoke void @_ZN6qtorch4Wire8GetNodeAEv(ptr dead_on_unwind writable sret(%"class.std::weak_ptr") align 8 %87, ptr noundef nonnull align 8 dereferenceable(44) %702)
          to label %703 unwind label %709

703:                                              ; preds = %698
  call void @_ZNKSt8weak_ptrIN6qtorch4NodeEE4lockEv(ptr dead_on_unwind writable sret(%"class.std::shared_ptr") align 8 %86, ptr noundef nonnull align 8 dereferenceable(16) %87) #5
  invoke void @_ZNSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EE9push_backEOS3_(ptr noundef nonnull align 8 dereferenceable(24) %25, ptr noundef nonnull align 8 dereferenceable(16) %86)
          to label %704 unwind label %713

704:                                              ; preds = %703
  call void @_ZNSt12__shared_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %86) #5
  call void @_ZNSt10__weak_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %87) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %87) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %86) #5
  br label %718

705:                                              ; preds = %695
  %706 = landingpad { ptr, i32 }
          cleanup
  %707 = extractvalue { ptr, i32 } %706, 0
  store ptr %707, ptr %16, align 8
  %708 = extractvalue { ptr, i32 } %706, 1
  store i32 %708, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %85) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %84) #5
  br label %722

709:                                              ; preds = %698
  %710 = landingpad { ptr, i32 }
          cleanup
  %711 = extractvalue { ptr, i32 } %710, 0
  store ptr %711, ptr %16, align 8
  %712 = extractvalue { ptr, i32 } %710, 1
  store i32 %712, ptr %17, align 4
  br label %717

713:                                              ; preds = %703
  %714 = landingpad { ptr, i32 }
          cleanup
  %715 = extractvalue { ptr, i32 } %714, 0
  store ptr %715, ptr %16, align 8
  %716 = extractvalue { ptr, i32 } %714, 1
  store i32 %716, ptr %17, align 4
  call void @_ZNSt12__shared_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %86) #5
  call void @_ZNSt10__weak_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %87) #5
  br label %717

717:                                              ; preds = %713, %709
  call void @llvm.lifetime.end.p0(i64 16, ptr %87) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %86) #5
  br label %722

718:                                              ; preds = %704, %662
  br label %719

719:                                              ; preds = %718, %644
  call void @llvm.lifetime.end.p0(i64 8, ptr %69) #5
  br label %720

720:                                              ; preds = %719
  %721 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt10shared_ptrIN6qtorch4WireEESt6vectorIS4_SaIS4_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %67) #5
  br label %606

722:                                              ; preds = %717, %705, %694, %682, %678, %677
  call void @llvm.lifetime.end.p0(i64 8, ptr %69) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %68) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %67) #5
  br label %723

723:                                              ; preds = %722, %609
  call void @llvm.lifetime.end.p0(i64 8, ptr %66) #5
  br label %735

724:                                              ; preds = %608
  %725 = load i32, ptr %61, align 4, !tbaa !9
  %726 = sext i32 %725 to i64
  %727 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %25, i64 noundef %726) #5
  invoke void @_ZNSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EE9push_backEOS3_(ptr noundef nonnull align 8 dereferenceable(24) %24, ptr noundef nonnull align 8 dereferenceable(16) %727)
          to label %728 unwind label %491

728:                                              ; preds = %724
  store i32 0, ptr %34, align 4
  br label %729

729:                                              ; preds = %728, %559, %532
  call void @llvm.lifetime.end.p0(i64 4, ptr %61) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %60) #5
  %730 = load i32, ptr %34, align 4
  switch i32 %730, label %737 [
    i32 0, label %731
    i32 8, label %732
  ]

731:                                              ; preds = %729
  br label %732

732:                                              ; preds = %731, %729
  %733 = load i32, ptr %59, align 4, !tbaa !9
  %734 = add nsw i32 %733, 1
  store i32 %734, ptr %59, align 4, !tbaa !9
  br label %460, !llvm.loop !41

735:                                              ; preds = %723, %552, %491
  call void @llvm.lifetime.end.p0(i64 4, ptr %61) #5
  br label %736

736:                                              ; preds = %735, %487
  call void @llvm.lifetime.end.p0(i64 8, ptr %60) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %59) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %58) #5
  br label %780

737:                                              ; preds = %729, %468, %464
  call void @llvm.lifetime.end.p0(i64 4, ptr %59) #5
  %738 = load i32, ptr %34, align 4
  switch i32 %738, label %779 [
    i32 6, label %739
  ]

739:                                              ; preds = %737
  call void @llvm.lifetime.start.p0(i64 8, ptr %88) #5
  store ptr %24, ptr %88, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %89) #5
  %740 = load ptr, ptr %88, align 8, !tbaa !5
  %741 = call ptr @_ZNSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %740) #5
  %742 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.138", ptr %89, i32 0, i32 0
  store ptr %741, ptr %742, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %90) #5
  %743 = load ptr, ptr %88, align 8, !tbaa !5
  %744 = call ptr @_ZNSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %743) #5
  %745 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.138", ptr %90, i32 0, i32 0
  store ptr %744, ptr %745, align 8
  br label %746

746:                                              ; preds = %754, %739
  %747 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt10shared_ptrIN6qtorch4NodeEESt6vectorIS4_SaIS4_EEEEbRKNS_17__normal_iteratorIT_T0_EESE_(ptr noundef nonnull align 8 dereferenceable(8) %89, ptr noundef nonnull align 8 dereferenceable(8) %90) #5
  br i1 %747, label %749, label %748

748:                                              ; preds = %746
  store i32 13, ptr %34, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %90) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %89) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %88) #5
  br label %756

749:                                              ; preds = %746
  call void @llvm.lifetime.start.p0(i64 8, ptr %91) #5
  %750 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt10shared_ptrIN6qtorch4NodeEESt6vectorIS4_SaIS4_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %89) #5
  store ptr %750, ptr %91, align 8, !tbaa !5
  %751 = load ptr, ptr %91, align 8, !tbaa !5
  %752 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %751) #5
  %753 = getelementptr inbounds %"class.qtorch::Node", ptr %752, i32 0, i32 6
  store i8 0, ptr %753, align 8, !tbaa !33
  call void @llvm.lifetime.end.p0(i64 8, ptr %91) #5
  br label %754

754:                                              ; preds = %749
  %755 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt10shared_ptrIN6qtorch4NodeEESt6vectorIS4_SaIS4_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %89) #5
  br label %746

756:                                              ; preds = %748
  call void @llvm.lifetime.start.p0(i64 8, ptr %92) #5
  store ptr %25, ptr %92, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %93) #5
  %757 = load ptr, ptr %92, align 8, !tbaa !5
  %758 = call ptr @_ZNSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %757) #5
  %759 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.138", ptr %93, i32 0, i32 0
  store ptr %758, ptr %759, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %94) #5
  %760 = load ptr, ptr %92, align 8, !tbaa !5
  %761 = call ptr @_ZNSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %760) #5
  %762 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.138", ptr %94, i32 0, i32 0
  store ptr %761, ptr %762, align 8
  br label %763

763:                                              ; preds = %775, %756
  %764 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt10shared_ptrIN6qtorch4NodeEESt6vectorIS4_SaIS4_EEEEbRKNS_17__normal_iteratorIT_T0_EESE_(ptr noundef nonnull align 8 dereferenceable(8) %93, ptr noundef nonnull align 8 dereferenceable(8) %94) #5
  br i1 %764, label %766, label %765

765:                                              ; preds = %763
  store i32 15, ptr %34, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %94) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %93) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %92) #5
  br label %777

766:                                              ; preds = %763
  call void @llvm.lifetime.start.p0(i64 8, ptr %95) #5
  %767 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt10shared_ptrIN6qtorch4NodeEESt6vectorIS4_SaIS4_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %93) #5
  store ptr %767, ptr %95, align 8, !tbaa !5
  %768 = load ptr, ptr %95, align 8, !tbaa !5
  %769 = call noundef zeroext i1 @_ZStneIN6qtorch4NodeEEbRKSt10shared_ptrIT_EDn(ptr noundef nonnull align 8 dereferenceable(16) %768, ptr null) #5
  br i1 %769, label %770, label %774

770:                                              ; preds = %766
  %771 = load ptr, ptr %95, align 8, !tbaa !5
  %772 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %771) #5
  %773 = getelementptr inbounds %"class.qtorch::Node", ptr %772, i32 0, i32 6
  store i8 0, ptr %773, align 8, !tbaa !33
  br label %774

774:                                              ; preds = %770, %766
  call void @llvm.lifetime.end.p0(i64 8, ptr %95) #5
  br label %775

775:                                              ; preds = %774
  %776 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt10shared_ptrIN6qtorch4NodeEESt6vectorIS4_SaIS4_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %93) #5
  br label %763

777:                                              ; preds = %765
  %778 = load i64, ptr %29, align 8, !tbaa !31
  store i64 %778, ptr %7, align 8
  store i32 1, ptr %34, align 4
  br label %779

779:                                              ; preds = %777, %737
  call void @llvm.lifetime.end.p0(i64 4, ptr %58) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #5
  call void @_ZNSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %25) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %25) #5
  call void @_ZNSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %24) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %24) #5
  br label %782

780:                                              ; preds = %736, %455, %322
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #5
  br label %781

781:                                              ; preds = %780, %318
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #5
  call void @_ZNSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %25) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %25) #5
  call void @_ZNSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %24) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %24) #5
  br label %784

782:                                              ; preds = %779, %202, %132
  %783 = load i64, ptr %7, align 8
  ret i64 %783

784:                                              ; preds = %781, %217, %135
  %785 = load ptr, ptr %16, align 8
  %786 = load i32, ptr %17, align 4
  %787 = insertvalue { ptr, i32 } poison, ptr %785, 0
  %788 = insertvalue { ptr, i32 } %787, i32 %786, 1
  resume { ptr, i32 } %788
}

; Function Attrs: nounwind
declare double @pow(double noundef, double noundef) #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZSteqIN6qtorch4NodeEEbRKSt10shared_ptrIT_EDn(ptr noundef nonnull align 8 dereferenceable(16), ptr) #3

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN6qtorch16ContractionTools37NumberOfConnectedBetweenTwoSuperNodesERKSt6vectorISt10shared_ptrINS_4NodeEESaIS4_EES8_(ptr noundef nonnull align 8 dereferenceable(10128), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) #2 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt12__shared_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #1 align 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 = { 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 #3 = { 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 #4 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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 8}
!12 = !{!"_ZTSN6qtorch4NodeE", !10, i64 8, !10, i64 12, !10, i64 16, !13, i64 20, !14, i64 24, !13, i64 32, !15, i64 40, !19, i64 64, !23, i64 88, !27, i64 112, !28, i64 120}
!13 = !{!"bool", !7, i64 0}
!14 = !{!"_ZTSSt4pairIiiE", !10, i64 0, !10, i64 4}
!15 = !{!"_ZTSSt6vectorISt7complexIdESaIS1_EE", !16, i64 0}
!16 = !{!"_ZTSSt12_Vector_baseISt7complexIdESaIS1_EE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseISt7complexIdESaIS1_EE12_Vector_implE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseISt7complexIdESaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!19 = !{!"_ZTSSt6vectorISt10shared_ptrIN6qtorch4WireEESaIS3_EE", !20, i64 0}
!20 = !{!"_ZTSSt12_Vector_baseISt10shared_ptrIN6qtorch4WireEESaIS3_EE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseISt10shared_ptrIN6qtorch4WireEESaIS3_EE12_Vector_implE", !22, i64 0}
!22 = !{!"_ZTSNSt12_Vector_baseISt10shared_ptrIN6qtorch4WireEESaIS3_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!23 = !{!"_ZTSSt6vectorIiSaIiEE", !24, i64 0}
!24 = !{!"_ZTSSt12_Vector_baseIiSaIiEE", !25, i64 0}
!25 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE12_Vector_implE", !26, i64 0}
!26 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!27 = !{!"_ZTSN6qtorch8GateTypeE", !7, i64 0}
!28 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !29, i64 0, !30, i64 8, !7, i64 16}
!29 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!30 = !{!"long", !7, i64 0}
!31 = !{!32, !32, i64 0}
!32 = !{!"long long", !7, i64 0}
!33 = !{!12, !13, i64 32}
!34 = !{i8 0, i8 2}
!35 = !{}
!36 = distinct !{!36, !37}
!37 = !{!"llvm.loop.mustprogress"}
!38 = !{!39, !6, i64 0}
!39 = !{!"_ZTSSt16initializer_listISt10shared_ptrIN6qtorch4NodeEEE", !6, i64 0, !30, i64 8}
!40 = !{!39, !30, i64 8}
!41 = distinct !{!41, !37}


; 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::weak_ptr" = type { %"class.std::__weak_ptr" }
%"class.std::__weak_ptr" = type { ptr, %"class.std::__weak_count" }
%"class.std::__weak_count" = type { ptr }
%"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 }
%"class.std::vector.14" = type { %"struct.std::_Vector_base.15" }
%"struct.std::_Vector_base.15" = type { %"struct.std::_Vector_base<std::shared_ptr<qtorch::Node>, std::allocator<std::shared_ptr<qtorch::Node>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::shared_ptr<qtorch::Node>, std::allocator<std::shared_ptr<qtorch::Node>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::shared_ptr<qtorch::Node>, std::allocator<std::shared_ptr<qtorch::Node>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::shared_ptr<qtorch::Node>, std::allocator<std::shared_ptr<qtorch::Node>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.__gnu_cxx::__normal_iterator.138" = type { ptr }
%"class.__gnu_cxx::__normal_iterator.115" = type { ptr }
%"class.std::uniform_int_distribution" = type { %"struct.std::uniform_int_distribution<>::param_type" }
%"struct.std::uniform_int_distribution<>::param_type" = type { i32, i32 }
%"class.std::allocator.16" = type { i8 }

; 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: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZN6qtorch4Node8GetWiresEv(ptr noundef nonnull align 8 dereferenceable(152)) local_unnamed_addr #2 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch4WireELN9__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 @_ZNSt10shared_ptrIN6qtorch4NodeEEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #1 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6qtorch4Wire8GetNodeAEv(ptr dead_on_unwind noalias writable sret(%"class.std::weak_ptr") align 8, ptr noundef nonnull align 8 dereferenceable(44)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6qtorch4Wire8GetNodeBEv(ptr dead_on_unwind noalias writable sret(%"class.std::weak_ptr") align 8, ptr noundef nonnull align 8 dereferenceable(44)) local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNKSt8weak_ptrIN6qtorch4NodeEE4lockEv(ptr dead_on_unwind noalias writable sret(%"class.std::shared_ptr") align 8, ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #1 align 2

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPSt10shared_ptrIN6qtorch4WireEESt6vectorIS4_SaIS4_EEEEbRKNS_17__normal_iteratorIT_T0_EESE_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPSt10shared_ptrIN6qtorch4NodeEESt6vectorIS4_SaIS4_EEEEbRKNS_17__normal_iteratorIT_T0_EESE_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZStneIN6qtorch4NodeEEbRKSt10shared_ptrIT_EDn(ptr noundef nonnull align 8 dereferenceable(16), ptr) local_unnamed_addr #3

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch7NetworkELN9__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 noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6qtorch7Network20GetUncontractedNodesEv(ptr noundef nonnull align 8 dereferenceable(380)) local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNSt24uniform_int_distributionIiEclISt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EEEEiRT_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(5000)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN6qtorch16ContractionTools22NumberOfConnectedWiresESt10shared_ptrINS_4NodeEES3_(ptr noundef nonnull align 8 dereferenceable(10128), ptr noundef, ptr noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef i64 @_ZN6qtorch16ContractionTools13CalculateCostEiiiii(ptr noundef nonnull align 8 dereferenceable(10128) %0, i32 noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4, i32 noundef %5) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %7 = alloca %"class.std::shared_ptr", align 8
  %8 = alloca %"class.std::shared_ptr", align 8
  %9 = alloca %"class.std::shared_ptr", align 8
  %10 = alloca %"class.std::shared_ptr", align 8
  %11 = alloca %"class.std::shared_ptr", align 8
  %12 = alloca %"class.std::shared_ptr", align 8
  %13 = alloca %"class.std::vector.14", align 8
  %14 = alloca %"class.std::vector.14", align 8
  %15 = alloca %"class.std::shared_ptr", align 8
  %16 = alloca %"class.std::shared_ptr", align 8
  %17 = alloca %"class.__gnu_cxx::__normal_iterator.138", align 8
  %18 = alloca %"class.__gnu_cxx::__normal_iterator.138", align 8
  %19 = alloca %"class.__gnu_cxx::__normal_iterator.115", align 8
  %20 = alloca %"class.__gnu_cxx::__normal_iterator.115", align 8
  %21 = alloca %"class.std::shared_ptr", align 8
  %22 = alloca %"class.std::weak_ptr", align 8
  %23 = alloca %"class.std::shared_ptr", align 8
  %24 = alloca %"class.std::weak_ptr", align 8
  %25 = alloca %"class.std::shared_ptr", align 8
  %26 = alloca %"class.std::weak_ptr", align 8
  %27 = alloca %"class.std::shared_ptr", align 8
  %28 = alloca %"class.std::weak_ptr", align 8
  %29 = alloca %"class.std::shared_ptr", align 8
  %30 = alloca %"class.std::weak_ptr", align 8
  %31 = alloca %"class.std::shared_ptr", align 8
  %32 = alloca %"class.std::weak_ptr", align 8
  %33 = alloca %"class.std::shared_ptr", align 8
  %34 = alloca %"class.std::weak_ptr", align 8
  %35 = alloca %"class.std::uniform_int_distribution", align 4
  %36 = alloca %"class.std::vector.14", align 8
  %37 = alloca [1 x %"class.std::shared_ptr"], align 8
  %38 = alloca %"class.std::allocator.16", align 1
  %39 = alloca %"class.__gnu_cxx::__normal_iterator.115", align 8
  %40 = alloca %"class.__gnu_cxx::__normal_iterator.115", align 8
  %41 = alloca %"class.std::shared_ptr", align 8
  %42 = alloca %"class.std::weak_ptr", align 8
  %43 = alloca %"class.std::shared_ptr", align 8
  %44 = alloca %"class.std::weak_ptr", align 8
  %45 = alloca %"class.std::shared_ptr", align 8
  %46 = alloca %"class.std::weak_ptr", align 8
  %47 = alloca %"class.std::shared_ptr", align 8
  %48 = alloca %"class.std::weak_ptr", align 8
  %49 = alloca %"class.std::shared_ptr", align 8
  %50 = alloca %"class.std::weak_ptr", align 8
  %51 = alloca %"class.std::shared_ptr", align 8
  %52 = alloca %"class.std::weak_ptr", align 8
  %53 = alloca %"class.std::shared_ptr", align 8
  %54 = alloca %"class.std::weak_ptr", align 8
  %55 = alloca %"class.__gnu_cxx::__normal_iterator.138", align 8
  %56 = alloca %"class.__gnu_cxx::__normal_iterator.138", align 8
  %57 = alloca %"class.__gnu_cxx::__normal_iterator.138", align 8
  %58 = alloca %"class.__gnu_cxx::__normal_iterator.138", align 8
  %59 = icmp eq i32 %1, 0
  %60 = getelementptr inbounds i8, ptr %0, i64 5104
  %61 = tail call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %60) #4
  %62 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6qtorch7Network20GetUncontractedNodesEv(ptr noundef nonnull align 8 dereferenceable(380) %61) #4
  %63 = sext i32 %2 to i64
  %64 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %62, i64 noundef %63) #4
  %65 = tail call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %64) #4
  %66 = getelementptr inbounds i8, ptr %65, i64 8
  %67 = load i32, ptr %66, align 8, !tbaa !5
  %68 = tail call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %60) #4
  %69 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6qtorch7Network20GetUncontractedNodesEv(ptr noundef nonnull align 8 dereferenceable(380) %68) #4
  %70 = sext i32 %3 to i64
  %71 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %69, i64 noundef %70) #4
  %72 = tail call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %71) #4
  %73 = getelementptr inbounds i8, ptr %72, i64 8
  %74 = load i32, ptr %73, align 8, !tbaa !5
  %75 = tail call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %60) #4
  %76 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6qtorch7Network20GetUncontractedNodesEv(ptr noundef nonnull align 8 dereferenceable(380) %75) #4
  %77 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %76, i64 noundef %63) #4
  br i1 %59, label %78, label %89

78:                                               ; preds = %6
  call void @_ZNSt10shared_ptrIN6qtorch4NodeEEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(16) %7, ptr noundef nonnull align 8 dereferenceable(16) %77) #4
  %79 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %60) #4
  %80 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6qtorch7Network20GetUncontractedNodesEv(ptr noundef nonnull align 8 dereferenceable(380) %79) #4
  %81 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %80, i64 noundef %70) #4
  call void @_ZNSt10shared_ptrIN6qtorch4NodeEEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(16) %8, ptr noundef nonnull align 8 dereferenceable(16) %81) #4
  %82 = invoke noundef i32 @_ZN6qtorch16ContractionTools22NumberOfConnectedWiresESt10shared_ptrINS_4NodeEES3_(ptr noundef nonnull align 8 dereferenceable(10128) %0, ptr noundef nonnull %7, ptr noundef nonnull %8)
          to label %83 unwind label %87

83:                                               ; preds = %78
  %84 = add nsw i32 %74, %67
  %85 = sub i32 %84, %82
  %86 = sext i32 %85 to i64
  call void @_ZNSt12__shared_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %8) #4
  call void @_ZNSt12__shared_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %7) #4
  br label %362

87:                                               ; preds = %78
  %88 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt12__shared_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %8) #4
  call void @_ZNSt12__shared_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %7) #4
  br label %363

89:                                               ; preds = %6
  call void @_ZNSt10shared_ptrIN6qtorch4NodeEEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef nonnull align 8 dereferenceable(16) %77) #4
  %90 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %60) #4
  %91 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6qtorch7Network20GetUncontractedNodesEv(ptr noundef nonnull align 8 dereferenceable(380) %90) #4
  %92 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %91, i64 noundef %70) #4
  call void @_ZNSt10shared_ptrIN6qtorch4NodeEEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(16) %10, ptr noundef nonnull align 8 dereferenceable(16) %92) #4
  %93 = invoke noundef i32 @_ZN6qtorch16ContractionTools22NumberOfConnectedWiresESt10shared_ptrINS_4NodeEES3_(ptr noundef nonnull align 8 dereferenceable(10128) %0, ptr noundef nonnull %9, ptr noundef nonnull %10)
          to label %94 unwind label %107

94:                                               ; preds = %89
  %95 = add nsw i32 %74, %67
  %96 = shl i32 %93, 1
  %97 = sub i32 %95, %96
  %.not = icmp sgt i32 %97, %4
  br i1 %.not, label %.critedge184, label %98

98:                                               ; preds = %94
  %99 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %60) #4
  %100 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6qtorch7Network20GetUncontractedNodesEv(ptr noundef nonnull align 8 dereferenceable(380) %99) #4
  %101 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %100, i64 noundef %63) #4
  call void @_ZNSt10shared_ptrIN6qtorch4NodeEEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(16) %11, ptr noundef nonnull align 8 dereferenceable(16) %101) #4
  %102 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %60) #4
  %103 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6qtorch7Network20GetUncontractedNodesEv(ptr noundef nonnull align 8 dereferenceable(380) %102) #4
  %104 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %103, i64 noundef %70) #4
  call void @_ZNSt10shared_ptrIN6qtorch4NodeEEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(16) %12, ptr noundef nonnull align 8 dereferenceable(16) %104) #4
  %105 = invoke noundef i32 @_ZN6qtorch16ContractionTools22NumberOfConnectedWiresESt10shared_ptrINS_4NodeEES3_(ptr noundef nonnull align 8 dereferenceable(10128) %0, ptr noundef nonnull %11, ptr noundef nonnull %12)
          to label %.critedge unwind label %109

.critedge:                                        ; preds = %98
  %106 = icmp sgt i32 %105, %5
  call void @_ZNSt12__shared_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %12) #4
  call void @_ZNSt12__shared_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %11) #4
  call void @_ZNSt12__shared_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %10) #4
  call void @_ZNSt12__shared_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %9) #4
  br i1 %106, label %362, label %112

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

109:                                              ; preds = %98
  %110 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt12__shared_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %12) #4
  call void @_ZNSt12__shared_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %11) #4
  br label %111

111:                                              ; preds = %109, %107
  %.pn = phi { ptr, i32 } [ %110, %109 ], [ %108, %107 ]
  call void @_ZNSt12__shared_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %10) #4
  call void @_ZNSt12__shared_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %9) #4
  br label %363

112:                                              ; preds = %.critedge
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %13) #4
  call void @_ZNSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %14) #4
  call void @_ZNSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #4
  %113 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %60) #4
  %114 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6qtorch7Network20GetUncontractedNodesEv(ptr noundef nonnull align 8 dereferenceable(380) %113) #4
  %115 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %114, i64 noundef %63) #4
  call void @_ZNSt10shared_ptrIN6qtorch4NodeEEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(16) %15, ptr noundef nonnull align 8 dereferenceable(16) %115) #4
  %116 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %60) #4
  %117 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6qtorch7Network20GetUncontractedNodesEv(ptr noundef nonnull align 8 dereferenceable(380) %116) #4
  %118 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %117, i64 noundef %70) #4
  call void @_ZNSt10shared_ptrIN6qtorch4NodeEEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(16) %16, ptr noundef nonnull align 8 dereferenceable(16) %118) #4
  %119 = invoke noundef i32 @_ZN6qtorch16ContractionTools22NumberOfConnectedWiresESt10shared_ptrINS_4NodeEES3_(ptr noundef nonnull align 8 dereferenceable(10128) %0, ptr noundef nonnull %15, ptr noundef nonnull %16)
          to label %120 unwind label %174

120:                                              ; preds = %112
  call void @_ZNSt12__shared_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %16) #4
  call void @_ZNSt12__shared_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %15) #4
  %121 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %60) #4
  %122 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6qtorch7Network20GetUncontractedNodesEv(ptr noundef nonnull align 8 dereferenceable(380) %121) #4
  %123 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %122, i64 noundef %63) #4
  %124 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %123) #4
  %125 = getelementptr inbounds i8, ptr %124, i64 8
  %126 = load i32, ptr %125, align 8, !tbaa !5
  %127 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %60) #4
  %128 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6qtorch7Network20GetUncontractedNodesEv(ptr noundef nonnull align 8 dereferenceable(380) %127) #4
  %129 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %128, i64 noundef %70) #4
  %130 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %129) #4
  %131 = getelementptr inbounds i8, ptr %130, i64 8
  %132 = load i32, ptr %131, align 8, !tbaa !5
  %133 = sub i32 %126, %119
  %134 = add i32 %133, %132
  %135 = sitofp i32 %134 to double
  %mul = fmul double %135, 2.000000e+00
  %exp2 = call double @exp2(double %mul)
  %136 = fptosi double %exp2 to i64
  %137 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %60) #4
  %138 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6qtorch7Network20GetUncontractedNodesEv(ptr noundef nonnull align 8 dereferenceable(380) %137) #4
  %139 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %138, i64 noundef %63) #4
  %140 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %139) #4
  %141 = getelementptr inbounds i8, ptr %140, i64 8
  %142 = load i32, ptr %141, align 8, !tbaa !5
  %143 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %60) #4
  %144 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6qtorch7Network20GetUncontractedNodesEv(ptr noundef nonnull align 8 dereferenceable(380) %143) #4
  %145 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %144, i64 noundef %70) #4
  %146 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %145) #4
  %147 = getelementptr inbounds i8, ptr %146, i64 8
  %148 = load i32, ptr %147, align 8, !tbaa !5
  %149 = shl i32 %119, 1
  %150 = sub i32 %142, %149
  %151 = add i32 %150, %148
  %152 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %60) #4
  %153 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6qtorch7Network20GetUncontractedNodesEv(ptr noundef nonnull align 8 dereferenceable(380) %152) #4
  %154 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %153, i64 noundef %63) #4
  invoke void @_ZNSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EE9push_backERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %13, ptr noundef nonnull align 8 dereferenceable(16) %154)
          to label %155 unwind label %176

155:                                              ; preds = %120
  %156 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %60) #4
  %157 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6qtorch7Network20GetUncontractedNodesEv(ptr noundef nonnull align 8 dereferenceable(380) %156) #4
  %158 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %157, i64 noundef %63) #4
  %159 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %158) #4
  %160 = getelementptr inbounds i8, ptr %159, i64 32
  store i8 1, ptr %160, align 8, !tbaa !29
  %161 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %60) #4
  %162 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6qtorch7Network20GetUncontractedNodesEv(ptr noundef nonnull align 8 dereferenceable(380) %161) #4
  %163 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %162, i64 noundef %70) #4
  invoke void @_ZNSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EE9push_backERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %13, ptr noundef nonnull align 8 dereferenceable(16) %163)
          to label %164 unwind label %176

164:                                              ; preds = %155
  %165 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %60) #4
  %166 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6qtorch7Network20GetUncontractedNodesEv(ptr noundef nonnull align 8 dereferenceable(380) %165) #4
  %167 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %166, i64 noundef %70) #4
  %168 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %167) #4
  %169 = getelementptr inbounds i8, ptr %168, i64 32
  store i8 1, ptr %169, align 8, !tbaa !29
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %17) #4
  %170 = call ptr @_ZNSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %13) #4
  store ptr %170, ptr %17, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %18) #4
  %171 = call ptr @_ZNSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %13) #4
  store ptr %171, ptr %18, align 8
  %172 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt10shared_ptrIN6qtorch4NodeEESt6vectorIS4_SaIS4_EEEEbRKNS_17__normal_iteratorIT_T0_EESE_(ptr noundef nonnull align 8 dereferenceable(8) %17, ptr noundef nonnull align 8 dereferenceable(8) %18) #4
  br i1 %172, label %.lr.ph205, label %._crit_edge206

._crit_edge206:                                   ; preds = %._crit_edge, %164
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #4
  %.not149210 = icmp sgt i32 %1, 0
  br i1 %.not149210, label %.lr.ph216, label %.thread180

.lr.ph216:                                        ; preds = %._crit_edge206
  %173 = getelementptr inbounds i8, ptr %0, i64 5120
  br label %227

174:                                              ; preds = %112
  %175 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt12__shared_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %16) #4
  call void @_ZNSt12__shared_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %15) #4
  br label %361

176:                                              ; preds = %155, %120
  %177 = landingpad { ptr, i32 }
          cleanup
  br label %361

.lr.ph205:                                        ; preds = %164, %._crit_edge
  %178 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt10shared_ptrIN6qtorch4NodeEESt6vectorIS4_SaIS4_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %17) #4
  %179 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %178) #4
  %180 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN6qtorch4Node8GetWiresEv(ptr noundef nonnull align 8 dereferenceable(152) %179)
          to label %181 unwind label %187

181:                                              ; preds = %.lr.ph205
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %19) #4
  %182 = call ptr @_ZNSt6vectorISt10shared_ptrIN6qtorch4WireEESaIS3_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %180) #4
  store ptr %182, ptr %19, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %20) #4
  %183 = call ptr @_ZNSt6vectorISt10shared_ptrIN6qtorch4WireEESaIS3_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %180) #4
  store ptr %183, ptr %20, align 8
  %184 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt10shared_ptrIN6qtorch4WireEESt6vectorIS4_SaIS4_EEEEbRKNS_17__normal_iteratorIT_T0_EESE_(ptr noundef nonnull align 8 dereferenceable(8) %19, ptr noundef nonnull align 8 dereferenceable(8) %20) #4
  br i1 %184, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %222, %181
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %20) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %19) #4
  %185 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt10shared_ptrIN6qtorch4NodeEESt6vectorIS4_SaIS4_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %17) #4
  %186 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt10shared_ptrIN6qtorch4NodeEESt6vectorIS4_SaIS4_EEEEbRKNS_17__normal_iteratorIT_T0_EESE_(ptr noundef nonnull align 8 dereferenceable(8) %17, ptr noundef nonnull align 8 dereferenceable(8) %18) #4
  br i1 %186, label %.lr.ph205, label %._crit_edge206

187:                                              ; preds = %.lr.ph205
  %188 = landingpad { ptr, i32 }
          cleanup
  br label %226

.lr.ph:                                           ; preds = %181, %222
  %189 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt10shared_ptrIN6qtorch4WireEESt6vectorIS4_SaIS4_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %19) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %21) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %22) #4
  %190 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch4WireELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %189) #4
  call void @_ZN6qtorch4Wire8GetNodeAEv(ptr dead_on_unwind nonnull writable sret(%"class.std::weak_ptr") align 8 %22, ptr noundef nonnull align 8 dereferenceable(44) %190)
  call void @_ZNKSt8weak_ptrIN6qtorch4NodeEE4lockEv(ptr dead_on_unwind nonnull writable sret(%"class.std::shared_ptr") align 8 %21, ptr noundef nonnull align 8 dereferenceable(16) %22) #4
  %191 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %21) #4
  %192 = getelementptr inbounds i8, ptr %191, i64 32
  %193 = load i8, ptr %192, align 8, !tbaa !29, !range !30, !noundef !31
  %194 = trunc nuw i8 %193 to i1
  br i1 %194, label %.critedge158, label %.critedge185

.critedge158:                                     ; preds = %.lr.ph
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %23) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %24) #4
  %195 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch4WireELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %189) #4
  call void @_ZN6qtorch4Wire8GetNodeBEv(ptr dead_on_unwind nonnull writable sret(%"class.std::weak_ptr") align 8 %24, ptr noundef nonnull align 8 dereferenceable(44) %195)
  call void @_ZNKSt8weak_ptrIN6qtorch4NodeEE4lockEv(ptr dead_on_unwind nonnull writable sret(%"class.std::shared_ptr") align 8 %23, ptr noundef nonnull align 8 dereferenceable(16) %24) #4
  %196 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %23) #4
  %197 = getelementptr inbounds i8, ptr %196, i64 32
  %198 = load i8, ptr %197, align 8, !tbaa !29, !range !30, !noundef !31
  %199 = trunc nuw i8 %198 to i1
  call void @_ZNSt12__shared_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %23) #4
  call void @_ZNSt10__weak_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %24) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %24) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %23) #4
  call void @_ZNSt12__shared_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %21) #4
  call void @_ZNSt10__weak_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %22) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %22) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %21) #4
  br i1 %199, label %222, label %200

.critedge185:                                     ; preds = %.lr.ph
  call void @_ZNSt12__shared_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %21) #4
  call void @_ZNSt10__weak_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %22) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %22) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %21) #4
  br label %200

200:                                              ; preds = %.critedge185, %.critedge158
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %25) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %26) #4
  %201 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch4WireELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %189) #4
  call void @_ZN6qtorch4Wire8GetNodeAEv(ptr dead_on_unwind nonnull writable sret(%"class.std::weak_ptr") align 8 %26, ptr noundef nonnull align 8 dereferenceable(44) %201)
  call void @_ZNKSt8weak_ptrIN6qtorch4NodeEE4lockEv(ptr dead_on_unwind nonnull writable sret(%"class.std::shared_ptr") align 8 %25, ptr noundef nonnull align 8 dereferenceable(16) %26) #4
  %202 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %25) #4
  %203 = getelementptr inbounds i8, ptr %202, i64 32
  %204 = load i8, ptr %203, align 8, !tbaa !29, !range !30, !noundef !31
  %205 = trunc nuw i8 %204 to i1
  call void @_ZNSt12__shared_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %25) #4
  call void @_ZNSt10__weak_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %26) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %26) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %25) #4
  br i1 %205, label %206, label %214

206:                                              ; preds = %200
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %27) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %28) #4
  %207 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch4WireELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %189) #4
  call void @_ZN6qtorch4Wire8GetNodeBEv(ptr dead_on_unwind nonnull writable sret(%"class.std::weak_ptr") align 8 %28, ptr noundef nonnull align 8 dereferenceable(44) %207)
  call void @_ZNKSt8weak_ptrIN6qtorch4NodeEE4lockEv(ptr dead_on_unwind nonnull writable sret(%"class.std::shared_ptr") align 8 %27, ptr noundef nonnull align 8 dereferenceable(16) %28) #4
  %208 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %27) #4
  %209 = getelementptr inbounds i8, ptr %208, i64 32
  store i8 1, ptr %209, align 8, !tbaa !29
  call void @_ZNSt12__shared_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %27) #4
  call void @_ZNSt10__weak_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %28) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %28) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %27) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %29) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %30) #4
  %210 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch4WireELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %189) #4
  call void @_ZN6qtorch4Wire8GetNodeBEv(ptr dead_on_unwind nonnull writable sret(%"class.std::weak_ptr") align 8 %30, ptr noundef nonnull align 8 dereferenceable(44) %210)
  call void @_ZNKSt8weak_ptrIN6qtorch4NodeEE4lockEv(ptr dead_on_unwind nonnull writable sret(%"class.std::shared_ptr") align 8 %29, ptr noundef nonnull align 8 dereferenceable(16) %30) #4
  invoke void @_ZNSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EE9push_backEOS3_(ptr noundef nonnull align 8 dereferenceable(24) %14, ptr noundef nonnull align 8 dereferenceable(16) %29)
          to label %211 unwind label %212

211:                                              ; preds = %206
  call void @_ZNSt12__shared_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %29) #4
  call void @_ZNSt10__weak_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %30) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %30) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %29) #4
  br label %222

212:                                              ; preds = %206
  %213 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt12__shared_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %29) #4
  call void @_ZNSt10__weak_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %30) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %30) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %29) #4
  br label %225

214:                                              ; preds = %200
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %31) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %32) #4
  %215 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch4WireELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %189) #4
  call void @_ZN6qtorch4Wire8GetNodeAEv(ptr dead_on_unwind nonnull writable sret(%"class.std::weak_ptr") align 8 %32, ptr noundef nonnull align 8 dereferenceable(44) %215)
  call void @_ZNKSt8weak_ptrIN6qtorch4NodeEE4lockEv(ptr dead_on_unwind nonnull writable sret(%"class.std::shared_ptr") align 8 %31, ptr noundef nonnull align 8 dereferenceable(16) %32) #4
  %216 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %31) #4
  %217 = getelementptr inbounds i8, ptr %216, i64 32
  store i8 1, ptr %217, align 8, !tbaa !29
  call void @_ZNSt12__shared_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %31) #4
  call void @_ZNSt10__weak_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %32) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %32) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %31) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %33) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %34) #4
  %218 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch4WireELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %189) #4
  call void @_ZN6qtorch4Wire8GetNodeAEv(ptr dead_on_unwind nonnull writable sret(%"class.std::weak_ptr") align 8 %34, ptr noundef nonnull align 8 dereferenceable(44) %218)
  call void @_ZNKSt8weak_ptrIN6qtorch4NodeEE4lockEv(ptr dead_on_unwind nonnull writable sret(%"class.std::shared_ptr") align 8 %33, ptr noundef nonnull align 8 dereferenceable(16) %34) #4
  invoke void @_ZNSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EE9push_backEOS3_(ptr noundef nonnull align 8 dereferenceable(24) %14, ptr noundef nonnull align 8 dereferenceable(16) %33)
          to label %219 unwind label %220

219:                                              ; preds = %214
  call void @_ZNSt12__shared_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %33) #4
  call void @_ZNSt10__weak_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %34) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %34) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %33) #4
  br label %222

220:                                              ; preds = %214
  %221 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt12__shared_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %33) #4
  call void @_ZNSt10__weak_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %34) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %34) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %33) #4
  br label %225

222:                                              ; preds = %211, %219, %.critedge158
  %223 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt10shared_ptrIN6qtorch4WireEESt6vectorIS4_SaIS4_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %19) #4
  %224 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt10shared_ptrIN6qtorch4WireEESt6vectorIS4_SaIS4_EEEEbRKNS_17__normal_iteratorIT_T0_EESE_(ptr noundef nonnull align 8 dereferenceable(8) %19, ptr noundef nonnull align 8 dereferenceable(8) %20) #4
  br i1 %224, label %.lr.ph, label %._crit_edge

225:                                              ; preds = %220, %212
  %.pn150 = phi { ptr, i32 } [ %213, %212 ], [ %221, %220 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %20) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %19) #4
  br label %226

226:                                              ; preds = %225, %187
  %.pn150.pn = phi { ptr, i32 } [ %.pn150, %225 ], [ %188, %187 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #4
  br label %361

227:                                              ; preds = %.lr.ph216, %338
  %.0115214 = phi i64 [ %136, %.lr.ph216 ], [ %.1116.ph, %338 ]
  %.0118213 = phi i32 [ %151, %.lr.ph216 ], [ %.1119.ph, %338 ]
  %.0121212 = phi i32 [ 0, %.lr.ph216 ], [ %339, %338 ]
  %.0123211 = phi i32 [ 0, %.lr.ph216 ], [ %.1124.ph, %338 ]
  %228 = call noundef i64 @_ZNKSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %14) #4
  %229 = icmp eq i64 %228, 0
  br i1 %229, label %.thread177, label %230

230:                                              ; preds = %227
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %35) #4
  %231 = call noundef i64 @_ZNKSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %14) #4
  %232 = trunc i64 %231 to i32
  %233 = add i32 %232, -1
  invoke void @_ZNSt24uniform_int_distributionIiEC2Eii(ptr noundef nonnull align 4 dereferenceable(8) %35, i32 noundef 0, i32 noundef %233)
          to label %234 unwind label %241

234:                                              ; preds = %230
  %235 = invoke noundef i32 @_ZNSt24uniform_int_distributionIiEclISt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EEEEiRT_(ptr noundef nonnull align 4 dereferenceable(8) %35, ptr noundef nonnull align 8 dereferenceable(5000) %173)
          to label %.preheader unwind label %.loopexit.split-lp

.preheader:                                       ; preds = %234, %239
  %.0120 = phi i32 [ %240, %239 ], [ %235, %234 ]
  %236 = sext i32 %.0120 to i64
  %237 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %236) #4
  %238 = call noundef zeroext i1 @_ZSteqIN6qtorch4NodeEEbRKSt10shared_ptrIT_EDn(ptr noundef nonnull align 8 dereferenceable(16) %237, ptr null) #4
  br i1 %238, label %239, label %243

239:                                              ; preds = %.preheader
  %240 = invoke noundef i32 @_ZNSt24uniform_int_distributionIiEclISt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EEEEiRT_(ptr noundef nonnull align 4 dereferenceable(8) %35, ptr noundef nonnull align 8 dereferenceable(5000) %173)
          to label %.preheader unwind label %.loopexit, !llvm.loop !32

241:                                              ; preds = %230
  %242 = landingpad { ptr, i32 }
          cleanup
  br label %340

.loopexit:                                        ; preds = %239
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %340

.loopexit.split-lp:                               ; preds = %234, %._crit_edge209
  %lpad.loopexit.split-lp = landingpad { ptr, i32 }
          cleanup
  br label %340

243:                                              ; preds = %.preheader
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %36) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %37) #4
  %244 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %236) #4
  call void @_ZNSt10shared_ptrIN6qtorch4NodeEEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(16) %37, ptr noundef nonnull align 8 dereferenceable(16) %244) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %38) #4
  call void @_ZNSaISt10shared_ptrIN6qtorch4NodeEEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %38) #4
  invoke void @_ZNSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EEC2ESt16initializer_listIS3_ERKS4_(ptr noundef nonnull align 8 dereferenceable(24) %36, ptr nonnull %37, i64 1, ptr noundef nonnull align 1 dereferenceable(1) %38)
          to label %245 unwind label %263

245:                                              ; preds = %243
  %246 = invoke noundef i32 @_ZN6qtorch16ContractionTools37NumberOfConnectedBetweenTwoSuperNodesERKSt6vectorISt10shared_ptrINS_4NodeEESaIS4_EES8_(ptr noundef nonnull align 8 dereferenceable(10128) %0, ptr noundef nonnull align 8 dereferenceable(24) %13, ptr noundef nonnull align 8 dereferenceable(24) %36)
          to label %247 unwind label %265

247:                                              ; preds = %245
  call void @_ZNSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %36) #4
  call void @_ZNSt15__new_allocatorISt10shared_ptrIN6qtorch4NodeEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %38) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %38) #4
  call void @_ZNSt12__shared_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %37) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %37) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %36) #4
  %248 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %236) #4
  %249 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %248) #4
  %250 = getelementptr inbounds i8, ptr %249, i64 8
  %251 = load i32, ptr %250, align 8, !tbaa !5
  %252 = sub i32 %.0118213, %246
  %253 = add i32 %252, %251
  %254 = icmp sgt i32 %253, 11
  %255 = sext i32 %.0123211 to i64
  br i1 %254, label %256, label %._crit_edge234

256:                                              ; preds = %247
  %257 = call noundef i64 @_ZNKSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %14) #4
  %258 = shl i64 %257, 1
  %259 = icmp ugt i64 %258, %255
  br i1 %259, label %260, label %._crit_edge234

260:                                              ; preds = %256
  %261 = add nsw i32 %.0123211, 1
  %262 = add nsw i32 %.0121212, -1
  br label %338

263:                                              ; preds = %243
  %264 = landingpad { ptr, i32 }
          cleanup
  br label %267

265:                                              ; preds = %245
  %266 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %36) #4
  br label %267

267:                                              ; preds = %265, %263
  %.pn135 = phi { ptr, i32 } [ %266, %265 ], [ %264, %263 ]
  call void @_ZNSt15__new_allocatorISt10shared_ptrIN6qtorch4NodeEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %38) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %38) #4
  call void @_ZNSt12__shared_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %37) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %37) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %36) #4
  br label %340

._crit_edge234:                                   ; preds = %247, %256
  %268 = call noundef i64 @_ZNKSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %14) #4
  %269 = shl i64 %268, 1
  %270 = icmp ult i64 %269, %255
  br i1 %270, label %341, label %271

271:                                              ; preds = %._crit_edge234
  %272 = sitofp i32 %.0118213 to double
  %mul137 = fmul double %272, 2.000000e+00
  %exp2138 = call double @exp2(double %mul137)
  %273 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %236) #4
  %274 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %273) #4
  %275 = getelementptr inbounds i8, ptr %274, i64 8
  %276 = load i32, ptr %275, align 8, !tbaa !5
  %277 = sitofp i32 %276 to double
  %mul139 = fmul double %277, 2.000000e+00
  %exp2140 = call double @exp2(double %mul139)
  %278 = fmul double %exp2138, %exp2140
  %279 = sitofp i32 %246 to double
  %mul141 = fmul double %279, 2.000000e+00
  %exp2142 = call double @exp2(double %mul141)
  %280 = fdiv double %278, %exp2142
  %281 = sitofp i64 %.0115214 to double
  %282 = fadd double %280, %281
  %283 = fptosi double %282 to i64
  %284 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %236) #4
  %285 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %284) #4
  %286 = getelementptr inbounds i8, ptr %285, i64 8
  %287 = load i32, ptr %286, align 8, !tbaa !5
  %288 = shl i32 %246, 1
  %289 = sub i32 %.0118213, %288
  %290 = add i32 %289, %287
  %291 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %236) #4
  %292 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %291) #4
  %293 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN6qtorch4Node8GetWiresEv(ptr noundef nonnull align 8 dereferenceable(152) %292)
          to label %294 unwind label %299

294:                                              ; preds = %271
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %39) #4
  %295 = call ptr @_ZNSt6vectorISt10shared_ptrIN6qtorch4WireEESaIS3_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %293) #4
  store ptr %295, ptr %39, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %40) #4
  %296 = call ptr @_ZNSt6vectorISt10shared_ptrIN6qtorch4WireEESaIS3_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %293) #4
  store ptr %296, ptr %40, align 8
  %297 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt10shared_ptrIN6qtorch4WireEESt6vectorIS4_SaIS4_EEEEbRKNS_17__normal_iteratorIT_T0_EESE_(ptr noundef nonnull align 8 dereferenceable(8) %39, ptr noundef nonnull align 8 dereferenceable(8) %40) #4
  br i1 %297, label %.lr.ph208, label %._crit_edge209

._crit_edge209:                                   ; preds = %334, %294
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %40) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %39) #4
  %298 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %236) #4
  invoke void @_ZNSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EE9push_backEOS3_(ptr noundef nonnull align 8 dereferenceable(24) %13, ptr noundef nonnull align 8 dereferenceable(16) %298)
          to label %338 unwind label %.loopexit.split-lp

299:                                              ; preds = %271
  %300 = landingpad { ptr, i32 }
          cleanup
  br label %340

.lr.ph208:                                        ; preds = %294, %334
  %301 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt10shared_ptrIN6qtorch4WireEESt6vectorIS4_SaIS4_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %39) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %41) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %42) #4
  %302 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch4WireELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %301) #4
  call void @_ZN6qtorch4Wire8GetNodeAEv(ptr dead_on_unwind nonnull writable sret(%"class.std::weak_ptr") align 8 %42, ptr noundef nonnull align 8 dereferenceable(44) %302)
  call void @_ZNKSt8weak_ptrIN6qtorch4NodeEE4lockEv(ptr dead_on_unwind nonnull writable sret(%"class.std::shared_ptr") align 8 %41, ptr noundef nonnull align 8 dereferenceable(16) %42) #4
  %303 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %41) #4
  %304 = getelementptr inbounds i8, ptr %303, i64 32
  %305 = load i8, ptr %304, align 8, !tbaa !29, !range !30, !noundef !31
  %306 = trunc nuw i8 %305 to i1
  br i1 %306, label %.critedge162, label %.critedge186

.critedge162:                                     ; preds = %.lr.ph208
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %43) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %44) #4
  %307 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch4WireELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %301) #4
  call void @_ZN6qtorch4Wire8GetNodeBEv(ptr dead_on_unwind nonnull writable sret(%"class.std::weak_ptr") align 8 %44, ptr noundef nonnull align 8 dereferenceable(44) %307)
  call void @_ZNKSt8weak_ptrIN6qtorch4NodeEE4lockEv(ptr dead_on_unwind nonnull writable sret(%"class.std::shared_ptr") align 8 %43, ptr noundef nonnull align 8 dereferenceable(16) %44) #4
  %308 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %43) #4
  %309 = getelementptr inbounds i8, ptr %308, i64 32
  %310 = load i8, ptr %309, align 8, !tbaa !29, !range !30, !noundef !31
  %311 = trunc nuw i8 %310 to i1
  call void @_ZNSt12__shared_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %43) #4
  call void @_ZNSt10__weak_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %44) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %44) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %43) #4
  call void @_ZNSt12__shared_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %41) #4
  call void @_ZNSt10__weak_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %42) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %42) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %41) #4
  br i1 %311, label %334, label %312

.critedge186:                                     ; preds = %.lr.ph208
  call void @_ZNSt12__shared_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %41) #4
  call void @_ZNSt10__weak_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %42) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %42) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %41) #4
  br label %312

312:                                              ; preds = %.critedge186, %.critedge162
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %45) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %46) #4
  %313 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch4WireELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %301) #4
  call void @_ZN6qtorch4Wire8GetNodeAEv(ptr dead_on_unwind nonnull writable sret(%"class.std::weak_ptr") align 8 %46, ptr noundef nonnull align 8 dereferenceable(44) %313)
  call void @_ZNKSt8weak_ptrIN6qtorch4NodeEE4lockEv(ptr dead_on_unwind nonnull writable sret(%"class.std::shared_ptr") align 8 %45, ptr noundef nonnull align 8 dereferenceable(16) %46) #4
  %314 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %45) #4
  %315 = getelementptr inbounds i8, ptr %314, i64 32
  %316 = load i8, ptr %315, align 8, !tbaa !29, !range !30, !noundef !31
  %317 = trunc nuw i8 %316 to i1
  call void @_ZNSt12__shared_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %45) #4
  call void @_ZNSt10__weak_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %46) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %46) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %45) #4
  br i1 %317, label %318, label %326

318:                                              ; preds = %312
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %47) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %48) #4
  %319 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch4WireELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %301) #4
  call void @_ZN6qtorch4Wire8GetNodeBEv(ptr dead_on_unwind nonnull writable sret(%"class.std::weak_ptr") align 8 %48, ptr noundef nonnull align 8 dereferenceable(44) %319)
  call void @_ZNKSt8weak_ptrIN6qtorch4NodeEE4lockEv(ptr dead_on_unwind nonnull writable sret(%"class.std::shared_ptr") align 8 %47, ptr noundef nonnull align 8 dereferenceable(16) %48) #4
  %320 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %47) #4
  %321 = getelementptr inbounds i8, ptr %320, i64 32
  store i8 1, ptr %321, align 8, !tbaa !29
  call void @_ZNSt12__shared_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %47) #4
  call void @_ZNSt10__weak_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %48) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %48) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %47) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %49) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %50) #4
  %322 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch4WireELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %301) #4
  call void @_ZN6qtorch4Wire8GetNodeBEv(ptr dead_on_unwind nonnull writable sret(%"class.std::weak_ptr") align 8 %50, ptr noundef nonnull align 8 dereferenceable(44) %322)
  call void @_ZNKSt8weak_ptrIN6qtorch4NodeEE4lockEv(ptr dead_on_unwind nonnull writable sret(%"class.std::shared_ptr") align 8 %49, ptr noundef nonnull align 8 dereferenceable(16) %50) #4
  invoke void @_ZNSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EE9push_backEOS3_(ptr noundef nonnull align 8 dereferenceable(24) %14, ptr noundef nonnull align 8 dereferenceable(16) %49)
          to label %323 unwind label %324

323:                                              ; preds = %318
  call void @_ZNSt12__shared_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %49) #4
  call void @_ZNSt10__weak_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %50) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %50) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %49) #4
  br label %334

324:                                              ; preds = %318
  %325 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt12__shared_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %49) #4
  call void @_ZNSt10__weak_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %50) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %50) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %49) #4
  br label %337

326:                                              ; preds = %312
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %51) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %52) #4
  %327 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch4WireELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %301) #4
  call void @_ZN6qtorch4Wire8GetNodeAEv(ptr dead_on_unwind nonnull writable sret(%"class.std::weak_ptr") align 8 %52, ptr noundef nonnull align 8 dereferenceable(44) %327)
  call void @_ZNKSt8weak_ptrIN6qtorch4NodeEE4lockEv(ptr dead_on_unwind nonnull writable sret(%"class.std::shared_ptr") align 8 %51, ptr noundef nonnull align 8 dereferenceable(16) %52) #4
  %328 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %51) #4
  %329 = getelementptr inbounds i8, ptr %328, i64 32
  store i8 1, ptr %329, align 8, !tbaa !29
  call void @_ZNSt12__shared_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %51) #4
  call void @_ZNSt10__weak_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %52) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %52) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %51) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %53) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %54) #4
  %330 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch4WireELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %301) #4
  call void @_ZN6qtorch4Wire8GetNodeAEv(ptr dead_on_unwind nonnull writable sret(%"class.std::weak_ptr") align 8 %54, ptr noundef nonnull align 8 dereferenceable(44) %330)
  call void @_ZNKSt8weak_ptrIN6qtorch4NodeEE4lockEv(ptr dead_on_unwind nonnull writable sret(%"class.std::shared_ptr") align 8 %53, ptr noundef nonnull align 8 dereferenceable(16) %54) #4
  invoke void @_ZNSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EE9push_backEOS3_(ptr noundef nonnull align 8 dereferenceable(24) %14, ptr noundef nonnull align 8 dereferenceable(16) %53)
          to label %331 unwind label %332

331:                                              ; preds = %326
  call void @_ZNSt12__shared_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %53) #4
  call void @_ZNSt10__weak_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %54) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %54) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %53) #4
  br label %334

332:                                              ; preds = %326
  %333 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt12__shared_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %53) #4
  call void @_ZNSt10__weak_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %54) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %54) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %53) #4
  br label %337

334:                                              ; preds = %323, %331, %.critedge162
  %335 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt10shared_ptrIN6qtorch4WireEESt6vectorIS4_SaIS4_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %39) #4
  %336 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt10shared_ptrIN6qtorch4WireEESt6vectorIS4_SaIS4_EEEEbRKNS_17__normal_iteratorIT_T0_EESE_(ptr noundef nonnull align 8 dereferenceable(8) %39, ptr noundef nonnull align 8 dereferenceable(8) %40) #4
  br i1 %336, label %.lr.ph208, label %._crit_edge209

337:                                              ; preds = %332, %324
  %.pn143 = phi { ptr, i32 } [ %325, %324 ], [ %333, %332 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %40) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %39) #4
  br label %340

338:                                              ; preds = %260, %._crit_edge209
  %.1124.ph = phi i32 [ 0, %._crit_edge209 ], [ %261, %260 ]
  %.1122.ph = phi i32 [ %.0121212, %._crit_edge209 ], [ %262, %260 ]
  %.1119.ph = phi i32 [ %290, %._crit_edge209 ], [ %.0118213, %260 ]
  %.1116.ph = phi i64 [ %283, %._crit_edge209 ], [ %.0115214, %260 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %35) #4
  %339 = add nsw i32 %.1122.ph, 1
  %.not149 = icmp slt i32 %339, %1
  br i1 %.not149, label %227, label %.thread180, !llvm.loop !34

340:                                              ; preds = %.loopexit, %.loopexit.split-lp, %267, %337, %299, %241
  %.pn146.pn = phi { ptr, i32 } [ %242, %241 ], [ %.pn135, %267 ], [ %.pn143, %337 ], [ %300, %299 ], [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %35) #4
  br label %361

341:                                              ; preds = %._crit_edge234
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %35) #4
  br label %.thread177

.thread180:                                       ; preds = %338, %._crit_edge206
  %.0115.lcssa = phi i64 [ %136, %._crit_edge206 ], [ %.1116.ph, %338 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %55) #4
  %342 = call ptr @_ZNSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %13) #4
  store ptr %342, ptr %55, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %56) #4
  %343 = call ptr @_ZNSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %13) #4
  store ptr %343, ptr %56, align 8
  %344 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt10shared_ptrIN6qtorch4NodeEESt6vectorIS4_SaIS4_EEEEbRKNS_17__normal_iteratorIT_T0_EESE_(ptr noundef nonnull align 8 dereferenceable(8) %55, ptr noundef nonnull align 8 dereferenceable(8) %56) #4
  br i1 %344, label %.lr.ph217, label %._crit_edge218

._crit_edge218:                                   ; preds = %.lr.ph217, %.thread180
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %56) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %55) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %57) #4
  %345 = call ptr @_ZNSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %14) #4
  store ptr %345, ptr %57, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %58) #4
  %346 = call ptr @_ZNSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %14) #4
  store ptr %346, ptr %58, align 8
  %347 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt10shared_ptrIN6qtorch4NodeEESt6vectorIS4_SaIS4_EEEEbRKNS_17__normal_iteratorIT_T0_EESE_(ptr noundef nonnull align 8 dereferenceable(8) %57, ptr noundef nonnull align 8 dereferenceable(8) %58) #4
  br i1 %347, label %.lr.ph220, label %._crit_edge221

.lr.ph217:                                        ; preds = %.thread180, %.lr.ph217
  %348 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt10shared_ptrIN6qtorch4NodeEESt6vectorIS4_SaIS4_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %55) #4
  %349 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %348) #4
  %350 = getelementptr inbounds i8, ptr %349, i64 32
  store i8 0, ptr %350, align 8, !tbaa !29
  %351 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt10shared_ptrIN6qtorch4NodeEESt6vectorIS4_SaIS4_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %55) #4
  %352 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt10shared_ptrIN6qtorch4NodeEESt6vectorIS4_SaIS4_EEEEbRKNS_17__normal_iteratorIT_T0_EESE_(ptr noundef nonnull align 8 dereferenceable(8) %55, ptr noundef nonnull align 8 dereferenceable(8) %56) #4
  br i1 %352, label %.lr.ph217, label %._crit_edge218

._crit_edge221:                                   ; preds = %358, %._crit_edge218
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %58) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %57) #4
  br label %.thread177

.lr.ph220:                                        ; preds = %._crit_edge218, %358
  %353 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt10shared_ptrIN6qtorch4NodeEESt6vectorIS4_SaIS4_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %57) #4
  %354 = call noundef zeroext i1 @_ZStneIN6qtorch4NodeEEbRKSt10shared_ptrIT_EDn(ptr noundef nonnull align 8 dereferenceable(16) %353, ptr null) #4
  br i1 %354, label %355, label %358

355:                                              ; preds = %.lr.ph220
  %356 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %353) #4
  %357 = getelementptr inbounds i8, ptr %356, i64 32
  store i8 0, ptr %357, align 8, !tbaa !29
  br label %358

358:                                              ; preds = %355, %.lr.ph220
  %359 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt10shared_ptrIN6qtorch4NodeEESt6vectorIS4_SaIS4_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %57) #4
  %360 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt10shared_ptrIN6qtorch4NodeEESt6vectorIS4_SaIS4_EEEEbRKNS_17__normal_iteratorIT_T0_EESE_(ptr noundef nonnull align 8 dereferenceable(8) %57, ptr noundef nonnull align 8 dereferenceable(8) %58) #4
  br i1 %360, label %.lr.ph220, label %._crit_edge221

.thread177:                                       ; preds = %227, %341, %._crit_edge221
  %.3 = phi i64 [ %.0115.lcssa, %._crit_edge221 ], [ -1, %341 ], [ %.0115214, %227 ]
  call void @_ZNSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %14) #4
  call void @_ZNSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %13) #4
  br label %362

361:                                              ; preds = %176, %226, %340, %174
  %.pn150.pn.pn.pn = phi { ptr, i32 } [ %175, %174 ], [ %.pn150.pn, %226 ], [ %.pn146.pn, %340 ], [ %177, %176 ]
  call void @_ZNSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %14) #4
  call void @_ZNSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %13) #4
  br label %363

.critedge184:                                     ; preds = %94
  call void @_ZNSt12__shared_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %10) #4
  call void @_ZNSt12__shared_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %9) #4
  br label %362

362:                                              ; preds = %.critedge184, %.critedge, %.thread177, %83
  %.4 = phi i64 [ %86, %83 ], [ %.3, %.thread177 ], [ -1, %.critedge ], [ -1, %.critedge184 ]
  ret i64 %.4

363:                                              ; preds = %361, %111, %87
  %.pn155 = phi { ptr, i32 } [ %88, %87 ], [ %.pn150.pn.pn.pn, %361 ], [ %.pn, %111 ]
  resume { ptr, i32 } %.pn155
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZSteqIN6qtorch4NodeEEbRKSt10shared_ptrIT_EDn(ptr noundef nonnull align 8 dereferenceable(16), ptr) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN6qtorch16ContractionTools37NumberOfConnectedBetweenTwoSuperNodesERKSt6vectorISt10shared_ptrINS_4NodeEESaIS4_EES8_(ptr noundef nonnull align 8 dereferenceable(10128), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #2 align 2

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

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

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

declare double @exp2(double) local_unnamed_addr

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 = { 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 #3 = { 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 #4 = { 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, !7, i64 8}
!6 = !{!"_ZTSN6qtorch4NodeE", !7, i64 8, !7, i64 12, !7, i64 16, !10, i64 20, !11, i64 24, !10, i64 32, !12, i64 40, !17, i64 64, !21, i64 88, !25, i64 112, !26, i64 120}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"bool", !8, i64 0}
!11 = !{!"_ZTSSt4pairIiiE", !7, i64 0, !7, i64 4}
!12 = !{!"_ZTSSt6vectorISt7complexIdESaIS1_EE", !13, i64 0}
!13 = !{!"_ZTSSt12_Vector_baseISt7complexIdESaIS1_EE", !14, i64 0}
!14 = !{!"_ZTSNSt12_Vector_baseISt7complexIdESaIS1_EE12_Vector_implE", !15, i64 0}
!15 = !{!"_ZTSNSt12_Vector_baseISt7complexIdESaIS1_EE17_Vector_impl_dataE", !16, i64 0, !16, i64 8, !16, i64 16}
!16 = !{!"any pointer", !8, i64 0}
!17 = !{!"_ZTSSt6vectorISt10shared_ptrIN6qtorch4WireEESaIS3_EE", !18, i64 0}
!18 = !{!"_ZTSSt12_Vector_baseISt10shared_ptrIN6qtorch4WireEESaIS3_EE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseISt10shared_ptrIN6qtorch4WireEESaIS3_EE12_Vector_implE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseISt10shared_ptrIN6qtorch4WireEESaIS3_EE17_Vector_impl_dataE", !16, i64 0, !16, i64 8, !16, i64 16}
!21 = !{!"_ZTSSt6vectorIiSaIiEE", !22, i64 0}
!22 = !{!"_ZTSSt12_Vector_baseIiSaIiEE", !23, i64 0}
!23 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE12_Vector_implE", !24, i64 0}
!24 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE17_Vector_impl_dataE", !16, i64 0, !16, i64 8, !16, i64 16}
!25 = !{!"_ZTSN6qtorch8GateTypeE", !8, i64 0}
!26 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !27, i64 0, !28, i64 8, !8, i64 16}
!27 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !16, i64 0}
!28 = !{!"long", !8, i64 0}
!29 = !{!6, !10, i64 32}
!30 = !{i8 0, i8 2}
!31 = !{}
!32 = distinct !{!32, !33}
!33 = !{!"llvm.loop.mustprogress"}
!34 = distinct !{!34, !33}


; Effective O3 passes: ConstraintEliminationPass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass