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

; 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::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = 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::shared_ptr.178" = type { %"class.std::__shared_ptr.179" }
%"class.std::__shared_ptr.179" = type { ptr, %"class.std::__shared_count" }
%"class.std::vector.118" = type { %"struct.std::_Vector_base.119" }
%"struct.std::_Vector_base.119" = type { %"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::basic_ifstream" = type { %"class.std::basic_istream.base", %"class.std::basic_filebuf", %"class.std::basic_ios" }
%"class.std::basic_istream.base" = type { ptr, i64 }
%"class.std::basic_filebuf" = type { %"class.std::basic_streambuf", %union.pthread_mutex_t, %"class.std::__basic_file", i32, %struct.__mbstate_t, %struct.__mbstate_t, %struct.__mbstate_t, ptr, i64, i8, i8, i8, i8, ptr, ptr, i8, ptr, ptr, i64, ptr, ptr }
%"class.std::basic_streambuf" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, %"class.std::locale" }
%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }
%"class.std::__basic_file" = type <{ ptr, i8, [7 x i8] }>
%struct.__mbstate_t = type { i32, %union.anon }
%union.anon = type { 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::__cxx11::basic_stringstream" = type { %"class.std::basic_iostream.base", %"class.std::__cxx11::basic_stringbuf", %"class.std::basic_ios" }
%"class.std::basic_iostream.base" = type { %"class.std::basic_istream.base", %"class.std::basic_ostream.base" }
%"class.std::basic_ostream.base" = type { ptr }
%"class.std::__cxx11::basic_stringbuf" = type { %"class.std::basic_streambuf", i32, %"class.std::__cxx11::basic_string" }
%"struct.std::pair" = type { i32, i32 }
%"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 }
%"class.std::allocator.11" = type { i8 }
%"class.__gnu_cxx::__normal_iterator.147" = type { ptr }
%class.anon.192 = type { ptr }
%"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::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::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" }
%"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 }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@_ZTIN6qtorch11InvalidFileE = external dso_local constant { ptr, ptr, ptr }, align 8
@_ZTIN6qtorch17InvalidFileFormatE = external dso_local constant { ptr, ptr, ptr }, align 8
@.str.81 = external hidden unnamed_addr constant [45 x i8], align 1
@_ZTIN6qtorch30InvalidUserContractionSequenceE = external dso_local constant { ptr, ptr, ptr }, align 8

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

; Function Attrs: mustprogress uwtable
declare void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1ERKNSt7__cxx1112basic_stringIcS1_SaIcEEESt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(256), ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) unnamed_addr #1 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #2

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #2

declare ptr @__cxa_allocate_exception(i64)

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3

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

declare void @__cxa_throw(ptr, ptr, ptr)

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

; Function Attrs: mustprogress uwtable
declare noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEE3eofEv(ptr noundef nonnull align 8 dereferenceable(264)) #1 align 2

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

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #5 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)) #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) #5 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 #5 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(16) ptr @_ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(32)) #2

; Function Attrs: mustprogress uwtable
declare void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEE5closeEv(ptr noundef nonnull align 8 dereferenceable(256)) #1 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(32)) #2

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEEntEv(ptr noundef nonnull align 8 dereferenceable(264)) #5 align 2

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) #7

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6qtorch16ContractionTools34ContractUserDefinedSequenceOfWiresERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr dead_on_unwind noalias writable sret(%"class.std::shared_ptr.178") align 8 %0, ptr noundef nonnull align 8 dereferenceable(10128) %1, ptr noundef nonnull align 8 dereferenceable(32) %2) #1 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca %"class.std::shared_ptr.178", align 8
  %8 = alloca %"class.std::shared_ptr.178", align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca %"class.std::vector.118", align 8
  %13 = alloca %"class.std::basic_ifstream", align 8
  %14 = alloca %"class.std::__cxx11::basic_string", align 8
  %15 = alloca %"class.std::__cxx11::basic_stringstream", align 8
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca %"struct.std::pair", align 4
  %19 = alloca %"class.std::vector.9", align 8
  %20 = alloca %"class.std::allocator.11", align 1
  %21 = alloca i32, align 4
  %22 = alloca %"class.__gnu_cxx::__normal_iterator.147", align 8
  %23 = alloca %"class.__gnu_cxx::__normal_iterator.147", align 8
  %24 = alloca %class.anon.192, align 8
  %25 = alloca i32, align 4
  %26 = alloca %"class.std::shared_ptr", align 8
  %27 = alloca %"class.std::shared_ptr", align 8
  %28 = alloca %"class.std::shared_ptr", align 8
  store ptr %0, ptr %4, align 8
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  %29 = load ptr, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %7) #9
  call void @_ZNSt10shared_ptrIN6qtorch7NetworkEEC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %7) #9
  %30 = getelementptr inbounds %"class.qtorch::ContractionTools", ptr %29, i32 0, i32 7
  %31 = load i8, ptr %30, align 8, !tbaa !9, !range !26, !noundef !27
  %32 = trunc i8 %31 to i1
  br i1 %32, label %45, label %33

33:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 16, ptr %8) #9
  %34 = getelementptr inbounds %"class.qtorch::ContractionTools", ptr %29, i32 0, i32 0
  %35 = getelementptr inbounds %"class.qtorch::ContractionTools", ptr %29, i32 0, i32 1
  invoke void @_ZSt11make_sharedIN6qtorch7NetworkEJRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_EESt10shared_ptrINSt9enable_ifIXntsr8is_arrayIT_EE5valueESB_E4typeEEDpOT0_(ptr dead_on_unwind writable sret(%"class.std::shared_ptr.178") align 8 %8, ptr noundef nonnull align 8 dereferenceable(32) %34, ptr noundef nonnull align 8 dereferenceable(32) %35)
          to label %36 unwind label %41

36:                                               ; preds = %33
  %37 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt10shared_ptrIN6qtorch7NetworkEEaSEOS2_(ptr noundef nonnull align 8 dereferenceable(16) %7, ptr noundef nonnull align 8 dereferenceable(16) %8) #9
  call void @_ZNSt12__shared_ptrIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %8) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #9
  %38 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %7) #9
  %39 = getelementptr inbounds %"class.qtorch::ContractionTools", ptr %29, i32 0, i32 8
  %40 = load i32, ptr %39, align 4, !tbaa !28
  call void @_ZN6qtorch7Network13SetNumThreadsEi(ptr noundef nonnull align 8 dereferenceable(380) %38, i32 noundef %40) #9
  br label %48

41:                                               ; preds = %33
  %42 = landingpad { ptr, i32 }
          cleanup
  %43 = extractvalue { ptr, i32 } %42, 0
  store ptr %43, ptr %9, align 8
  %44 = extractvalue { ptr, i32 } %42, 1
  store i32 %44, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #9
  br label %283

45:                                               ; preds = %3
  %46 = getelementptr inbounds %"class.qtorch::ContractionTools", ptr %29, i32 0, i32 5
  %47 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt10shared_ptrIN6qtorch7NetworkEEaSERKS2_(ptr noundef nonnull align 8 dereferenceable(16) %7, ptr noundef nonnull align 8 dereferenceable(16) %46) #9
  br label %48

48:                                               ; preds = %45, %36
  %49 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %7) #9
  %50 = call noundef zeroext i1 @_ZNK6qtorch7Network9HasFailedEv(ptr noundef nonnull align 8 dereferenceable(380) %49) #9
  br i1 %50, label %51, label %52

51:                                               ; preds = %48
  call void @_ZNSt10shared_ptrIN6qtorch7NetworkEEC2EDn(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr null) #9
  store i32 1, ptr %11, align 4
  br label %282

52:                                               ; preds = %48
  call void @llvm.lifetime.start.p0(i64 24, ptr %12) #9
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #9
  call void @llvm.lifetime.start.p0(i64 520, ptr %13) #9
  %53 = load ptr, ptr %6, align 8, !tbaa !5
  invoke void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1ERKNSt7__cxx1112basic_stringIcS1_SaIcEEESt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(256) %13, ptr noundef nonnull align 8 dereferenceable(32) %53, i32 noundef 8)
          to label %54 unwind label %63

54:                                               ; preds = %52
  %55 = load ptr, ptr %13, align 8, !tbaa !29
  %56 = getelementptr i8, ptr %55, i64 -24
  %57 = load i64, ptr %56, align 8
  %58 = getelementptr inbounds i8, ptr %13, i64 %57
  %59 = invoke noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEEntEv(ptr noundef nonnull align 8 dereferenceable(264) %58)
          to label %60 unwind label %67

60:                                               ; preds = %54
  br i1 %59, label %61, label %71

61:                                               ; preds = %60
  %62 = call ptr @__cxa_allocate_exception(i64 8) #9
  call void @llvm.memset.p0.i64(ptr align 16 %62, i8 0, i64 8, i1 false)
  call void @_ZN6qtorch11InvalidFileC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %62) #9
  invoke void @__cxa_throw(ptr %62, ptr @_ZTIN6qtorch11InvalidFileE, ptr @_ZNSt9exceptionD2Ev) #10
          to label %289 unwind label %67

63:                                               ; preds = %52
  %64 = landingpad { ptr, i32 }
          cleanup
  %65 = extractvalue { ptr, i32 } %64, 0
  store ptr %65, ptr %9, align 8
  %66 = extractvalue { ptr, i32 } %64, 1
  store i32 %66, ptr %10, align 4
  br label %281

67:                                               ; preds = %139, %72, %61, %54
  %68 = landingpad { ptr, i32 }
          cleanup
  %69 = extractvalue { ptr, i32 } %68, 0
  store ptr %69, ptr %9, align 8
  %70 = extractvalue { ptr, i32 } %68, 1
  store i32 %70, ptr %10, align 4
  br label %280

71:                                               ; preds = %60
  br label %72

72:                                               ; preds = %130, %71
  %73 = load ptr, ptr %13, align 8, !tbaa !29
  %74 = getelementptr i8, ptr %73, i64 -24
  %75 = load i64, ptr %74, align 8
  %76 = getelementptr inbounds i8, ptr %13, i64 %75
  %77 = invoke noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEE3eofEv(ptr noundef nonnull align 8 dereferenceable(264) %76)
          to label %78 unwind label %67

78:                                               ; preds = %72
  %79 = xor i1 %77, true
  br i1 %79, label %80, label %139

80:                                               ; preds = %78
  call void @llvm.lifetime.start.p0(i64 32, ptr %14) #9
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #9
  %81 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16) %13, ptr noundef nonnull align 8 dereferenceable(32) %14)
          to label %82 unwind label %112

82:                                               ; preds = %80
  call void @llvm.lifetime.start.p0(i64 392, ptr %15) #9
  invoke void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(128) %15)
          to label %83 unwind label %116

83:                                               ; preds = %82
  %84 = getelementptr inbounds i8, ptr %15, i64 16
  %85 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(8) %84, ptr noundef nonnull align 8 dereferenceable(32) %14)
          to label %86 unwind label %120

86:                                               ; preds = %83
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #9
  %87 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %15, ptr noundef nonnull align 4 dereferenceable(4) %16)
          to label %88 unwind label %124

88:                                               ; preds = %86
  %89 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %87, ptr noundef nonnull align 4 dereferenceable(4) %17)
          to label %90 unwind label %124

90:                                               ; preds = %88
  %91 = load i32, ptr %16, align 4, !tbaa !31
  %92 = icmp slt i32 %91, 0
  br i1 %92, label %110, label %93

93:                                               ; preds = %90
  %94 = load i32, ptr %16, align 4, !tbaa !31
  %95 = sext i32 %94 to i64
  %96 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %7) #9
  %97 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6qtorch7Network11GetAllNodesEv(ptr noundef nonnull align 8 dereferenceable(380) %96) #9
  %98 = call noundef i64 @_ZNKSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %97) #9
  %99 = icmp ugt i64 %95, %98
  br i1 %99, label %110, label %100

100:                                              ; preds = %93
  %101 = load i32, ptr %17, align 4, !tbaa !31
  %102 = icmp slt i32 %101, 0
  br i1 %102, label %110, label %103

103:                                              ; preds = %100
  %104 = load i32, ptr %17, align 4, !tbaa !31
  %105 = sext i32 %104 to i64
  %106 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %7) #9
  %107 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6qtorch7Network11GetAllNodesEv(ptr noundef nonnull align 8 dereferenceable(380) %106) #9
  %108 = call noundef i64 @_ZNKSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %107) #9
  %109 = icmp ugt i64 %105, %108
  br i1 %109, label %110, label %128

110:                                              ; preds = %103, %100, %93, %90
  %111 = call ptr @__cxa_allocate_exception(i64 8) #9
  call void @llvm.memset.p0.i64(ptr align 16 %111, i8 0, i64 8, i1 false)
  call void @_ZN6qtorch17InvalidFileFormatC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %111) #9
  invoke void @__cxa_throw(ptr %111, ptr @_ZTIN6qtorch17InvalidFileFormatE, ptr @_ZNSt9exceptionD2Ev) #10
          to label %289 unwind label %124

112:                                              ; preds = %80
  %113 = landingpad { ptr, i32 }
          cleanup
  %114 = extractvalue { ptr, i32 } %113, 0
  store ptr %114, ptr %9, align 8
  %115 = extractvalue { ptr, i32 } %113, 1
  store i32 %115, ptr %10, align 4
  br label %138

116:                                              ; preds = %82
  %117 = landingpad { ptr, i32 }
          cleanup
  %118 = extractvalue { ptr, i32 } %117, 0
  store ptr %118, ptr %9, align 8
  %119 = extractvalue { ptr, i32 } %117, 1
  store i32 %119, ptr %10, align 4
  br label %137

120:                                              ; preds = %83
  %121 = landingpad { ptr, i32 }
          cleanup
  %122 = extractvalue { ptr, i32 } %121, 0
  store ptr %122, ptr %9, align 8
  %123 = extractvalue { ptr, i32 } %121, 1
  store i32 %123, ptr %10, align 4
  br label %136

124:                                              ; preds = %110, %88, %86
  %125 = landingpad { ptr, i32 }
          cleanup
  %126 = extractvalue { ptr, i32 } %125, 0
  store ptr %126, ptr %9, align 8
  %127 = extractvalue { ptr, i32 } %125, 1
  store i32 %127, ptr %10, align 4
  br label %135

128:                                              ; preds = %103
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #9
  invoke void @_ZNSt4pairIiiEC2IRiS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %18, ptr noundef nonnull align 4 dereferenceable(4) %16, ptr noundef nonnull align 4 dereferenceable(4) %17)
          to label %129 unwind label %131

129:                                              ; preds = %128
  invoke void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %12, ptr noundef nonnull align 4 dereferenceable(8) %18)
          to label %130 unwind label %131

130:                                              ; preds = %129
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #9
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %15) #9
  call void @llvm.lifetime.end.p0(i64 392, ptr %15) #9
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %14) #9
  br label %72, !llvm.loop !32

131:                                              ; preds = %129, %128
  %132 = landingpad { ptr, i32 }
          cleanup
  %133 = extractvalue { ptr, i32 } %132, 0
  store ptr %133, ptr %9, align 8
  %134 = extractvalue { ptr, i32 } %132, 1
  store i32 %134, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #9
  br label %135

135:                                              ; preds = %131, %124
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #9
  br label %136

136:                                              ; preds = %135, %120
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %15) #9
  br label %137

137:                                              ; preds = %136, %116
  call void @llvm.lifetime.end.p0(i64 392, ptr %15) #9
  br label %138

138:                                              ; preds = %137, %112
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %14) #9
  br label %280

139:                                              ; preds = %78
  invoke void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEE5closeEv(ptr noundef nonnull align 8 dereferenceable(256) %13)
          to label %140 unwind label %67

140:                                              ; preds = %139
  call void @llvm.lifetime.start.p0(i64 24, ptr %19) #9
  %141 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %7) #9
  %142 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6qtorch7Network11GetAllNodesEv(ptr noundef nonnull align 8 dereferenceable(380) %141) #9
  %143 = call noundef i64 @_ZNKSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %142) #9
  call void @llvm.lifetime.start.p0(i64 1, ptr %20) #9
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %20) #9
  invoke void @_ZNSt6vectorIiSaIiEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %19, i64 noundef %143, ptr noundef nonnull align 1 dereferenceable(1) %20)
          to label %144 unwind label %163

144:                                              ; preds = %140
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %20) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %20) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #9
  store i32 0, ptr %21, align 4, !tbaa !31
  %145 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %19) #9
  %146 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.147", ptr %22, i32 0, i32 0
  store ptr %145, ptr %146, align 8
  %147 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %19) #9
  %148 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.147", ptr %23, i32 0, i32 0
  store ptr %147, ptr %148, align 8
  %149 = getelementptr inbounds %class.anon.192, ptr %24, i32 0, i32 0
  store ptr %21, ptr %149, align 8, !tbaa !5
  %150 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.147", ptr %22, i32 0, i32 0
  %151 = load ptr, ptr %150, align 8
  %152 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.147", ptr %23, i32 0, i32 0
  %153 = load ptr, ptr %152, align 8
  %154 = getelementptr inbounds %class.anon.192, ptr %24, i32 0, i32 0
  %155 = load ptr, ptr %154, align 8
  invoke void @"_ZSt8generateIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEZN6qtorch16ContractionTools34ContractUserDefinedSequenceOfWiresERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE3$_0EvT_SI_T0_"(ptr %151, ptr %153, ptr %155)
          to label %156 unwind label %167

156:                                              ; preds = %144
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #9
  store i32 0, ptr %25, align 4, !tbaa !31
  br label %157

157:                                              ; preds = %257, %156
  %158 = load i32, ptr %25, align 4, !tbaa !31
  %159 = sext i32 %158 to i64
  %160 = call noundef i64 @_ZNKSt6vectorISt4pairIiiESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %12) #9
  %161 = icmp ult i64 %159, %160
  br i1 %161, label %171, label %162

162:                                              ; preds = %157
  store i32 4, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #9
  br label %264

163:                                              ; preds = %140
  %164 = landingpad { ptr, i32 }
          cleanup
  %165 = extractvalue { ptr, i32 } %164, 0
  store ptr %165, ptr %9, align 8
  %166 = extractvalue { ptr, i32 } %164, 1
  store i32 %166, ptr %10, align 4
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %20) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %20) #9
  br label %279

167:                                              ; preds = %275, %273, %271, %144
  %168 = landingpad { ptr, i32 }
          cleanup
  %169 = extractvalue { ptr, i32 } %168, 0
  store ptr %169, ptr %9, align 8
  %170 = extractvalue { ptr, i32 } %168, 1
  store i32 %170, ptr %10, align 4
  br label %278

171:                                              ; preds = %157
  %172 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %7) #9
  %173 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6qtorch7Network11GetAllNodesEv(ptr noundef nonnull align 8 dereferenceable(380) %172) #9
  %174 = load i32, ptr %25, align 4, !tbaa !31
  %175 = sext i32 %174 to i64
  %176 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %175) #9
  %177 = getelementptr inbounds %"struct.std::pair", ptr %176, i32 0, i32 0
  %178 = load i32, ptr %177, align 4, !tbaa !34
  %179 = sext i32 %178 to i64
  %180 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %19, i64 noundef %179) #9
  %181 = load i32, ptr %180, align 4, !tbaa !31
  %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) %173, i64 noundef %182) #9
  %184 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %183) #9
  %185 = getelementptr inbounds %"class.qtorch::Node", ptr %184, i32 0, i32 4
  %186 = load i8, ptr %185, align 4, !tbaa !36, !range !26, !noundef !27
  %187 = trunc i8 %186 to i1
  br i1 %187, label %205, label %188

188:                                              ; preds = %171
  %189 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %7) #9
  %190 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6qtorch7Network11GetAllNodesEv(ptr noundef nonnull align 8 dereferenceable(380) %189) #9
  %191 = load i32, ptr %25, align 4, !tbaa !31
  %192 = sext i32 %191 to i64
  %193 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %192) #9
  %194 = getelementptr inbounds %"struct.std::pair", ptr %193, i32 0, i32 1
  %195 = load i32, ptr %194, align 4, !tbaa !51
  %196 = sext i32 %195 to i64
  %197 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %19, i64 noundef %196) #9
  %198 = load i32, ptr %197, align 4, !tbaa !31
  %199 = sext i32 %198 to i64
  %200 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %190, i64 noundef %199) #9
  %201 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %200) #9
  %202 = getelementptr inbounds %"class.qtorch::Node", ptr %201, i32 0, i32 4
  %203 = load i8, ptr %202, align 4, !tbaa !36, !range !26, !noundef !27
  %204 = trunc i8 %203 to i1
  br i1 %204, label %205, label %206

205:                                              ; preds = %188, %171
  br label %257

206:                                              ; preds = %188
  %207 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %7) #9
  %208 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %7) #9
  %209 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6qtorch7Network11GetAllNodesEv(ptr noundef nonnull align 8 dereferenceable(380) %208) #9
  %210 = load i32, ptr %25, align 4, !tbaa !31
  %211 = sext i32 %210 to i64
  %212 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %211) #9
  %213 = getelementptr inbounds %"struct.std::pair", ptr %212, i32 0, i32 0
  %214 = load i32, ptr %213, align 4, !tbaa !34
  %215 = sext i32 %214 to i64
  %216 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %19, i64 noundef %215) #9
  %217 = load i32, ptr %216, align 4, !tbaa !31
  %218 = sext i32 %217 to i64
  %219 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %209, i64 noundef %218) #9
  call void @_ZNSt10shared_ptrIN6qtorch4NodeEEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(16) %27, ptr noundef nonnull align 8 dereferenceable(16) %219) #9
  %220 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %7) #9
  %221 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6qtorch7Network11GetAllNodesEv(ptr noundef nonnull align 8 dereferenceable(380) %220) #9
  %222 = load i32, ptr %25, align 4, !tbaa !31
  %223 = sext i32 %222 to i64
  %224 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %223) #9
  %225 = getelementptr inbounds %"struct.std::pair", ptr %224, i32 0, i32 1
  %226 = load i32, ptr %225, align 4, !tbaa !51
  %227 = sext i32 %226 to i64
  %228 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %19, i64 noundef %227) #9
  %229 = load i32, ptr %228, align 4, !tbaa !31
  %230 = sext i32 %229 to i64
  %231 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %221, i64 noundef %230) #9
  call void @_ZNSt10shared_ptrIN6qtorch4NodeEEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(16) %28, ptr noundef nonnull align 8 dereferenceable(16) %231) #9
  invoke void @_ZN6qtorch7Network13ContractNodesESt10shared_ptrINS_4NodeEES3_i(ptr dead_on_unwind writable sret(%"class.std::shared_ptr") align 8 %26, ptr noundef nonnull align 8 dereferenceable(380) %207, ptr noundef %27, ptr noundef %28, i32 noundef 10000)
          to label %232 unwind label %260

232:                                              ; preds = %206
  call void @_ZNSt12__shared_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %26) #9
  call void @_ZNSt12__shared_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %28) #9
  call void @_ZNSt12__shared_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %27) #9
  %233 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %7) #9
  %234 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6qtorch7Network11GetAllNodesEv(ptr noundef nonnull align 8 dereferenceable(380) %233) #9
  %235 = call noundef i64 @_ZNKSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %234) #9
  %236 = sub i64 %235, 1
  %237 = trunc i64 %236 to i32
  %238 = load i32, ptr %25, align 4, !tbaa !31
  %239 = sext i32 %238 to i64
  %240 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %239) #9
  %241 = getelementptr inbounds %"struct.std::pair", ptr %240, i32 0, i32 0
  %242 = load i32, ptr %241, align 4, !tbaa !34
  %243 = sext i32 %242 to i64
  %244 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %19, i64 noundef %243) #9
  store i32 %237, ptr %244, align 4, !tbaa !31
  %245 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %7) #9
  %246 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6qtorch7Network11GetAllNodesEv(ptr noundef nonnull align 8 dereferenceable(380) %245) #9
  %247 = call noundef i64 @_ZNKSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %246) #9
  %248 = sub i64 %247, 1
  %249 = trunc i64 %248 to i32
  %250 = load i32, ptr %25, align 4, !tbaa !31
  %251 = sext i32 %250 to i64
  %252 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %251) #9
  %253 = getelementptr inbounds %"struct.std::pair", ptr %252, i32 0, i32 1
  %254 = load i32, ptr %253, align 4, !tbaa !51
  %255 = sext i32 %254 to i64
  %256 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %19, i64 noundef %255) #9
  store i32 %249, ptr %256, align 4, !tbaa !31
  br label %257

257:                                              ; preds = %232, %205
  %258 = load i32, ptr %25, align 4, !tbaa !31
  %259 = add nsw i32 %258, 1
  store i32 %259, ptr %25, align 4, !tbaa !31
  br label %157, !llvm.loop !52

260:                                              ; preds = %206
  %261 = landingpad { ptr, i32 }
          cleanup
  %262 = extractvalue { ptr, i32 } %261, 0
  store ptr %262, ptr %9, align 8
  %263 = extractvalue { ptr, i32 } %261, 1
  store i32 %263, ptr %10, align 4
  call void @_ZNSt12__shared_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %28) #9
  call void @_ZNSt12__shared_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %27) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #9
  br label %278

264:                                              ; preds = %162
  %265 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %7) #9
  %266 = call noundef zeroext i1 @_ZN6qtorch7Network6IsDoneEv(ptr noundef nonnull align 8 dereferenceable(380) %265) #9
  br i1 %266, label %267, label %271

267:                                              ; preds = %264
  %268 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %7) #9
  %269 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK6qtorch7Network13GetFinalValueEv(ptr noundef nonnull align 8 dereferenceable(380) %268) #9
  %270 = getelementptr inbounds %"class.qtorch::ContractionTools", ptr %29, i32 0, i32 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %270, ptr align 8 %269, i64 16, i1 false), !tbaa.struct !53
  br label %277

271:                                              ; preds = %264
  %272 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.81)
          to label %273 unwind label %167

273:                                              ; preds = %271
  %274 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %272, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %275 unwind label %167

275:                                              ; preds = %273
  %276 = call ptr @__cxa_allocate_exception(i64 8) #9
  call void @llvm.memset.p0.i64(ptr align 16 %276, i8 0, i64 8, i1 false)
  call void @_ZN6qtorch30InvalidUserContractionSequenceC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %276) #9
  invoke void @__cxa_throw(ptr %276, ptr @_ZTIN6qtorch30InvalidUserContractionSequenceE, ptr @_ZNSt9exceptionD2Ev) #10
          to label %289 unwind label %167

277:                                              ; preds = %267
  call void @_ZNSt10shared_ptrIN6qtorch7NetworkEEC2EOS2_(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr noundef nonnull align 8 dereferenceable(16) %7) #9
  store i32 1, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #9
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %19) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr %19) #9
  call void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(256) %13) #9
  call void @llvm.lifetime.end.p0(i64 520, ptr %13) #9
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #9
  br label %282

278:                                              ; preds = %260, %167
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #9
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %19) #9
  br label %279

279:                                              ; preds = %278, %163
  call void @llvm.lifetime.end.p0(i64 24, ptr %19) #9
  br label %280

280:                                              ; preds = %279, %138, %67
  call void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(256) %13) #9
  br label %281

281:                                              ; preds = %280, %63
  call void @llvm.lifetime.end.p0(i64 520, ptr %13) #9
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #9
  br label %283

282:                                              ; preds = %277, %51
  call void @_ZNSt12__shared_ptrIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %7) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %7) #9
  ret void

283:                                              ; preds = %281, %41
  call void @_ZNSt12__shared_ptrIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %7) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %7) #9
  br label %284

284:                                              ; preds = %283
  %285 = load ptr, ptr %9, align 8
  %286 = load i32, ptr %10, align 4
  %287 = insertvalue { ptr, i32 } poison, ptr %285, 0
  %288 = insertvalue { ptr, i32 } %287, i32 %286, 1
  resume { ptr, i32 } %288

289:                                              ; preds = %275, %110, %61
  unreachable
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt11make_sharedIN6qtorch7NetworkEJRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_EESt10shared_ptrINSt9enable_ifIXntsr8is_arrayIT_EE5valueESB_E4typeEEDpOT0_(ptr dead_on_unwind noalias writable sret(%"class.std::shared_ptr.178") align 8, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6qtorch7Network13SetNumThreadsEi(ptr noundef nonnull align 8 dereferenceable(380), i32 noundef) #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK6qtorch7Network9HasFailedEv(ptr noundef nonnull align 8 dereferenceable(380)) #5 align 2

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare hidden void @"_ZSt8generateIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEZN6qtorch16ContractionTools34ContractUserDefinedSequenceOfWiresERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE3$_0EvT_SI_T0_"(ptr, ptr, ptr) #1

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN6qtorch7Network6IsDoneEv(ptr noundef nonnull align 8 dereferenceable(380)) #5 align 2

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

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

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

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

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

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

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

!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, !24, i64 10120}
!10 = !{!"_ZTSN6qtorch16ContractionToolsE", !11, i64 0, !11, i64 32, !14, i64 64, !15, i64 80, !19, i64 104, !20, i64 5104, !23, i64 5120, !24, i64 10120, !25, i64 10124}
!11 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !12, i64 0, !13, i64 8, !7, i64 16}
!12 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!13 = !{!"long", !7, i64 0}
!14 = !{!"_ZTSSt7complexIdE", !7, i64 0}
!15 = !{!"_ZTSSt6vectorISt10shared_ptrIS_IS0_IN6qtorch4NodeEESaIS3_EEESaIS6_EE", !16, i64 0}
!16 = !{!"_ZTSSt12_Vector_baseISt10shared_ptrISt6vectorIS0_IN6qtorch4NodeEESaIS4_EEESaIS7_EE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseISt10shared_ptrISt6vectorIS0_IN6qtorch4NodeEESaIS4_EEESaIS7_EE12_Vector_implE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseISt10shared_ptrISt6vectorIS0_IN6qtorch4NodeEESaIS4_EEESaIS7_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!19 = !{!"_ZTSSt13random_device", !7, i64 0}
!20 = !{!"_ZTSSt10shared_ptrIN6qtorch7NetworkEE", !21, i64 0}
!21 = !{!"_ZTSSt12__shared_ptrIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2EE", !6, i64 0, !22, i64 8}
!22 = !{!"_ZTSSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EE", !6, i64 0}
!23 = !{!"_ZTSSt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EE", !7, i64 0, !13, i64 4992}
!24 = !{!"bool", !7, i64 0}
!25 = !{!"int", !7, i64 0}
!26 = !{i8 0, i8 2}
!27 = !{}
!28 = !{!10, !25, i64 10124}
!29 = !{!30, !30, i64 0}
!30 = !{!"vtable pointer", !8, i64 0}
!31 = !{!25, !25, i64 0}
!32 = distinct !{!32, !33}
!33 = !{!"llvm.loop.mustprogress"}
!34 = !{!35, !25, i64 0}
!35 = !{!"_ZTSSt4pairIiiE", !25, i64 0, !25, i64 4}
!36 = !{!37, !24, i64 20}
!37 = !{!"_ZTSN6qtorch4NodeE", !25, i64 8, !25, i64 12, !25, i64 16, !24, i64 20, !35, i64 24, !24, i64 32, !38, i64 40, !42, i64 64, !46, i64 88, !50, i64 112, !11, i64 120}
!38 = !{!"_ZTSSt6vectorISt7complexIdESaIS1_EE", !39, i64 0}
!39 = !{!"_ZTSSt12_Vector_baseISt7complexIdESaIS1_EE", !40, i64 0}
!40 = !{!"_ZTSNSt12_Vector_baseISt7complexIdESaIS1_EE12_Vector_implE", !41, i64 0}
!41 = !{!"_ZTSNSt12_Vector_baseISt7complexIdESaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!42 = !{!"_ZTSSt6vectorISt10shared_ptrIN6qtorch4WireEESaIS3_EE", !43, i64 0}
!43 = !{!"_ZTSSt12_Vector_baseISt10shared_ptrIN6qtorch4WireEESaIS3_EE", !44, i64 0}
!44 = !{!"_ZTSNSt12_Vector_baseISt10shared_ptrIN6qtorch4WireEESaIS3_EE12_Vector_implE", !45, i64 0}
!45 = !{!"_ZTSNSt12_Vector_baseISt10shared_ptrIN6qtorch4WireEESaIS3_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!46 = !{!"_ZTSSt6vectorIiSaIiEE", !47, i64 0}
!47 = !{!"_ZTSSt12_Vector_baseIiSaIiEE", !48, i64 0}
!48 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE12_Vector_implE", !49, i64 0}
!49 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!50 = !{!"_ZTSN6qtorch8GateTypeE", !7, i64 0}
!51 = !{!35, !25, i64 4}
!52 = distinct !{!52, !33}
!53 = !{i64 0, i64 16, !54}
!54 = !{!7, !7, i64 0}


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

%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = 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::shared_ptr.178" = type { %"class.std::__shared_ptr.179" }
%"class.std::__shared_ptr.179" = type { ptr, %"class.std::__shared_count" }
%"class.std::vector.118" = type { %"struct.std::_Vector_base.119" }
%"struct.std::_Vector_base.119" = type { %"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::basic_ifstream" = type { %"class.std::basic_istream.base", %"class.std::basic_filebuf", %"class.std::basic_ios" }
%"class.std::basic_istream.base" = type { ptr, i64 }
%"class.std::basic_filebuf" = type { %"class.std::basic_streambuf", %union.pthread_mutex_t, %"class.std::__basic_file", i32, %struct.__mbstate_t, %struct.__mbstate_t, %struct.__mbstate_t, ptr, i64, i8, i8, i8, i8, ptr, ptr, i8, ptr, ptr, i64, ptr, ptr }
%"class.std::basic_streambuf" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, %"class.std::locale" }
%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }
%"class.std::__basic_file" = type <{ ptr, i8, [7 x i8] }>
%struct.__mbstate_t = type { i32, %union.anon }
%union.anon = type { 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::__cxx11::basic_stringstream" = type { %"class.std::basic_iostream.base", %"class.std::__cxx11::basic_stringbuf", %"class.std::basic_ios" }
%"class.std::basic_iostream.base" = type { %"class.std::basic_istream.base", %"class.std::basic_ostream.base" }
%"class.std::basic_ostream.base" = type { ptr }
%"class.std::__cxx11::basic_stringbuf" = type { %"class.std::basic_streambuf", i32, %"class.std::__cxx11::basic_string" }
%"struct.std::pair" = type { i32, i32 }
%"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 }
%"class.std::allocator.11" = type { i8 }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@_ZTIN6qtorch11InvalidFileE = external dso_local constant { ptr, ptr, ptr }, align 8
@_ZTIN6qtorch17InvalidFileFormatE = external dso_local constant { ptr, ptr, ptr }, align 8
@.str.81 = external hidden unnamed_addr constant [45 x i8], align 1
@_ZTIN6qtorch30InvalidUserContractionSequenceE = external dso_local constant { ptr, ptr, ptr }, align 8

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

; Function Attrs: mustprogress uwtable
declare void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1ERKNSt7__cxx1112basic_stringIcS1_SaIcEEESt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(256), ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) unnamed_addr #1 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #2

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #2

declare ptr @__cxa_allocate_exception(i64) local_unnamed_addr

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

declare void @__cxa_throw(ptr, ptr, ptr) local_unnamed_addr

; 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 uwtable
declare noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEE3eofEv(ptr noundef nonnull align 8 dereferenceable(264)) local_unnamed_addr #1 align 2

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(256)) unnamed_addr #4 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #4 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 #4 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 #4 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 #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(16) ptr @_ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEE5closeEv(ptr noundef nonnull align 8 dereferenceable(256)) local_unnamed_addr #1 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #2

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

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

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

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

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

; 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 #4 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEEntEv(ptr noundef nonnull align 8 dereferenceable(264)) local_unnamed_addr #4 align 2

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #6

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128)) unnamed_addr #4 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6qtorch16ContractionTools34ContractUserDefinedSequenceOfWiresERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr dead_on_unwind noalias writable sret(%"class.std::shared_ptr.178") align 8 %0, ptr noundef nonnull align 8 dereferenceable(10128) %1, ptr noundef nonnull align 8 dereferenceable(32) %2) local_unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.std::shared_ptr.178", align 8
  %5 = alloca %"class.std::shared_ptr.178", align 8
  %6 = alloca %"class.std::vector.118", align 8
  %7 = alloca %"class.std::basic_ifstream", align 8
  %8 = alloca %"class.std::__cxx11::basic_string", align 8
  %9 = alloca %"class.std::__cxx11::basic_stringstream", align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca %"struct.std::pair", align 4
  %13 = alloca %"class.std::vector.9", align 8
  %14 = alloca %"class.std::allocator.11", align 1
  %15 = alloca i32, align 4
  %16 = alloca %"class.std::shared_ptr", align 8
  %17 = alloca %"class.std::shared_ptr", align 8
  %18 = alloca %"class.std::shared_ptr", align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #8
  call void @_ZNSt10shared_ptrIN6qtorch7NetworkEEC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %4) #8
  %19 = getelementptr inbounds i8, ptr %1, i64 10120
  %20 = load i8, ptr %19, align 8, !tbaa !5, !range !25, !noundef !26
  %21 = trunc nuw i8 %20 to i1
  br i1 %21, label %31, label %22

22:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #8
  %23 = getelementptr inbounds i8, ptr %1, i64 32
  invoke void @_ZSt11make_sharedIN6qtorch7NetworkEJRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_EESt10shared_ptrINSt9enable_ifIXntsr8is_arrayIT_EE5valueESB_E4typeEEDpOT0_(ptr dead_on_unwind nonnull writable sret(%"class.std::shared_ptr.178") align 8 %5, ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull align 8 dereferenceable(32) %23)
          to label %24 unwind label %29

24:                                               ; preds = %22
  %25 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt10shared_ptrIN6qtorch7NetworkEEaSEOS2_(ptr noundef nonnull align 8 dereferenceable(16) %4, ptr noundef nonnull align 8 dereferenceable(16) %5) #8
  call void @_ZNSt12__shared_ptrIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %5) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #8
  %26 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %4) #8
  %27 = getelementptr inbounds i8, ptr %1, i64 10124
  %28 = load i32, ptr %27, align 4, !tbaa !27
  call void @_ZN6qtorch7Network13SetNumThreadsEi(ptr noundef nonnull align 8 dereferenceable(380) %26, i32 noundef %28) #8
  br label %34

29:                                               ; preds = %22
  %30 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #8
  br label %203

31:                                               ; preds = %3
  %32 = getelementptr inbounds i8, ptr %1, i64 5104
  %33 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt10shared_ptrIN6qtorch7NetworkEEaSERKS2_(ptr noundef nonnull align 8 dereferenceable(16) %4, ptr noundef nonnull align 8 dereferenceable(16) %32) #8
  br label %34

34:                                               ; preds = %31, %24
  %35 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %4) #8
  %36 = call noundef zeroext i1 @_ZNK6qtorch7Network9HasFailedEv(ptr noundef nonnull align 8 dereferenceable(380) %35) #8
  br i1 %36, label %37, label %38

37:                                               ; preds = %34
  call void @_ZNSt10shared_ptrIN6qtorch7NetworkEEC2EDn(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr null) #8
  br label %202

38:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #8
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #8
  call void @llvm.lifetime.start.p0(i64 520, ptr nonnull %7) #8
  invoke void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1ERKNSt7__cxx1112basic_stringIcS1_SaIcEEESt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(256) %7, ptr noundef nonnull align 8 dereferenceable(32) %2, i32 noundef 8)
          to label %39 unwind label %48

39:                                               ; preds = %38
  %40 = load ptr, ptr %7, align 8, !tbaa !28
  %41 = getelementptr i8, ptr %40, i64 -24
  %42 = load i64, ptr %41, align 8
  %43 = getelementptr inbounds i8, ptr %7, i64 %42
  %44 = call noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEEntEv(ptr noundef nonnull align 8 dereferenceable(264) %43)
  br i1 %44, label %46, label %.preheader38

.preheader38:                                     ; preds = %39
  %45 = getelementptr inbounds i8, ptr %9, i64 16
  br label %50

46:                                               ; preds = %39
  %47 = call ptr @__cxa_allocate_exception(i64 8) #8
  store i64 0, ptr %47, align 16
  call void @_ZN6qtorch11InvalidFileC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %47) #8
  invoke void @__cxa_throw(ptr nonnull %47, ptr nonnull @_ZTIN6qtorch11InvalidFileE, ptr nonnull @_ZNSt9exceptionD2Ev) #9
          to label %204 unwind label %.loopexit.split-lp

48:                                               ; preds = %38
  %49 = landingpad { ptr, i32 }
          cleanup
  br label %201

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

.loopexit.split-lp:                               ; preds = %46, %99
  %lpad.loopexit.split-lp = landingpad { ptr, i32 }
          cleanup
  br label %200

50:                                               ; preds = %.preheader38, %92
  %51 = load ptr, ptr %7, align 8, !tbaa !28
  %52 = getelementptr i8, ptr %51, i64 -24
  %53 = load i64, ptr %52, align 8
  %54 = getelementptr inbounds i8, ptr %7, i64 %53
  %55 = invoke noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEE3eofEv(ptr noundef nonnull align 8 dereferenceable(264) %54)
          to label %56 unwind label %.loopexit

56:                                               ; preds = %50
  br i1 %55, label %99, label %57

57:                                               ; preds = %56
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %8) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #8
  %58 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16) %7, ptr noundef nonnull align 8 dereferenceable(32) %8)
          to label %59 unwind label %85

59:                                               ; preds = %57
  call void @llvm.lifetime.start.p0(i64 392, ptr nonnull %9) #8
  invoke void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(128) %9)
          to label %60 unwind label %87

60:                                               ; preds = %59
  %61 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(8) %45, ptr noundef nonnull align 8 dereferenceable(32) %8)
          to label %62 unwind label %89

62:                                               ; preds = %60
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #8
  %63 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef nonnull align 4 dereferenceable(4) %10)
          to label %64 unwind label %.loopexit39

64:                                               ; preds = %62
  %65 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %63, ptr noundef nonnull align 4 dereferenceable(4) %11)
          to label %66 unwind label %.loopexit39

66:                                               ; preds = %64
  %67 = load i32, ptr %10, align 4, !tbaa !30
  %68 = icmp slt i32 %67, 0
  br i1 %68, label %83, label %69

69:                                               ; preds = %66
  %70 = zext nneg i32 %67 to i64
  %71 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %4) #8
  %72 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6qtorch7Network11GetAllNodesEv(ptr noundef nonnull align 8 dereferenceable(380) %71) #8
  %73 = call noundef i64 @_ZNKSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %72) #8
  %74 = icmp ult i64 %73, %70
  %75 = load i32, ptr %11, align 4
  %76 = icmp slt i32 %75, 0
  %or.cond = select i1 %74, i1 true, i1 %76
  br i1 %or.cond, label %83, label %77

77:                                               ; preds = %69
  %78 = zext nneg i32 %75 to i64
  %79 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %4) #8
  %80 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6qtorch7Network11GetAllNodesEv(ptr noundef nonnull align 8 dereferenceable(380) %79) #8
  %81 = call noundef i64 @_ZNKSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %80) #8
  %82 = icmp ult i64 %81, %78
  br i1 %82, label %83, label %91

83:                                               ; preds = %77, %69, %66
  %84 = call ptr @__cxa_allocate_exception(i64 8) #8
  store i64 0, ptr %84, align 16
  call void @_ZN6qtorch17InvalidFileFormatC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %84) #8
  invoke void @__cxa_throw(ptr nonnull %84, ptr nonnull @_ZTIN6qtorch17InvalidFileFormatE, ptr nonnull @_ZNSt9exceptionD2Ev) #9
          to label %204 unwind label %.loopexit.split-lp40

85:                                               ; preds = %57
  %86 = landingpad { ptr, i32 }
          cleanup
  br label %98

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

89:                                               ; preds = %60
  %90 = landingpad { ptr, i32 }
          cleanup
  br label %96

.loopexit39:                                      ; preds = %62, %64
  %lpad.loopexit41 = landingpad { ptr, i32 }
          cleanup
  br label %95

.loopexit.split-lp40:                             ; preds = %83
  %lpad.loopexit.split-lp42 = landingpad { ptr, i32 }
          cleanup
  br label %95

91:                                               ; preds = %77
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #8
  call void @_ZNSt4pairIiiEC2IRiS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %12, ptr noundef nonnull align 4 dereferenceable(4) %10, ptr noundef nonnull align 4 dereferenceable(4) %11)
  invoke void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 4 dereferenceable(8) %12)
          to label %92 unwind label %93

92:                                               ; preds = %91
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #8
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %9) #8
  call void @llvm.lifetime.end.p0(i64 392, ptr nonnull %9) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #8
  br label %50, !llvm.loop !31

93:                                               ; preds = %91
  %94 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #8
  br label %95

95:                                               ; preds = %.loopexit39, %.loopexit.split-lp40, %93
  %.pn29 = phi { ptr, i32 } [ %94, %93 ], [ %lpad.loopexit41, %.loopexit39 ], [ %lpad.loopexit.split-lp42, %.loopexit.split-lp40 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #8
  br label %96

96:                                               ; preds = %95, %89
  %.pn29.pn = phi { ptr, i32 } [ %.pn29, %95 ], [ %90, %89 ]
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %9) #8
  br label %97

97:                                               ; preds = %96, %87
  %.pn29.pn.pn = phi { ptr, i32 } [ %.pn29.pn, %96 ], [ %88, %87 ]
  call void @llvm.lifetime.end.p0(i64 392, ptr nonnull %9) #8
  br label %98

98:                                               ; preds = %97, %85
  %.pn29.pn.pn.pn = phi { ptr, i32 } [ %.pn29.pn.pn, %97 ], [ %86, %85 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #8
  br label %200

99:                                               ; preds = %56
  invoke void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEE5closeEv(ptr noundef nonnull align 8 dereferenceable(256) %7)
          to label %100 unwind label %.loopexit.split-lp

100:                                              ; preds = %99
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %13) #8
  %101 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %4) #8
  %102 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6qtorch7Network11GetAllNodesEv(ptr noundef nonnull align 8 dereferenceable(380) %101) #8
  %103 = call noundef i64 @_ZNKSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %102) #8
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %14) #8
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #8
  invoke void @_ZNSt6vectorIiSaIiEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef %103, ptr noundef nonnull align 1 dereferenceable(1) %14)
          to label %104 unwind label %110

104:                                              ; preds = %100
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %14) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %15) #8
  store i32 0, ptr %15, align 4, !tbaa !30
  %105 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %13) #8
  %106 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %13) #8
  invoke void @"_ZSt8generateIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEZN6qtorch16ContractionTools34ContractUserDefinedSequenceOfWiresERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE3$_0EvT_SI_T0_"(ptr %105, ptr %106, ptr nonnull %15)
          to label %.preheader unwind label %112

.preheader:                                       ; preds = %104
  %107 = call noundef i64 @_ZNKSt6vectorISt4pairIiiESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #8
  %.not = icmp eq i64 %107, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %183, %.preheader
  %108 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %4) #8
  %109 = call noundef zeroext i1 @_ZN6qtorch7Network6IsDoneEv(ptr noundef nonnull align 8 dereferenceable(380) %108) #8
  br i1 %109, label %188, label %192

110:                                              ; preds = %100
  %111 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %14) #8
  br label %199

112:                                              ; preds = %196, %194, %192, %104
  %113 = landingpad { ptr, i32 }
          cleanup
  br label %198

.lr.ph:                                           ; preds = %.preheader, %183
  %indvars.iv = phi i64 [ %indvars.iv.next, %183 ], [ 0, %.preheader ]
  %114 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %4) #8
  %115 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6qtorch7Network11GetAllNodesEv(ptr noundef nonnull align 8 dereferenceable(380) %114) #8
  %116 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %indvars.iv) #8
  %117 = load i32, ptr %116, align 4, !tbaa !33
  %118 = sext i32 %117 to i64
  %119 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef %118) #8
  %120 = load i32, ptr %119, align 4, !tbaa !30
  %121 = sext i32 %120 to i64
  %122 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %115, i64 noundef %121) #8
  %123 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %122) #8
  %124 = getelementptr inbounds i8, ptr %123, i64 20
  %125 = load i8, ptr %124, align 4, !tbaa !35, !range !25, !noundef !26
  %126 = trunc nuw i8 %125 to i1
  br i1 %126, label %183, label %127

127:                                              ; preds = %.lr.ph
  %128 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %4) #8
  %129 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6qtorch7Network11GetAllNodesEv(ptr noundef nonnull align 8 dereferenceable(380) %128) #8
  %130 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %indvars.iv) #8
  %131 = getelementptr inbounds i8, ptr %130, i64 4
  %132 = load i32, ptr %131, align 4, !tbaa !50
  %133 = sext i32 %132 to i64
  %134 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef %133) #8
  %135 = load i32, ptr %134, align 4, !tbaa !30
  %136 = sext i32 %135 to i64
  %137 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %129, i64 noundef %136) #8
  %138 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %137) #8
  %139 = getelementptr inbounds i8, ptr %138, i64 20
  %140 = load i8, ptr %139, align 4, !tbaa !35, !range !25, !noundef !26
  %141 = trunc nuw i8 %140 to i1
  br i1 %141, label %183, label %142

142:                                              ; preds = %127
  %143 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %4) #8
  %144 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %4) #8
  %145 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6qtorch7Network11GetAllNodesEv(ptr noundef nonnull align 8 dereferenceable(380) %144) #8
  %146 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %indvars.iv) #8
  %147 = load i32, ptr %146, align 4, !tbaa !33
  %148 = sext i32 %147 to i64
  %149 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef %148) #8
  %150 = load i32, ptr %149, align 4, !tbaa !30
  %151 = sext i32 %150 to i64
  %152 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %145, i64 noundef %151) #8
  call void @_ZNSt10shared_ptrIN6qtorch4NodeEEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(16) %17, ptr noundef nonnull align 8 dereferenceable(16) %152) #8
  %153 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %4) #8
  %154 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6qtorch7Network11GetAllNodesEv(ptr noundef nonnull align 8 dereferenceable(380) %153) #8
  %155 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %indvars.iv) #8
  %156 = getelementptr inbounds i8, ptr %155, i64 4
  %157 = load i32, ptr %156, align 4, !tbaa !50
  %158 = sext i32 %157 to i64
  %159 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef %158) #8
  %160 = load i32, ptr %159, align 4, !tbaa !30
  %161 = sext i32 %160 to i64
  %162 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %154, i64 noundef %161) #8
  call void @_ZNSt10shared_ptrIN6qtorch4NodeEEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(16) %18, ptr noundef nonnull align 8 dereferenceable(16) %162) #8
  invoke void @_ZN6qtorch7Network13ContractNodesESt10shared_ptrINS_4NodeEES3_i(ptr dead_on_unwind nonnull writable sret(%"class.std::shared_ptr") align 8 %16, ptr noundef nonnull align 8 dereferenceable(380) %143, ptr noundef nonnull %17, ptr noundef nonnull %18, i32 noundef 10000)
          to label %163 unwind label %186

163:                                              ; preds = %142
  call void @_ZNSt12__shared_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %16) #8
  call void @_ZNSt12__shared_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %18) #8
  call void @_ZNSt12__shared_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %17) #8
  %164 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %4) #8
  %165 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6qtorch7Network11GetAllNodesEv(ptr noundef nonnull align 8 dereferenceable(380) %164) #8
  %166 = call noundef i64 @_ZNKSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %165) #8
  %167 = trunc i64 %166 to i32
  %168 = add i32 %167, -1
  %169 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %indvars.iv) #8
  %170 = load i32, ptr %169, align 4, !tbaa !33
  %171 = sext i32 %170 to i64
  %172 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef %171) #8
  store i32 %168, ptr %172, align 4, !tbaa !30
  %173 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %4) #8
  %174 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6qtorch7Network11GetAllNodesEv(ptr noundef nonnull align 8 dereferenceable(380) %173) #8
  %175 = call noundef i64 @_ZNKSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %174) #8
  %176 = trunc i64 %175 to i32
  %177 = add i32 %176, -1
  %178 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %indvars.iv) #8
  %179 = getelementptr inbounds i8, ptr %178, i64 4
  %180 = load i32, ptr %179, align 4, !tbaa !50
  %181 = sext i32 %180 to i64
  %182 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef %181) #8
  store i32 %177, ptr %182, align 4, !tbaa !30
  br label %183

183:                                              ; preds = %.lr.ph, %127, %163
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %184 = call noundef i64 @_ZNKSt6vectorISt4pairIiiESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #8
  %185 = icmp ugt i64 %184, %indvars.iv.next
  br i1 %185, label %.lr.ph, label %._crit_edge, !llvm.loop !51

186:                                              ; preds = %142
  %187 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt12__shared_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %18) #8
  call void @_ZNSt12__shared_ptrIN6qtorch4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %17) #8
  br label %198

188:                                              ; preds = %._crit_edge
  %189 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %4) #8
  %190 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK6qtorch7Network13GetFinalValueEv(ptr noundef nonnull align 8 dereferenceable(380) %189) #8
  %191 = getelementptr inbounds i8, ptr %1, i64 64
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %191, ptr noundef nonnull align 8 dereferenceable(16) %190, i64 16, i1 false), !tbaa.struct !52
  call void @_ZNSt10shared_ptrIN6qtorch7NetworkEEC2EOS2_(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr noundef nonnull align 8 dereferenceable(16) %4) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #8
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %13) #8
  call void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(256) %7) #8
  call void @llvm.lifetime.end.p0(i64 520, ptr nonnull %7) #8
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #8
  br label %202

192:                                              ; preds = %._crit_edge
  %193 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.81)
          to label %194 unwind label %112

194:                                              ; preds = %192
  %195 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %193, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %196 unwind label %112

196:                                              ; preds = %194
  %197 = call ptr @__cxa_allocate_exception(i64 8) #8
  store i64 0, ptr %197, align 16
  call void @_ZN6qtorch30InvalidUserContractionSequenceC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %197) #8
  invoke void @__cxa_throw(ptr nonnull %197, ptr nonnull @_ZTIN6qtorch30InvalidUserContractionSequenceE, ptr nonnull @_ZNSt9exceptionD2Ev) #9
          to label %204 unwind label %112

198:                                              ; preds = %186, %112
  %.pn = phi { ptr, i32 } [ %187, %186 ], [ %113, %112 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #8
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #8
  br label %199

199:                                              ; preds = %198, %110
  %.pn.pn = phi { ptr, i32 } [ %.pn, %198 ], [ %111, %110 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %13) #8
  br label %200

200:                                              ; preds = %.loopexit, %.loopexit.split-lp, %199, %98
  %.pn34 = phi { ptr, i32 } [ %.pn29.pn.pn.pn, %98 ], [ %.pn.pn, %199 ], [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ]
  call void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(256) %7) #8
  br label %201

201:                                              ; preds = %200, %48
  %.pn34.pn = phi { ptr, i32 } [ %.pn34, %200 ], [ %49, %48 ]
  call void @llvm.lifetime.end.p0(i64 520, ptr nonnull %7) #8
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #8
  br label %203

202:                                              ; preds = %188, %37
  call void @_ZNSt12__shared_ptrIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %4) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #8
  ret void

203:                                              ; preds = %201, %29
  %.pn34.pn.pn = phi { ptr, i32 } [ %.pn34.pn, %201 ], [ %30, %29 ]
  call void @_ZNSt12__shared_ptrIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %4) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #8
  resume { ptr, i32 } %.pn34.pn.pn

204:                                              ; preds = %196, %83, %46
  unreachable
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6qtorch7Network13SetNumThreadsEi(ptr noundef nonnull align 8 dereferenceable(380), i32 noundef) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK6qtorch7Network9HasFailedEv(ptr noundef nonnull align 8 dereferenceable(380)) local_unnamed_addr #4 align 2

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare hidden void @"_ZSt8generateIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEZN6qtorch16ContractionTools34ContractUserDefinedSequenceOfWiresERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE3$_0EvT_SI_T0_"(ptr, ptr, ptr) local_unnamed_addr #1

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN6qtorch7Network6IsDoneEv(ptr noundef nonnull align 8 dereferenceable(380)) local_unnamed_addr #4 align 2

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

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

; Function Attrs: nounwind
declare void @_ZNSt9exceptionD2Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #7

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

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

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

!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, !23, i64 10120}
!6 = !{!"_ZTSN6qtorch16ContractionToolsE", !7, i64 0, !7, i64 32, !13, i64 64, !14, i64 80, !18, i64 104, !19, i64 5104, !22, i64 5120, !23, i64 10120, !24, i64 10124}
!7 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !8, i64 0, !12, i64 8, !10, i64 16}
!8 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !9, i64 0}
!9 = !{!"any pointer", !10, i64 0}
!10 = !{!"omnipotent char", !11, i64 0}
!11 = !{!"Simple C++ TBAA"}
!12 = !{!"long", !10, i64 0}
!13 = !{!"_ZTSSt7complexIdE", !10, i64 0}
!14 = !{!"_ZTSSt6vectorISt10shared_ptrIS_IS0_IN6qtorch4NodeEESaIS3_EEESaIS6_EE", !15, i64 0}
!15 = !{!"_ZTSSt12_Vector_baseISt10shared_ptrISt6vectorIS0_IN6qtorch4NodeEESaIS4_EEESaIS7_EE", !16, i64 0}
!16 = !{!"_ZTSNSt12_Vector_baseISt10shared_ptrISt6vectorIS0_IN6qtorch4NodeEESaIS4_EEESaIS7_EE12_Vector_implE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseISt10shared_ptrISt6vectorIS0_IN6qtorch4NodeEESaIS4_EEESaIS7_EE17_Vector_impl_dataE", !9, i64 0, !9, i64 8, !9, i64 16}
!18 = !{!"_ZTSSt13random_device", !10, i64 0}
!19 = !{!"_ZTSSt10shared_ptrIN6qtorch7NetworkEE", !20, i64 0}
!20 = !{!"_ZTSSt12__shared_ptrIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2EE", !9, i64 0, !21, i64 8}
!21 = !{!"_ZTSSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EE", !9, i64 0}
!22 = !{!"_ZTSSt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EE", !10, i64 0, !12, i64 4992}
!23 = !{!"bool", !10, i64 0}
!24 = !{!"int", !10, i64 0}
!25 = !{i8 0, i8 2}
!26 = !{}
!27 = !{!6, !24, i64 10124}
!28 = !{!29, !29, i64 0}
!29 = !{!"vtable pointer", !11, i64 0}
!30 = !{!24, !24, i64 0}
!31 = distinct !{!31, !32}
!32 = !{!"llvm.loop.mustprogress"}
!33 = !{!34, !24, i64 0}
!34 = !{!"_ZTSSt4pairIiiE", !24, i64 0, !24, i64 4}
!35 = !{!36, !23, i64 20}
!36 = !{!"_ZTSN6qtorch4NodeE", !24, i64 8, !24, i64 12, !24, i64 16, !23, i64 20, !34, i64 24, !23, i64 32, !37, i64 40, !41, i64 64, !45, i64 88, !49, i64 112, !7, i64 120}
!37 = !{!"_ZTSSt6vectorISt7complexIdESaIS1_EE", !38, i64 0}
!38 = !{!"_ZTSSt12_Vector_baseISt7complexIdESaIS1_EE", !39, i64 0}
!39 = !{!"_ZTSNSt12_Vector_baseISt7complexIdESaIS1_EE12_Vector_implE", !40, i64 0}
!40 = !{!"_ZTSNSt12_Vector_baseISt7complexIdESaIS1_EE17_Vector_impl_dataE", !9, i64 0, !9, i64 8, !9, i64 16}
!41 = !{!"_ZTSSt6vectorISt10shared_ptrIN6qtorch4WireEESaIS3_EE", !42, i64 0}
!42 = !{!"_ZTSSt12_Vector_baseISt10shared_ptrIN6qtorch4WireEESaIS3_EE", !43, i64 0}
!43 = !{!"_ZTSNSt12_Vector_baseISt10shared_ptrIN6qtorch4WireEESaIS3_EE12_Vector_implE", !44, i64 0}
!44 = !{!"_ZTSNSt12_Vector_baseISt10shared_ptrIN6qtorch4WireEESaIS3_EE17_Vector_impl_dataE", !9, i64 0, !9, i64 8, !9, i64 16}
!45 = !{!"_ZTSSt6vectorIiSaIiEE", !46, i64 0}
!46 = !{!"_ZTSSt12_Vector_baseIiSaIiEE", !47, i64 0}
!47 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE12_Vector_implE", !48, i64 0}
!48 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE17_Vector_impl_dataE", !9, i64 0, !9, i64 8, !9, i64 16}
!49 = !{!"_ZTSN6qtorch8GateTypeE", !10, i64 0}
!50 = !{!34, !24, i64 4}
!51 = distinct !{!51, !32}
!52 = !{i64 0, i64 16, !53}
!53 = !{!10, !10, i64 0}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass