; 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::unordered_map.152" = type { %"class.std::_Hashtable.153" }
%"class.std::_Hashtable.153" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.std::__detail::_Hash_node_base" = type { ptr }
%"struct.std::__detail::_Prime_rehash_policy" = type { float, i64 }
%"struct.std::hash.157" = type { i8 }
%"struct.std::equal_to.160" = type { i8 }
%"class.std::allocator.172" = type { i8 }
%"class.std::basic_ofstream" = type { %"class.std::basic_ostream.base", %"class.std::basic_filebuf", %"class.std::basic_ios" }
%"class.std::basic_ostream.base" = type { ptr }
%"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.__gnu_cxx::__normal_iterator.151" = type { ptr }
%class.anon.177 = type { ptr, ptr }
%"class.__gnu_cxx::__normal_iterator.176" = type { ptr }
%"class.qtorch::Network" = type <{ %"class.std::vector.14", %"class.std::vector.4", %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string", %"class.std::complex", %"class.std::mutex", i32, i32, i8, i8, [6 x i8], %"class.std::vector.14", %"class.std::vector.19", %"class.std::vector.14", %"class.std::unordered_map", %"class.std::unordered_map", i64, i32, [4 x i8] }>
%"class.std::vector.4" = type { %"struct.std::_Vector_base.5" }
%"struct.std::_Vector_base.5" = type { %"struct.std::_Vector_base<std::shared_ptr<qtorch::Wire>, std::allocator<std::shared_ptr<qtorch::Wire>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::shared_ptr<qtorch::Wire>, std::allocator<std::shared_ptr<qtorch::Wire>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::shared_ptr<qtorch::Wire>, std::allocator<std::shared_ptr<qtorch::Wire>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::shared_ptr<qtorch::Wire>, std::allocator<std::shared_ptr<qtorch::Wire>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon.0 }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon.0 = type { i64, [8 x i8] }
%"class.std::complex" = type { { double, double } }
%"class.std::mutex" = type { %"class.std::__mutex_base" }
%"class.std::__mutex_base" = type { %union.pthread_mutex_t }
%"class.std::vector.19" = type { %"struct.std::_Vector_base.20" }
%"struct.std::_Vector_base.20" = type { %"struct.std::_Vector_base<std::vector<std::shared_ptr<qtorch::Node>>, std::allocator<std::vector<std::shared_ptr<qtorch::Node>>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<std::shared_ptr<qtorch::Node>>, std::allocator<std::vector<std::shared_ptr<qtorch::Node>>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<std::shared_ptr<qtorch::Node>>, std::allocator<std::vector<std::shared_ptr<qtorch::Node>>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<std::shared_ptr<qtorch::Node>>, std::allocator<std::vector<std::shared_ptr<qtorch::Node>>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.14" = type { %"struct.std::_Vector_base.15" }
%"struct.std::_Vector_base.15" = type { %"struct.std::_Vector_base<std::shared_ptr<qtorch::Node>, std::allocator<std::shared_ptr<qtorch::Node>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::shared_ptr<qtorch::Node>, std::allocator<std::shared_ptr<qtorch::Node>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::shared_ptr<qtorch::Node>, std::allocator<std::shared_ptr<qtorch::Node>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::shared_ptr<qtorch::Node>, std::allocator<std::shared_ptr<qtorch::Node>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::unordered_map" = type { %"class.std::_Hashtable" }
%"class.std::_Hashtable" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@_ZTIN6qtorch11InvalidFileE = external dso_local constant { ptr, ptr, ptr }, align 8
@.str.32 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.49 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.50 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.51 = external hidden unnamed_addr constant [3 x i8], align 1

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

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

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

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

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #5

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

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

; Function Attrs: mustprogress nounwind uwtable
declare noundef zeroext i1 @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE7is_openEv(ptr noundef nonnull align 8 dereferenceable(248)) #6 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248)) unnamed_addr #6 align 2

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

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

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

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK6qtorch7Network29OutputCircuitToTreewidthGraphERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(380) %0, ptr noundef nonnull align 8 dereferenceable(32) %1) #2 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca %"class.std::unordered_map.152", align 8
  %7 = alloca %"struct.std::hash.157", align 1
  %8 = alloca %"struct.std::equal_to.160", align 1
  %9 = alloca %"class.std::allocator.172", align 1
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca %"class.std::basic_ofstream", align 8
  %13 = alloca %"class.__gnu_cxx::__normal_iterator.151", align 8
  %14 = alloca %"class.__gnu_cxx::__normal_iterator.151", align 8
  %15 = alloca %class.anon.177, align 8
  %16 = alloca %class.anon.177, align 8
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca ptr, align 8
  %20 = alloca %"class.__gnu_cxx::__normal_iterator.176", align 8
  %21 = alloca %"class.__gnu_cxx::__normal_iterator.176", align 8
  %22 = alloca i32, align 4
  %23 = alloca ptr, align 8
  %24 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %25 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #8
  store i32 0, ptr %5, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 56, ptr %6) #8
  %26 = getelementptr inbounds %"class.qtorch::Network", ptr %25, i32 0, i32 13
  %27 = call noundef i64 @_ZNKSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %26) #8
  call void @llvm.lifetime.start.p0(i64 1, ptr %7) #8
  call void @llvm.lifetime.start.p0(i64 1, ptr %8) #8
  call void @llvm.lifetime.start.p0(i64 1, ptr %9) #8
  call void @_ZNSaISt4pairIKSt10shared_ptrIN6qtorch4NodeEEiEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #8
  invoke void @_ZNSt13unordered_mapISt10shared_ptrIN6qtorch4NodeEEiSt4hashIS3_ESt8equal_toIS3_ESaISt4pairIKS3_iEEEC2EmRKS5_RKS7_RKSB_(ptr noundef nonnull align 8 dereferenceable(56) %6, i64 noundef %27, ptr noundef nonnull align 1 dereferenceable(1) %7, ptr noundef nonnull align 1 dereferenceable(1) %8, ptr noundef nonnull align 1 dereferenceable(1) %9)
          to label %28 unwind label %39

28:                                               ; preds = %2
  call void @_ZNSt15__new_allocatorISt4pairIKSt10shared_ptrIN6qtorch4NodeEEiEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %7) #8
  call void @llvm.lifetime.start.p0(i64 512, ptr %12) #8
  %29 = load ptr, ptr %4, align 8, !tbaa !5
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1ERKNSt7__cxx1112basic_stringIcS1_SaIcEEESt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248) %12, ptr noundef nonnull align 8 dereferenceable(32) %29, i32 noundef 16)
          to label %30 unwind label %43

30:                                               ; preds = %28
  %31 = invoke noundef zeroext i1 @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE7is_openEv(ptr noundef nonnull align 8 dereferenceable(248) %12)
          to label %32 unwind label %47

32:                                               ; preds = %30
  br i1 %31, label %51, label %33

33:                                               ; preds = %32
  %34 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.49)
          to label %35 unwind label %47

35:                                               ; preds = %33
  %36 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %34, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %37 unwind label %47

37:                                               ; preds = %35
  %38 = call ptr @__cxa_allocate_exception(i64 8) #8
  call void @llvm.memset.p0.i64(ptr align 16 %38, i8 0, i64 8, i1 false)
  call void @_ZN6qtorch11InvalidFileC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %38) #8
  invoke void @__cxa_throw(ptr %38, ptr @_ZTIN6qtorch11InvalidFileE, ptr @_ZNSt9exceptionD2Ev) #9
          to label %195 unwind label %47

39:                                               ; preds = %2
  %40 = landingpad { ptr, i32 }
          cleanup
  %41 = extractvalue { ptr, i32 } %40, 0
  store ptr %41, ptr %10, align 8
  %42 = extractvalue { ptr, i32 } %40, 1
  store i32 %42, ptr %11, align 4
  call void @_ZNSt15__new_allocatorISt4pairIKSt10shared_ptrIN6qtorch4NodeEEiEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %7) #8
  br label %189

43:                                               ; preds = %28
  %44 = landingpad { ptr, i32 }
          cleanup
  %45 = extractvalue { ptr, i32 } %44, 0
  store ptr %45, ptr %10, align 8
  %46 = extractvalue { ptr, i32 } %44, 1
  store i32 %46, ptr %11, align 4
  br label %188

47:                                               ; preds = %58, %56, %53, %51, %37, %35, %33, %30
  %48 = landingpad { ptr, i32 }
          cleanup
  %49 = extractvalue { ptr, i32 } %48, 0
  store ptr %49, ptr %10, align 8
  %50 = extractvalue { ptr, i32 } %48, 1
  store i32 %50, ptr %11, align 4
  br label %187

51:                                               ; preds = %32
  %52 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef @.str.50)
          to label %53 unwind label %47

53:                                               ; preds = %51
  %54 = getelementptr inbounds %"class.qtorch::Network", ptr %25, i32 0, i32 2
  %55 = 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) %52, ptr noundef nonnull align 8 dereferenceable(32) %54)
          to label %56 unwind label %47

56:                                               ; preds = %53
  %57 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %55, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %58 unwind label %47

58:                                               ; preds = %56
  %59 = getelementptr inbounds %"class.qtorch::Network", ptr %25, i32 0, i32 13
  %60 = call ptr @_ZNKSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %59) #8
  %61 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.151", ptr %13, i32 0, i32 0
  store ptr %60, ptr %61, align 8
  %62 = getelementptr inbounds %"class.qtorch::Network", ptr %25, i32 0, i32 13
  %63 = call ptr @_ZNKSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %62) #8
  %64 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.151", ptr %14, i32 0, i32 0
  store ptr %63, ptr %64, align 8
  %65 = getelementptr inbounds %class.anon.177, ptr %15, i32 0, i32 0
  store ptr %5, ptr %65, align 8, !tbaa !5
  %66 = getelementptr inbounds %class.anon.177, ptr %15, i32 0, i32 1
  store ptr %6, ptr %66, align 8, !tbaa !5
  %67 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.151", ptr %13, i32 0, i32 0
  %68 = load ptr, ptr %67, align 8
  %69 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.151", ptr %14, i32 0, i32 0
  %70 = load ptr, ptr %69, align 8
  %71 = getelementptr inbounds { ptr, ptr }, ptr %15, i32 0, i32 0
  %72 = load ptr, ptr %71, align 8
  %73 = getelementptr inbounds { ptr, ptr }, ptr %15, i32 0, i32 1
  %74 = load ptr, ptr %73, align 8
  %75 = invoke { ptr, ptr } @"_ZSt8for_eachIN9__gnu_cxx17__normal_iteratorIPKSt10shared_ptrIN6qtorch4NodeEESt6vectorIS5_SaIS5_EEEEZNKS3_7Network29OutputCircuitToTreewidthGraphERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE3$_0ET0_T_SN_SM_"(ptr %68, ptr %70, ptr %72, ptr %74)
          to label %76 unwind label %47

76:                                               ; preds = %58
  %77 = getelementptr inbounds { ptr, ptr }, ptr %16, i32 0, i32 0
  %78 = extractvalue { ptr, ptr } %75, 0
  store ptr %78, ptr %77, align 8
  %79 = getelementptr inbounds { ptr, ptr }, ptr %16, i32 0, i32 1
  %80 = extractvalue { ptr, ptr } %75, 1
  store ptr %80, ptr %79, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #8
  store i32 0, ptr %17, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #8
  store i32 0, ptr %18, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #8
  %81 = getelementptr inbounds %"class.qtorch::Network", ptr %25, i32 0, i32 12
  store ptr %81, ptr %19, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #8
  %82 = load ptr, ptr %19, align 8, !tbaa !5
  %83 = call ptr @_ZNKSt6vectorIS_ISt10shared_ptrIN6qtorch4NodeEESaIS3_EESaIS5_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %82) #8
  %84 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.176", ptr %20, i32 0, i32 0
  store ptr %83, ptr %84, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #8
  %85 = load ptr, ptr %19, align 8, !tbaa !5
  %86 = call ptr @_ZNKSt6vectorIS_ISt10shared_ptrIN6qtorch4NodeEESaIS3_EESaIS5_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %85) #8
  %87 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.176", ptr %21, i32 0, i32 0
  store ptr %86, ptr %87, align 8
  br label %88

88:                                               ; preds = %184, %76
  %89 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS5_EES1_IS7_SaIS7_EEEEbRKNS_17__normal_iteratorIT_T0_EESH_(ptr noundef nonnull align 8 dereferenceable(8) %20, ptr noundef nonnull align 8 dereferenceable(8) %21) #8
  br i1 %89, label %91, label %90

90:                                               ; preds = %88
  store i32 2, ptr %22, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #8
  br label %186

91:                                               ; preds = %88
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #8
  %92 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS5_EES1_IS7_SaIS7_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %20) #8
  store ptr %92, ptr %23, align 8, !tbaa !5
  store i32 0, ptr %17, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #8
  store i32 0, ptr %24, align 4, !tbaa !9
  br label %93

93:                                               ; preds = %178, %91
  %94 = load i32, ptr %24, align 4, !tbaa !9
  %95 = sext i32 %94 to i64
  %96 = load ptr, ptr %23, align 8, !tbaa !5
  %97 = call noundef i64 @_ZNKSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %96) #8
  %98 = icmp ult i64 %95, %97
  br i1 %98, label %100, label %99

99:                                               ; preds = %93
  store i32 4, ptr %22, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #8
  br label %181

100:                                              ; preds = %93
  %101 = load i32, ptr %24, align 4, !tbaa !9
  %102 = icmp sgt i32 %101, 0
  br i1 %102, label %103, label %177

103:                                              ; preds = %100
  %104 = load ptr, ptr %23, align 8, !tbaa !5
  %105 = load i32, ptr %24, align 4, !tbaa !9
  %106 = sext i32 %105 to i64
  %107 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %104, i64 noundef %106) #8
  %108 = call noundef zeroext i1 @_ZStneIN6qtorch4NodeEEbRKSt10shared_ptrIT_EDn(ptr noundef nonnull align 8 dereferenceable(16) %107, ptr null) #8
  br i1 %108, label %109, label %177

109:                                              ; preds = %103
  %110 = load i32, ptr %24, align 4, !tbaa !9
  %111 = sext i32 %110 to i64
  %112 = load ptr, ptr %23, align 8, !tbaa !5
  %113 = call noundef i64 @_ZNKSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %112) #8
  %114 = sub i64 %113, 1
  %115 = icmp eq i64 %111, %114
  br i1 %115, label %116, label %123

116:                                              ; preds = %109
  %117 = load i32, ptr %18, align 4, !tbaa !9
  %118 = sext i32 %117 to i64
  %119 = getelementptr inbounds %"class.qtorch::Network", ptr %25, i32 0, i32 12
  %120 = call noundef i64 @_ZNKSt6vectorIS_ISt10shared_ptrIN6qtorch4NodeEESaIS3_EESaIS5_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %119) #8
  %121 = sub i64 %120, 1
  %122 = icmp eq i64 %118, %121
  br i1 %122, label %152, label %123

123:                                              ; preds = %116, %109
  %124 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef @.str.51)
          to label %125 unwind label %148

125:                                              ; preds = %123
  %126 = load ptr, ptr %23, align 8, !tbaa !5
  %127 = load i32, ptr %17, align 4, !tbaa !9
  %128 = sext i32 %127 to i64
  %129 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %126, i64 noundef %128) #8
  %130 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapISt10shared_ptrIN6qtorch4NodeEEiSt4hashIS3_ESt8equal_toIS3_ESaISt4pairIKS3_iEEEixERS9_(ptr noundef nonnull align 8 dereferenceable(56) %6, ptr noundef nonnull align 8 dereferenceable(16) %129)
          to label %131 unwind label %148

131:                                              ; preds = %125
  %132 = load i32, ptr %130, align 4, !tbaa !9
  %133 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %124, i32 noundef %132)
          to label %134 unwind label %148

134:                                              ; preds = %131
  %135 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %133, ptr noundef @.str.32)
          to label %136 unwind label %148

136:                                              ; preds = %134
  %137 = load ptr, ptr %23, align 8, !tbaa !5
  %138 = load i32, ptr %24, align 4, !tbaa !9
  %139 = sext i32 %138 to i64
  %140 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %137, i64 noundef %139) #8
  %141 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapISt10shared_ptrIN6qtorch4NodeEEiSt4hashIS3_ESt8equal_toIS3_ESaISt4pairIKS3_iEEEixERS9_(ptr noundef nonnull align 8 dereferenceable(56) %6, ptr noundef nonnull align 8 dereferenceable(16) %140)
          to label %142 unwind label %148

142:                                              ; preds = %136
  %143 = load i32, ptr %141, align 4, !tbaa !9
  %144 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %135, i32 noundef %143)
          to label %145 unwind label %148

145:                                              ; preds = %142
  %146 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %144, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %147 unwind label %148

147:                                              ; preds = %145
  br label %175

148:                                              ; preds = %171, %165, %163, %160, %154, %152, %145, %142, %136, %134, %131, %125, %123
  %149 = landingpad { ptr, i32 }
          cleanup
  %150 = extractvalue { ptr, i32 } %149, 0
  store ptr %150, ptr %10, align 8
  %151 = extractvalue { ptr, i32 } %149, 1
  store i32 %151, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #8
  br label %187

152:                                              ; preds = %116
  %153 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef @.str.51)
          to label %154 unwind label %148

154:                                              ; preds = %152
  %155 = load ptr, ptr %23, align 8, !tbaa !5
  %156 = load i32, ptr %17, align 4, !tbaa !9
  %157 = sext i32 %156 to i64
  %158 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %155, i64 noundef %157) #8
  %159 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapISt10shared_ptrIN6qtorch4NodeEEiSt4hashIS3_ESt8equal_toIS3_ESaISt4pairIKS3_iEEEixERS9_(ptr noundef nonnull align 8 dereferenceable(56) %6, ptr noundef nonnull align 8 dereferenceable(16) %158)
          to label %160 unwind label %148

160:                                              ; preds = %154
  %161 = load i32, ptr %159, align 4, !tbaa !9
  %162 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %153, i32 noundef %161)
          to label %163 unwind label %148

163:                                              ; preds = %160
  %164 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %162, ptr noundef @.str.32)
          to label %165 unwind label %148

165:                                              ; preds = %163
  %166 = load ptr, ptr %23, align 8, !tbaa !5
  %167 = load i32, ptr %24, align 4, !tbaa !9
  %168 = sext i32 %167 to i64
  %169 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %166, i64 noundef %168) #8
  %170 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapISt10shared_ptrIN6qtorch4NodeEEiSt4hashIS3_ESt8equal_toIS3_ESaISt4pairIKS3_iEEEixERS9_(ptr noundef nonnull align 8 dereferenceable(56) %6, ptr noundef nonnull align 8 dereferenceable(16) %169)
          to label %171 unwind label %148

171:                                              ; preds = %165
  %172 = load i32, ptr %170, align 4, !tbaa !9
  %173 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %164, i32 noundef %172)
          to label %174 unwind label %148

174:                                              ; preds = %171
  br label %175

175:                                              ; preds = %174, %147
  %176 = load i32, ptr %24, align 4, !tbaa !9
  store i32 %176, ptr %17, align 4, !tbaa !9
  br label %177

177:                                              ; preds = %175, %103, %100
  br label %178

178:                                              ; preds = %177
  %179 = load i32, ptr %24, align 4, !tbaa !9
  %180 = add nsw i32 %179, 1
  store i32 %180, ptr %24, align 4, !tbaa !9
  br label %93, !llvm.loop !11

181:                                              ; preds = %99
  %182 = load i32, ptr %18, align 4, !tbaa !9
  %183 = add nsw i32 %182, 1
  store i32 %183, ptr %18, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #8
  br label %184

184:                                              ; preds = %181
  %185 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPKSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS5_EES1_IS7_SaIS7_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %20) #8
  br label %88

186:                                              ; preds = %90
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #8
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248) %12) #8
  call void @llvm.lifetime.end.p0(i64 512, ptr %12) #8
  call void @_ZNSt13unordered_mapISt10shared_ptrIN6qtorch4NodeEEiSt4hashIS3_ESt8equal_toIS3_ESaISt4pairIKS3_iEEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %6) #8
  call void @llvm.lifetime.end.p0(i64 56, ptr %6) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #8
  ret void

187:                                              ; preds = %148, %47
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248) %12) #8
  br label %188

188:                                              ; preds = %187, %43
  call void @llvm.lifetime.end.p0(i64 512, ptr %12) #8
  call void @_ZNSt13unordered_mapISt10shared_ptrIN6qtorch4NodeEEiSt4hashIS3_ESt8equal_toIS3_ESaISt4pairIKS3_iEEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %6) #8
  br label %189

189:                                              ; preds = %188, %39
  call void @llvm.lifetime.end.p0(i64 56, ptr %6) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #8
  br label %190

190:                                              ; preds = %189
  %191 = load ptr, ptr %10, align 8
  %192 = load i32, ptr %11, align 4
  %193 = insertvalue { ptr, i32 } poison, ptr %191, 0
  %194 = insertvalue { ptr, i32 } %193, i32 %192, 1
  resume { ptr, i32 } %194

195:                                              ; preds = %37
  unreachable
}

; Function Attrs: mustprogress uwtable
declare hidden { ptr, ptr } @"_ZSt8for_eachIN9__gnu_cxx17__normal_iteratorIPKSt10shared_ptrIN6qtorch4NodeEESt6vectorIS5_SaIS5_EEEEZNKS3_7Network29OutputCircuitToTreewidthGraphERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE3$_0ET0_T_SN_SM_"(ptr, ptr, ptr, ptr) #2

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { mustprogress 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 #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, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}


; 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::unordered_map.152" = type { %"class.std::_Hashtable.153" }
%"class.std::_Hashtable.153" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.std::__detail::_Hash_node_base" = type { ptr }
%"struct.std::__detail::_Prime_rehash_policy" = type { float, i64 }
%"struct.std::hash.157" = type { i8 }
%"struct.std::equal_to.160" = type { i8 }
%"class.std::allocator.172" = type { i8 }
%"class.std::basic_ofstream" = type { %"class.std::basic_ostream.base", %"class.std::basic_filebuf", %"class.std::basic_ios" }
%"class.std::basic_ostream.base" = type { ptr }
%"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.__gnu_cxx::__normal_iterator.176" = type { ptr }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@_ZTIN6qtorch11InvalidFileE = external dso_local constant { ptr, ptr, ptr }, align 8
@.str.32 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.49 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.50 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.51 = external hidden unnamed_addr constant [3 x i8], align 1

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

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

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

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

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #4

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK6qtorch7Network29OutputCircuitToTreewidthGraphERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(380) %0, ptr noundef nonnull align 8 dereferenceable(32) %1) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca i32, align 4
  %4 = alloca %"class.std::unordered_map.152", align 8
  %5 = alloca %"struct.std::hash.157", align 1
  %6 = alloca %"struct.std::equal_to.160", align 1
  %7 = alloca %"class.std::allocator.172", align 1
  %8 = alloca %"class.std::basic_ofstream", align 8
  %9 = alloca %"class.__gnu_cxx::__normal_iterator.176", align 8
  %10 = alloca %"class.__gnu_cxx::__normal_iterator.176", align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #7
  store i32 0, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %4) #7
  %11 = getelementptr inbounds i8, ptr %0, i64 232
  %12 = tail call noundef i64 @_ZNKSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %5) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %6) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %7) #7
  call void @_ZNSaISt4pairIKSt10shared_ptrIN6qtorch4NodeEEiEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #7
  invoke void @_ZNSt13unordered_mapISt10shared_ptrIN6qtorch4NodeEEiSt4hashIS3_ESt8equal_toIS3_ESaISt4pairIKS3_iEEEC2EmRKS5_RKS7_RKSB_(ptr noundef nonnull align 8 dereferenceable(56) %4, i64 noundef %12, ptr noundef nonnull align 1 dereferenceable(1) %5, ptr noundef nonnull align 1 dereferenceable(1) %6, ptr noundef nonnull align 1 dereferenceable(1) %7)
          to label %13 unwind label %22

13:                                               ; preds = %2
  call void @_ZNSt15__new_allocatorISt4pairIKSt10shared_ptrIN6qtorch4NodeEEiEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #7
  call void @llvm.lifetime.start.p0(i64 512, ptr nonnull %8) #7
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1ERKNSt7__cxx1112basic_stringIcS1_SaIcEEESt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248) %8, ptr noundef nonnull align 8 dereferenceable(32) %1, i32 noundef 16)
          to label %14 unwind label %24

14:                                               ; preds = %13
  %15 = call noundef zeroext i1 @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE7is_openEv(ptr noundef nonnull align 8 dereferenceable(248) %8)
  br i1 %15, label %28, label %16

16:                                               ; preds = %14
  %17 = 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.49)
          to label %18 unwind label %26

18:                                               ; preds = %16
  %19 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %17, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %20 unwind label %26

20:                                               ; preds = %18
  %21 = call ptr @__cxa_allocate_exception(i64 8) #7
  store i64 0, ptr %21, align 16
  call void @_ZN6qtorch11InvalidFileC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %21) #7
  invoke void @__cxa_throw(ptr nonnull %21, ptr nonnull @_ZTIN6qtorch11InvalidFileE, ptr nonnull @_ZNSt9exceptionD2Ev) #8
          to label %104 unwind label %26

22:                                               ; preds = %2
  %23 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorISt4pairIKSt10shared_ptrIN6qtorch4NodeEEiEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #7
  br label %103

24:                                               ; preds = %13
  %25 = landingpad { ptr, i32 }
          cleanup
  br label %102

26:                                               ; preds = %35, %33, %30, %28, %20, %18, %16
  %27 = landingpad { ptr, i32 }
          cleanup
  br label %101

28:                                               ; preds = %14
  %29 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull @.str.50)
          to label %30 unwind label %26

30:                                               ; preds = %28
  %31 = getelementptr inbounds i8, ptr %0, i64 48
  %32 = 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) %29, ptr noundef nonnull align 8 dereferenceable(32) %31)
          to label %33 unwind label %26

33:                                               ; preds = %30
  %34 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %32, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %35 unwind label %26

35:                                               ; preds = %33
  %36 = call ptr @_ZNKSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #7
  %37 = call ptr @_ZNKSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #7
  %38 = invoke { ptr, ptr } @"_ZSt8for_eachIN9__gnu_cxx17__normal_iteratorIPKSt10shared_ptrIN6qtorch4NodeEESt6vectorIS5_SaIS5_EEEEZNKS3_7Network29OutputCircuitToTreewidthGraphERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE3$_0ET0_T_SN_SM_"(ptr %36, ptr %37, ptr nonnull %3, ptr nonnull %4)
          to label %39 unwind label %26

39:                                               ; preds = %35
  %40 = getelementptr inbounds i8, ptr %0, i64 208
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #7
  %41 = call ptr @_ZNKSt6vectorIS_ISt10shared_ptrIN6qtorch4NodeEESaIS3_EESaIS5_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %40) #7
  store ptr %41, ptr %9, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #7
  %42 = call ptr @_ZNKSt6vectorIS_ISt10shared_ptrIN6qtorch4NodeEESaIS3_EESaIS5_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %40) #7
  store ptr %42, ptr %10, align 8
  %43 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS5_EES1_IS7_SaIS7_EEEEbRKNS_17__normal_iteratorIT_T0_EESH_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %10) #7
  br i1 %43, label %.lr.ph42, label %._crit_edge43

._crit_edge43:                                    ; preds = %._crit_edge, %39
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #7
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248) %8) #7
  call void @llvm.lifetime.end.p0(i64 512, ptr nonnull %8) #7
  call void @_ZNSt13unordered_mapISt10shared_ptrIN6qtorch4NodeEEiSt4hashIS3_ESt8equal_toIS3_ESaISt4pairIKS3_iEEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %4) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #7
  ret void

.lr.ph42:                                         ; preds = %39, %._crit_edge
  %indvars.iv47 = phi i64 [ %indvars.iv.next48, %._crit_edge ], [ 0, %39 ]
  %44 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS5_EES1_IS7_SaIS7_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #7
  %45 = call noundef i64 @_ZNKSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %44) #7
  %.not44 = icmp eq i64 %45, 0
  br i1 %.not44, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph42
  %46 = call noundef i64 @_ZNKSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %44) #7
  %47 = icmp ugt i64 %46, 1
  br i1 %47, label %.peel.next, label %._crit_edge

._crit_edge:                                      ; preds = %98, %.lr.ph, %.lr.ph42
  %indvars.iv.next48 = add nuw nsw i64 %indvars.iv47, 1
  %48 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPKSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS5_EES1_IS7_SaIS7_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #7
  %49 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS5_EES1_IS7_SaIS7_EEEEbRKNS_17__normal_iteratorIT_T0_EESH_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %10) #7
  br i1 %49, label %.lr.ph42, label %._crit_edge43

.peel.next:                                       ; preds = %.lr.ph, %98
  %indvars.iv = phi i64 [ %indvars.iv.next, %98 ], [ 1, %.lr.ph ]
  %.03238 = phi i32 [ %.133, %98 ], [ 0, %.lr.ph ]
  %50 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %44, i64 noundef %indvars.iv) #7
  %51 = call noundef zeroext i1 @_ZStneIN6qtorch4NodeEEbRKSt10shared_ptrIT_EDn(ptr noundef nonnull align 8 dereferenceable(16) %50, ptr null) #7
  br i1 %51, label %52, label %98

52:                                               ; preds = %.peel.next
  %53 = call noundef i64 @_ZNKSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %44) #7
  %54 = add i64 %53, -1
  %55 = icmp eq i64 %54, %indvars.iv
  %56 = trunc nuw nsw i64 %indvars.iv to i32
  br i1 %55, label %57, label %61

57:                                               ; preds = %52
  %58 = call noundef i64 @_ZNKSt6vectorIS_ISt10shared_ptrIN6qtorch4NodeEESaIS3_EESaIS5_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %40) #7
  %59 = add i64 %58, -1
  %60 = icmp eq i64 %59, %indvars.iv47
  br i1 %60, label %81, label %61

61:                                               ; preds = %57, %52
  %62 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull @.str.51)
          to label %63 unwind label %80

63:                                               ; preds = %61
  %64 = zext nneg i32 %.03238 to i64
  %65 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %44, i64 noundef %64) #7
  %66 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapISt10shared_ptrIN6qtorch4NodeEEiSt4hashIS3_ESt8equal_toIS3_ESaISt4pairIKS3_iEEEixERS9_(ptr noundef nonnull align 8 dereferenceable(56) %4, ptr noundef nonnull align 8 dereferenceable(16) %65)
          to label %67 unwind label %80

67:                                               ; preds = %63
  %68 = load i32, ptr %66, align 4, !tbaa !5
  %69 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %62, i32 noundef %68)
          to label %70 unwind label %80

70:                                               ; preds = %67
  %71 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %69, ptr noundef nonnull @.str.32)
          to label %72 unwind label %80

72:                                               ; preds = %70
  %73 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %44, i64 noundef %indvars.iv) #7
  %74 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapISt10shared_ptrIN6qtorch4NodeEEiSt4hashIS3_ESt8equal_toIS3_ESaISt4pairIKS3_iEEEixERS9_(ptr noundef nonnull align 8 dereferenceable(56) %4, ptr noundef nonnull align 8 dereferenceable(16) %73)
          to label %75 unwind label %80

75:                                               ; preds = %72
  %76 = load i32, ptr %74, align 4, !tbaa !5
  %77 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %71, i32 noundef %76)
          to label %78 unwind label %80

78:                                               ; preds = %75
  %79 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %77, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %98 unwind label %80

80:                                               ; preds = %95, %92, %90, %87, %83, %81, %78, %75, %72, %70, %67, %63, %61
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #7
  br label %101

81:                                               ; preds = %57
  %82 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull @.str.51)
          to label %83 unwind label %80

83:                                               ; preds = %81
  %84 = zext nneg i32 %.03238 to i64
  %85 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %44, i64 noundef %84) #7
  %86 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapISt10shared_ptrIN6qtorch4NodeEEiSt4hashIS3_ESt8equal_toIS3_ESaISt4pairIKS3_iEEEixERS9_(ptr noundef nonnull align 8 dereferenceable(56) %4, ptr noundef nonnull align 8 dereferenceable(16) %85)
          to label %87 unwind label %80

87:                                               ; preds = %83
  %88 = load i32, ptr %86, align 4, !tbaa !5
  %89 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %82, i32 noundef %88)
          to label %90 unwind label %80

90:                                               ; preds = %87
  %91 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %89, ptr noundef nonnull @.str.32)
          to label %92 unwind label %80

92:                                               ; preds = %90
  %93 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %44, i64 noundef %indvars.iv) #7
  %94 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapISt10shared_ptrIN6qtorch4NodeEEiSt4hashIS3_ESt8equal_toIS3_ESaISt4pairIKS3_iEEEixERS9_(ptr noundef nonnull align 8 dereferenceable(56) %4, ptr noundef nonnull align 8 dereferenceable(16) %93)
          to label %95 unwind label %80

95:                                               ; preds = %92
  %96 = load i32, ptr %94, align 4, !tbaa !5
  %97 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %91, i32 noundef %96)
          to label %98 unwind label %80

98:                                               ; preds = %78, %95, %.peel.next
  %.133 = phi i32 [ %.03238, %.peel.next ], [ %56, %95 ], [ %56, %78 ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %99 = call noundef i64 @_ZNKSt6vectorISt10shared_ptrIN6qtorch4NodeEESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %44) #7
  %100 = icmp ugt i64 %99, %indvars.iv.next
  br i1 %100, label %.peel.next, label %._crit_edge, !llvm.loop !9

101:                                              ; preds = %80, %26
  %.pn = phi { ptr, i32 } [ %lpad.loopexit, %80 ], [ %27, %26 ]
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248) %8) #7
  br label %102

102:                                              ; preds = %101, %24
  %.pn.pn = phi { ptr, i32 } [ %.pn, %101 ], [ %25, %24 ]
  call void @llvm.lifetime.end.p0(i64 512, ptr nonnull %8) #7
  call void @_ZNSt13unordered_mapISt10shared_ptrIN6qtorch4NodeEEiSt4hashIS3_ESt8equal_toIS3_ESaISt4pairIKS3_iEEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %4) #7
  br label %103

103:                                              ; preds = %102, %22
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %102 ], [ %23, %22 ]
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #7
  resume { ptr, i32 } %.pn.pn.pn

104:                                              ; preds = %20
  unreachable
}

; Function Attrs: mustprogress uwtable
declare hidden { ptr, ptr } @"_ZSt8for_eachIN9__gnu_cxx17__normal_iteratorIPKSt10shared_ptrIN6qtorch4NodeEESt6vectorIS5_SaIS5_EEEEZNKS3_7Network29OutputCircuitToTreewidthGraphERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE3$_0ET0_T_SN_SM_"(ptr, ptr, ptr, ptr) local_unnamed_addr #2

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { "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 = { 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 #7 = { nounwind }
attributes #8 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10, !11}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!"llvm.loop.peeled.count", i32 1}


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