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

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::shared_ptr.178" = type { %"class.std::__shared_ptr.179" }
%"class.std::__shared_ptr.179" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = 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::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon.0 }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon.0 = type { i64, [8 x i8] }
%"class.std::complex" = type { { double, double } }
%"class.std::vector.186" = type { %"struct.std::_Vector_base.187" }
%"struct.std::_Vector_base.187" = type { %"struct.std::_Vector_base<std::shared_ptr<std::vector<std::shared_ptr<qtorch::Node>>>, std::allocator<std::shared_ptr<std::vector<std::shared_ptr<qtorch::Node>>>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::shared_ptr<std::vector<std::shared_ptr<qtorch::Node>>>, std::allocator<std::shared_ptr<std::vector<std::shared_ptr<qtorch::Node>>>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::shared_ptr<std::vector<std::shared_ptr<qtorch::Node>>>, std::allocator<std::shared_ptr<std::vector<std::shared_ptr<qtorch::Node>>>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::shared_ptr<std::vector<std::shared_ptr<qtorch::Node>>>, std::allocator<std::shared_ptr<std::vector<std::shared_ptr<qtorch::Node>>>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::random_device" = type { %union.anon.191 }
%union.anon.191 = type { %"class.std::mersenne_twister_engine" }
%"class.std::mersenne_twister_engine" = type { [624 x i64], i64 }
%"class.std::allocator" = type { i8 }
%"class.qtorch::LineGraph" = type { %"class.std::shared_ptr.178", %"class.std::vector.4", %"class.std::vector.181", %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string" }
%"class.std::vector.4" = type { %"struct.std::_Vector_base.5" }
%"struct.std::_Vector_base.5" = type { %"struct.std::_Vector_base<std::shared_ptr<qtorch::Wire>, std::allocator<std::shared_ptr<qtorch::Wire>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::shared_ptr<qtorch::Wire>, std::allocator<std::shared_ptr<qtorch::Wire>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::shared_ptr<qtorch::Wire>, std::allocator<std::shared_ptr<qtorch::Wire>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::shared_ptr<qtorch::Wire>, std::allocator<std::shared_ptr<qtorch::Wire>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.181" = type { %"struct.std::_Vector_base.182" }
%"struct.std::_Vector_base.182" = type { %"struct.std::_Vector_base<std::array<std::shared_ptr<qtorch::Wire>, 2>, std::allocator<std::array<std::shared_ptr<qtorch::Wire>, 2>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::array<std::shared_ptr<qtorch::Wire>, 2>, std::allocator<std::array<std::shared_ptr<qtorch::Wire>, 2>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::array<std::shared_ptr<qtorch::Wire>, 2>, std::allocator<std::array<std::shared_ptr<qtorch::Wire>, 2>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::array<std::shared_ptr<qtorch::Wire>, 2>, std::allocator<std::array<std::shared_ptr<qtorch::Wire>, 2>>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@_ZTISt9exception = external constant ptr
@.str.128 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.129 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.130 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.131 = external hidden unnamed_addr constant [53 x i8], align 1
@.str.132 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.133 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.134 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.135 = external hidden unnamed_addr constant [52 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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN6qtorch9LineGraph10runQuickBBEiPNS_5TimerEb(ptr noundef nonnull align 8 dereferenceable(160), i32 noundef, ptr noundef, i1 noundef zeroext) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN6qtorch9LineGraph10LGContractEv(ptr noundef nonnull align 8 dereferenceable(160)) #2 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6qtorch16ContractionTools8ContractENS_15ContractionTypeEii(ptr dead_on_unwind noalias writable sret(%"class.std::shared_ptr.178") align 8, ptr noundef nonnull align 8 dereferenceable(10128), i32 noundef, i32 noundef, i32 noundef) #2 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)) #3 align 2

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZSt3absd(double noundef) #5

; Function Attrs: mustprogress nounwind uwtable
declare dso_local { double, double } @_ZN6qtorch16ContractionTools11GetFinalValEv(ptr noundef nonnull align 8 dereferenceable(10128)) #3 align 2

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_Z16largeCircuitTestRSt14basic_ofstreamIcSt11char_traitsIcEE(ptr noundef nonnull align 8 dereferenceable(248) %0) #2 personality ptr @__gxx_personality_v0 {
  %2 = alloca i1, align 1
  %3 = alloca ptr, align 8
  %4 = alloca %"class.qtorch::ContractionTools", align 8
  %5 = alloca %"class.std::__cxx11::basic_string", align 8
  %6 = alloca %"class.std::allocator", align 1
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca %"class.std::__cxx11::basic_string", align 8
  %10 = alloca %"class.std::allocator", align 1
  %11 = alloca %"class.std::shared_ptr.178", align 8
  %12 = alloca %"class.std::complex", align 8
  %13 = alloca %"class.std::complex", align 8
  %14 = alloca %"class.std::complex", align 8
  %15 = alloca i32, align 4
  %16 = alloca %"class.std::__cxx11::basic_string", align 8
  %17 = alloca %"class.std::allocator", align 1
  %18 = alloca %"class.std::__cxx11::basic_string", align 8
  %19 = alloca %"class.std::allocator", align 1
  %20 = alloca %"class.std::shared_ptr.178", align 8
  %21 = alloca %"class.std::complex", align 8
  %22 = alloca %"class.std::complex", align 8
  %23 = alloca %"class.std::complex", align 8
  %24 = alloca %"class.std::shared_ptr.178", align 8
  %25 = alloca %"class.std::shared_ptr.178", align 8
  %26 = alloca %"class.qtorch::LineGraph", align 8
  %27 = alloca %"class.std::shared_ptr.178", align 8
  %28 = alloca %"class.qtorch::LineGraph", align 8
  %29 = alloca %"class.std::shared_ptr.178", align 8
  %30 = alloca ptr, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  %31 = load ptr, ptr %3, align 8, !tbaa !5
  %32 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %31, ptr noundef @.str.128)
  %33 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %32, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %34 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %33, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.start.p0(i64 10128, ptr %4) #8
  call void @llvm.lifetime.start.p0(i64 32, ptr %5) #8
  call void @llvm.lifetime.start.p0(i64 1, ptr %6) #8
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #8
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef @.str.129, ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %35 unwind label %79

35:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 32, ptr %9) #8
  call void @llvm.lifetime.start.p0(i64 1, ptr %10) #8
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #8
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef @.str.130, ptr noundef nonnull align 1 dereferenceable(1) %10)
          to label %36 unwind label %83

36:                                               ; preds = %35
  invoke void @_ZN6qtorch16ContractionToolsC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_i(ptr noundef nonnull align 8 dereferenceable(10128) %4, ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef nonnull align 8 dereferenceable(32) %9, i32 noundef 8)
          to label %37 unwind label %87

37:                                               ; preds = %36
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #8
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #8
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %5) #8
  invoke void @_ZN6qtorch16ContractionTools8ContractENS_15ContractionTypeEii(ptr dead_on_unwind writable sret(%"class.std::shared_ptr.178") align 8 %11, ptr noundef nonnull align 8 dereferenceable(10128) %4, i32 noundef 0, i32 noundef 1, i32 noundef 1)
          to label %38 unwind label %93

38:                                               ; preds = %37
  call void @_ZNSt12__shared_ptrIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %11) #8
  %39 = load ptr, ptr %3, align 8, !tbaa !5
  %40 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %39, ptr noundef @.str.131)
          to label %41 unwind label %93

41:                                               ; preds = %38
  call void @llvm.lifetime.start.p0(i64 16, ptr %12) #8
  %42 = call { double, double } @_ZN6qtorch16ContractionTools11GetFinalValEv(ptr noundef nonnull align 8 dereferenceable(10128) %4) #8
  %43 = getelementptr inbounds %"class.std::complex", ptr %12, i32 0, i32 0
  %44 = getelementptr inbounds { double, double }, ptr %43, i32 0, i32 0
  %45 = extractvalue { double, double } %42, 0
  store double %45, ptr %44, align 8
  %46 = getelementptr inbounds { double, double }, ptr %43, i32 0, i32 1
  %47 = extractvalue { double, double } %42, 1
  store double %47, ptr %46, align 8
  %48 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIdcSt11char_traitsIcEERSt13basic_ostreamIT0_T1_ES6_RKSt7complexIT_E(ptr noundef nonnull align 8 dereferenceable(8) %40, ptr noundef nonnull align 8 dereferenceable(16) %12)
          to label %49 unwind label %97

49:                                               ; preds = %41
  %50 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %48, ptr noundef @.str.132)
          to label %51 unwind label %97

51:                                               ; preds = %49
  %52 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %50, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %53 unwind label %97

53:                                               ; preds = %51
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr %13) #8
  %54 = call { double, double } @_ZN6qtorch16ContractionTools11GetFinalValEv(ptr noundef nonnull align 8 dereferenceable(10128) %4) #8
  %55 = getelementptr inbounds %"class.std::complex", ptr %13, i32 0, i32 0
  %56 = getelementptr inbounds { double, double }, ptr %55, i32 0, i32 0
  %57 = extractvalue { double, double } %54, 0
  store double %57, ptr %56, align 8
  %58 = getelementptr inbounds { double, double }, ptr %55, i32 0, i32 1
  %59 = extractvalue { double, double } %54, 1
  store double %59, ptr %58, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %14) #8
  %60 = invoke noundef double @_ZNKSt7complexIdE4realB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(16) %13)
          to label %61 unwind label %101

61:                                               ; preds = %53
  %62 = fsub double %60, 3.575700e-03
  %63 = invoke noundef double @_ZSt3absd(double noundef %62)
          to label %64 unwind label %101

64:                                               ; preds = %61
  %65 = fcmp oge double %63, 1.000000e-05
  br i1 %65, label %76, label %66

66:                                               ; preds = %64
  %67 = call { double, double } @_ZN6qtorch16ContractionTools11GetFinalValEv(ptr noundef nonnull align 8 dereferenceable(10128) %4) #8
  %68 = getelementptr inbounds %"class.std::complex", ptr %14, i32 0, i32 0
  %69 = getelementptr inbounds { double, double }, ptr %68, i32 0, i32 0
  %70 = extractvalue { double, double } %67, 0
  store double %70, ptr %69, align 8
  %71 = getelementptr inbounds { double, double }, ptr %68, i32 0, i32 1
  %72 = extractvalue { double, double } %67, 1
  store double %72, ptr %71, align 8
  %73 = invoke noundef double @_ZNKSt7complexIdE4imagB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(16) %14)
          to label %74 unwind label %105

74:                                               ; preds = %66
  %75 = fcmp oge double %73, 1.000000e-05
  br label %76

76:                                               ; preds = %74, %64
  %77 = phi i1 [ true, %64 ], [ %75, %74 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #8
  br i1 %77, label %78, label %110

78:                                               ; preds = %76
  store i1 false, ptr %2, align 1
  store i32 1, ptr %15, align 4
  br label %270

79:                                               ; preds = %1
  %80 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  %81 = extractvalue { ptr, i32 } %80, 0
  store ptr %81, ptr %7, align 8
  %82 = extractvalue { ptr, i32 } %80, 1
  store i32 %82, ptr %8, align 4
  br label %92

83:                                               ; preds = %35
  %84 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  %85 = extractvalue { ptr, i32 } %84, 0
  store ptr %85, ptr %7, align 8
  %86 = extractvalue { ptr, i32 } %84, 1
  store i32 %86, ptr %8, align 4
  br label %91

87:                                               ; preds = %36
  %88 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  %89 = extractvalue { ptr, i32 } %88, 0
  store ptr %89, ptr %7, align 8
  %90 = extractvalue { ptr, i32 } %88, 1
  store i32 %90, ptr %8, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #8
  br label %91

91:                                               ; preds = %87, %83
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #8
  br label %92

92:                                               ; preds = %91, %79
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %5) #8
  br label %278

93:                                               ; preds = %114, %113, %38, %37
  %94 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  %95 = extractvalue { ptr, i32 } %94, 0
  store ptr %95, ptr %7, align 8
  %96 = extractvalue { ptr, i32 } %94, 1
  store i32 %96, ptr %8, align 4
  br label %277

97:                                               ; preds = %51, %49, %41
  %98 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  %99 = extractvalue { ptr, i32 } %98, 0
  store ptr %99, ptr %7, align 8
  %100 = extractvalue { ptr, i32 } %98, 1
  store i32 %100, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #8
  br label %277

101:                                              ; preds = %61, %53
  %102 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  %103 = extractvalue { ptr, i32 } %102, 0
  store ptr %103, ptr %7, align 8
  %104 = extractvalue { ptr, i32 } %102, 1
  store i32 %104, ptr %8, align 4
  br label %109

105:                                              ; preds = %66
  %106 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  %107 = extractvalue { ptr, i32 } %106, 0
  store ptr %107, ptr %7, align 8
  %108 = extractvalue { ptr, i32 } %106, 1
  store i32 %108, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #8
  br label %109

109:                                              ; preds = %105, %101
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #8
  br label %277

110:                                              ; preds = %76
  call void @llvm.lifetime.start.p0(i64 32, ptr %16) #8
  call void @llvm.lifetime.start.p0(i64 1, ptr %17) #8
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #8
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %16, ptr noundef @.str.133, ptr noundef nonnull align 1 dereferenceable(1) %17)
          to label %111 unwind label %155

111:                                              ; preds = %110
  call void @llvm.lifetime.start.p0(i64 32, ptr %18) #8
  call void @llvm.lifetime.start.p0(i64 1, ptr %19) #8
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %19) #8
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %18, ptr noundef @.str.130, ptr noundef nonnull align 1 dereferenceable(1) %19)
          to label %112 unwind label %159

112:                                              ; preds = %111
  invoke void @_ZN6qtorch16ContractionTools5ResetERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_i(ptr noundef nonnull align 8 dereferenceable(10128) %4, ptr noundef nonnull align 8 dereferenceable(32) %16, ptr noundef nonnull align 8 dereferenceable(32) %18, i32 noundef 8)
          to label %113 unwind label %163

113:                                              ; preds = %112
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %18) #8
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %19) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %18) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #8
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %16) #8
  invoke void @_ZN6qtorch16ContractionTools8ContractENS_15ContractionTypeEii(ptr dead_on_unwind writable sret(%"class.std::shared_ptr.178") align 8 %20, ptr noundef nonnull align 8 dereferenceable(10128) %4, i32 noundef 0, i32 noundef 1, i32 noundef 1)
          to label %114 unwind label %93

114:                                              ; preds = %113
  call void @_ZNSt12__shared_ptrIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %20) #8
  %115 = load ptr, ptr %3, align 8, !tbaa !5
  %116 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %115, ptr noundef @.str.131)
          to label %117 unwind label %93

117:                                              ; preds = %114
  call void @llvm.lifetime.start.p0(i64 16, ptr %21) #8
  %118 = call { double, double } @_ZN6qtorch16ContractionTools11GetFinalValEv(ptr noundef nonnull align 8 dereferenceable(10128) %4) #8
  %119 = getelementptr inbounds %"class.std::complex", ptr %21, i32 0, i32 0
  %120 = getelementptr inbounds { double, double }, ptr %119, i32 0, i32 0
  %121 = extractvalue { double, double } %118, 0
  store double %121, ptr %120, align 8
  %122 = getelementptr inbounds { double, double }, ptr %119, i32 0, i32 1
  %123 = extractvalue { double, double } %118, 1
  store double %123, ptr %122, align 8
  %124 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIdcSt11char_traitsIcEERSt13basic_ostreamIT0_T1_ES6_RKSt7complexIT_E(ptr noundef nonnull align 8 dereferenceable(8) %116, ptr noundef nonnull align 8 dereferenceable(16) %21)
          to label %125 unwind label %169

125:                                              ; preds = %117
  %126 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %124, ptr noundef @.str.134)
          to label %127 unwind label %169

127:                                              ; preds = %125
  %128 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %126, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %129 unwind label %169

129:                                              ; preds = %127
  call void @llvm.lifetime.end.p0(i64 16, ptr %21) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr %22) #8
  %130 = call { double, double } @_ZN6qtorch16ContractionTools11GetFinalValEv(ptr noundef nonnull align 8 dereferenceable(10128) %4) #8
  %131 = getelementptr inbounds %"class.std::complex", ptr %22, i32 0, i32 0
  %132 = getelementptr inbounds { double, double }, ptr %131, i32 0, i32 0
  %133 = extractvalue { double, double } %130, 0
  store double %133, ptr %132, align 8
  %134 = getelementptr inbounds { double, double }, ptr %131, i32 0, i32 1
  %135 = extractvalue { double, double } %130, 1
  store double %135, ptr %134, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %23) #8
  %136 = invoke noundef double @_ZNKSt7complexIdE4realB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(16) %22)
          to label %137 unwind label %173

137:                                              ; preds = %129
  %138 = fsub double %136, 2.555910e-03
  %139 = invoke noundef double @_ZSt3absd(double noundef %138)
          to label %140 unwind label %173

140:                                              ; preds = %137
  %141 = fcmp oge double %139, 1.000000e-05
  br i1 %141, label %152, label %142

142:                                              ; preds = %140
  %143 = call { double, double } @_ZN6qtorch16ContractionTools11GetFinalValEv(ptr noundef nonnull align 8 dereferenceable(10128) %4) #8
  %144 = getelementptr inbounds %"class.std::complex", ptr %23, i32 0, i32 0
  %145 = getelementptr inbounds { double, double }, ptr %144, i32 0, i32 0
  %146 = extractvalue { double, double } %143, 0
  store double %146, ptr %145, align 8
  %147 = getelementptr inbounds { double, double }, ptr %144, i32 0, i32 1
  %148 = extractvalue { double, double } %143, 1
  store double %148, ptr %147, align 8
  %149 = invoke noundef double @_ZNKSt7complexIdE4imagB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(16) %23)
          to label %150 unwind label %177

150:                                              ; preds = %142
  %151 = fcmp oge double %149, 1.000000e-05
  br label %152

152:                                              ; preds = %150, %140
  %153 = phi i1 [ true, %140 ], [ %151, %150 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr %23) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %22) #8
  br i1 %153, label %154, label %182

154:                                              ; preds = %152
  store i1 false, ptr %2, align 1
  store i32 1, ptr %15, align 4
  br label %270

155:                                              ; preds = %110
  %156 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  %157 = extractvalue { ptr, i32 } %156, 0
  store ptr %157, ptr %7, align 8
  %158 = extractvalue { ptr, i32 } %156, 1
  store i32 %158, ptr %8, align 4
  br label %168

159:                                              ; preds = %111
  %160 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  %161 = extractvalue { ptr, i32 } %160, 0
  store ptr %161, ptr %7, align 8
  %162 = extractvalue { ptr, i32 } %160, 1
  store i32 %162, ptr %8, align 4
  br label %167

163:                                              ; preds = %112
  %164 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  %165 = extractvalue { ptr, i32 } %164, 0
  store ptr %165, ptr %7, align 8
  %166 = extractvalue { ptr, i32 } %164, 1
  store i32 %166, ptr %8, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %18) #8
  br label %167

167:                                              ; preds = %163, %159
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %19) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %18) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #8
  br label %168

168:                                              ; preds = %167, %155
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %16) #8
  br label %277

169:                                              ; preds = %127, %125, %117
  %170 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  %171 = extractvalue { ptr, i32 } %170, 0
  store ptr %171, ptr %7, align 8
  %172 = extractvalue { ptr, i32 } %170, 1
  store i32 %172, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %21) #8
  br label %277

173:                                              ; preds = %137, %129
  %174 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  %175 = extractvalue { ptr, i32 } %174, 0
  store ptr %175, ptr %7, align 8
  %176 = extractvalue { ptr, i32 } %174, 1
  store i32 %176, ptr %8, align 4
  br label %181

177:                                              ; preds = %142
  %178 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  %179 = extractvalue { ptr, i32 } %178, 0
  store ptr %179, ptr %7, align 8
  %180 = extractvalue { ptr, i32 } %178, 1
  store i32 %180, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %23) #8
  br label %181

181:                                              ; preds = %177, %173
  call void @llvm.lifetime.end.p0(i64 16, ptr %22) #8
  br label %277

182:                                              ; preds = %152
  call void @llvm.lifetime.start.p0(i64 16, ptr %24) #8
  invoke void @_ZSt11make_sharedIN6qtorch7NetworkEJRA32_KcRA23_S2_EESt10shared_ptrINSt9enable_ifIXntsr8is_arrayIT_EE5valueES9_E4typeEEDpOT0_(ptr dead_on_unwind writable sret(%"class.std::shared_ptr.178") align 8 %24, ptr noundef nonnull align 1 dereferenceable(32) @.str.129, ptr noundef nonnull align 1 dereferenceable(23) @.str.130)
          to label %183 unwind label %217

183:                                              ; preds = %182
  call void @llvm.lifetime.start.p0(i64 16, ptr %25) #8
  invoke void @_ZSt11make_sharedIN6qtorch7NetworkEJRA32_KcRA23_S2_EESt10shared_ptrINSt9enable_ifIXntsr8is_arrayIT_EE5valueES9_E4typeEEDpOT0_(ptr dead_on_unwind writable sret(%"class.std::shared_ptr.178") align 8 %25, ptr noundef nonnull align 1 dereferenceable(32) @.str.133, ptr noundef nonnull align 1 dereferenceable(23) @.str.130)
          to label %184 unwind label %221

184:                                              ; preds = %183
  call void @llvm.lifetime.start.p0(i64 160, ptr %26) #8
  call void @_ZNSt10shared_ptrIN6qtorch7NetworkEEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(16) %27, ptr noundef nonnull align 8 dereferenceable(16) %24) #8
  invoke void @_ZN6qtorch9LineGraphC1ESt10shared_ptrINS_7NetworkEE(ptr noundef nonnull align 8 dereferenceable(160) %26, ptr noundef %27)
          to label %185 unwind label %225

185:                                              ; preds = %184
  call void @_ZNSt12__shared_ptrIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %27) #8
  call void @llvm.lifetime.start.p0(i64 160, ptr %28) #8
  call void @_ZNSt10shared_ptrIN6qtorch7NetworkEEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(16) %29, ptr noundef nonnull align 8 dereferenceable(16) %25) #8
  invoke void @_ZN6qtorch9LineGraphC1ESt10shared_ptrINS_7NetworkEE(ptr noundef nonnull align 8 dereferenceable(160) %28, ptr noundef %29)
          to label %186 unwind label %229

186:                                              ; preds = %185
  call void @_ZNSt12__shared_ptrIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %29) #8
  %187 = invoke noundef zeroext i1 @_ZN6qtorch9LineGraph10runQuickBBEiPNS_5TimerEb(ptr noundef nonnull align 8 dereferenceable(160) %26, i32 noundef 20, ptr noundef null, i1 noundef zeroext true)
          to label %188 unwind label %233

188:                                              ; preds = %186
  %189 = invoke noundef zeroext i1 @_ZN6qtorch9LineGraph10LGContractEv(ptr noundef nonnull align 8 dereferenceable(160) %26)
          to label %190 unwind label %233

190:                                              ; preds = %188
  %191 = load ptr, ptr %3, align 8, !tbaa !5
  %192 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %191, ptr noundef @.str.135)
          to label %193 unwind label %233

193:                                              ; preds = %190
  %194 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %24) #8
  %195 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK6qtorch7Network13GetFinalValueEv(ptr noundef nonnull align 8 dereferenceable(380) %194) #8
  %196 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIdcSt11char_traitsIcEERSt13basic_ostreamIT0_T1_ES6_RKSt7complexIT_E(ptr noundef nonnull align 8 dereferenceable(8) %192, ptr noundef nonnull align 8 dereferenceable(16) %195)
          to label %197 unwind label %233

197:                                              ; preds = %193
  %198 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %196, ptr noundef @.str.132)
          to label %199 unwind label %233

199:                                              ; preds = %197
  %200 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %198, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %201 unwind label %233

201:                                              ; preds = %199
  %202 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %24) #8
  %203 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK6qtorch7Network13GetFinalValueEv(ptr noundef nonnull align 8 dereferenceable(380) %202) #8
  %204 = invoke noundef double @_ZNKSt7complexIdE4realB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(16) %203)
          to label %205 unwind label %233

205:                                              ; preds = %201
  %206 = fsub double %204, 3.575700e-03
  %207 = invoke noundef double @_ZSt3absd(double noundef %206)
          to label %208 unwind label %233

208:                                              ; preds = %205
  %209 = fcmp oge double %207, 1.000000e-05
  br i1 %209, label %216, label %210

210:                                              ; preds = %208
  %211 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %24) #8
  %212 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK6qtorch7Network13GetFinalValueEv(ptr noundef nonnull align 8 dereferenceable(380) %211) #8
  %213 = invoke noundef double @_ZNKSt7complexIdE4imagB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(16) %212)
          to label %214 unwind label %233

214:                                              ; preds = %210
  %215 = fcmp oge double %213, 1.000000e-05
  br i1 %215, label %216, label %237

216:                                              ; preds = %214, %208
  store i1 false, ptr %2, align 1
  store i32 1, ptr %15, align 4
  br label %269

217:                                              ; preds = %182
  %218 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  %219 = extractvalue { ptr, i32 } %218, 0
  store ptr %219, ptr %7, align 8
  %220 = extractvalue { ptr, i32 } %218, 1
  store i32 %220, ptr %8, align 4
  br label %276

221:                                              ; preds = %183
  %222 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  %223 = extractvalue { ptr, i32 } %222, 0
  store ptr %223, ptr %7, align 8
  %224 = extractvalue { ptr, i32 } %222, 1
  store i32 %224, ptr %8, align 4
  br label %275

225:                                              ; preds = %184
  %226 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  %227 = extractvalue { ptr, i32 } %226, 0
  store ptr %227, ptr %7, align 8
  %228 = extractvalue { ptr, i32 } %226, 1
  store i32 %228, ptr %8, align 4
  call void @_ZNSt12__shared_ptrIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %27) #8
  br label %274

229:                                              ; preds = %185
  %230 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  %231 = extractvalue { ptr, i32 } %230, 0
  store ptr %231, ptr %7, align 8
  %232 = extractvalue { ptr, i32 } %230, 1
  store i32 %232, ptr %8, align 4
  call void @_ZNSt12__shared_ptrIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %29) #8
  br label %273

233:                                              ; preds = %261, %256, %252, %250, %248, %244, %241, %239, %237, %210, %205, %201, %199, %197, %193, %190, %188, %186
  %234 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  %235 = extractvalue { ptr, i32 } %234, 0
  store ptr %235, ptr %7, align 8
  %236 = extractvalue { ptr, i32 } %234, 1
  store i32 %236, ptr %8, align 4
  call void @_ZN6qtorch9LineGraphD2Ev(ptr noundef nonnull align 8 dereferenceable(160) %28) #8
  br label %273

237:                                              ; preds = %214
  %238 = invoke noundef zeroext i1 @_ZN6qtorch9LineGraph10runQuickBBEiPNS_5TimerEb(ptr noundef nonnull align 8 dereferenceable(160) %28, i32 noundef 20, ptr noundef null, i1 noundef zeroext true)
          to label %239 unwind label %233

239:                                              ; preds = %237
  %240 = invoke noundef zeroext i1 @_ZN6qtorch9LineGraph10LGContractEv(ptr noundef nonnull align 8 dereferenceable(160) %28)
          to label %241 unwind label %233

241:                                              ; preds = %239
  %242 = load ptr, ptr %3, align 8, !tbaa !5
  %243 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %242, ptr noundef @.str.135)
          to label %244 unwind label %233

244:                                              ; preds = %241
  %245 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %25) #8
  %246 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK6qtorch7Network13GetFinalValueEv(ptr noundef nonnull align 8 dereferenceable(380) %245) #8
  %247 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIdcSt11char_traitsIcEERSt13basic_ostreamIT0_T1_ES6_RKSt7complexIT_E(ptr noundef nonnull align 8 dereferenceable(8) %243, ptr noundef nonnull align 8 dereferenceable(16) %246)
          to label %248 unwind label %233

248:                                              ; preds = %244
  %249 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %247, ptr noundef @.str.134)
          to label %250 unwind label %233

250:                                              ; preds = %248
  %251 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %249, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %252 unwind label %233

252:                                              ; preds = %250
  %253 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %25) #8
  %254 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK6qtorch7Network13GetFinalValueEv(ptr noundef nonnull align 8 dereferenceable(380) %253) #8
  %255 = invoke noundef double @_ZNKSt7complexIdE4realB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(16) %254)
          to label %256 unwind label %233

256:                                              ; preds = %252
  %257 = fsub double %255, 2.555910e-03
  %258 = invoke noundef double @_ZSt3absd(double noundef %257)
          to label %259 unwind label %233

259:                                              ; preds = %256
  %260 = fcmp oge double %258, 1.000000e-05
  br i1 %260, label %267, label %261

261:                                              ; preds = %259
  %262 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %25) #8
  %263 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK6qtorch7Network13GetFinalValueEv(ptr noundef nonnull align 8 dereferenceable(380) %262) #8
  %264 = invoke noundef double @_ZNKSt7complexIdE4imagB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(16) %263)
          to label %265 unwind label %233

265:                                              ; preds = %261
  %266 = fcmp oge double %264, 1.000000e-05
  br i1 %266, label %267, label %268

267:                                              ; preds = %265, %259
  store i1 false, ptr %2, align 1
  store i32 1, ptr %15, align 4
  br label %269

268:                                              ; preds = %265
  store i32 0, ptr %15, align 4
  br label %269

269:                                              ; preds = %268, %267, %216
  call void @_ZN6qtorch9LineGraphD2Ev(ptr noundef nonnull align 8 dereferenceable(160) %28) #8
  call void @llvm.lifetime.end.p0(i64 160, ptr %28) #8
  call void @_ZN6qtorch9LineGraphD2Ev(ptr noundef nonnull align 8 dereferenceable(160) %26) #8
  call void @llvm.lifetime.end.p0(i64 160, ptr %26) #8
  call void @_ZNSt12__shared_ptrIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %25) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %25) #8
  call void @_ZNSt12__shared_ptrIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %24) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %24) #8
  br label %270

270:                                              ; preds = %269, %154, %78
  call void @_ZN6qtorch16ContractionToolsD2Ev(ptr noundef nonnull align 8 dereferenceable(10128) %4) #8
  call void @llvm.lifetime.end.p0(i64 10128, ptr %4) #8
  %271 = load i32, ptr %15, align 4
  switch i32 %271, label %312 [
    i32 0, label %272
    i32 1, label %302
  ]

272:                                              ; preds = %270
  br label %301

273:                                              ; preds = %233, %229
  call void @llvm.lifetime.end.p0(i64 160, ptr %28) #8
  call void @_ZN6qtorch9LineGraphD2Ev(ptr noundef nonnull align 8 dereferenceable(160) %26) #8
  br label %274

274:                                              ; preds = %273, %225
  call void @llvm.lifetime.end.p0(i64 160, ptr %26) #8
  call void @_ZNSt12__shared_ptrIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %25) #8
  br label %275

275:                                              ; preds = %274, %221
  call void @llvm.lifetime.end.p0(i64 16, ptr %25) #8
  call void @_ZNSt12__shared_ptrIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %24) #8
  br label %276

276:                                              ; preds = %275, %217
  call void @llvm.lifetime.end.p0(i64 16, ptr %24) #8
  br label %277

277:                                              ; preds = %276, %181, %169, %168, %109, %97, %93
  call void @_ZN6qtorch16ContractionToolsD2Ev(ptr noundef nonnull align 8 dereferenceable(10128) %4) #8
  br label %278

278:                                              ; preds = %277, %92
  call void @llvm.lifetime.end.p0(i64 10128, ptr %4) #8
  br label %279

279:                                              ; preds = %278
  %280 = load i32, ptr %8, align 4
  %281 = call i32 @llvm.eh.typeid.for.p0(ptr @_ZTISt9exception) #8
  %282 = icmp eq i32 %280, %281
  br i1 %282, label %283, label %304

283:                                              ; preds = %279
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #8
  %284 = load ptr, ptr %7, align 8
  %285 = call ptr @__cxa_begin_catch(ptr %284) #8
  store ptr %285, ptr %30, align 8
  %286 = load ptr, ptr %3, align 8, !tbaa !5
  %287 = load ptr, ptr %30, align 8, !tbaa !5
  %288 = load ptr, ptr %287, align 8, !tbaa !9
  %289 = getelementptr inbounds ptr, ptr %288, i64 2
  %290 = load ptr, ptr %289, align 8
  %291 = call noundef ptr %290(ptr noundef nonnull align 8 dereferenceable(8) %287) #8
  %292 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %286, ptr noundef %291)
          to label %293 unwind label %296

293:                                              ; preds = %283
  %294 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %292, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %295 unwind label %296

295:                                              ; preds = %293
  store i1 false, ptr %2, align 1
  store i32 1, ptr %15, align 4
  call void @__cxa_end_catch()
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #8
  br label %302

296:                                              ; preds = %293, %283
  %297 = landingpad { ptr, i32 }
          cleanup
  %298 = extractvalue { ptr, i32 } %297, 0
  store ptr %298, ptr %7, align 8
  %299 = extractvalue { ptr, i32 } %297, 1
  store i32 %299, ptr %8, align 4
  invoke void @__cxa_end_catch()
          to label %300 unwind label %309

300:                                              ; preds = %296
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #8
  br label %304

301:                                              ; preds = %272
  store i1 true, ptr %2, align 1
  br label %302

302:                                              ; preds = %301, %295, %270
  %303 = load i1, ptr %2, align 1
  ret i1 %303

304:                                              ; preds = %300, %279
  %305 = load ptr, ptr %7, align 8
  %306 = load i32, ptr %8, align 4
  %307 = insertvalue { ptr, i32 } poison, ptr %305, 0
  %308 = insertvalue { ptr, i32 } %307, i32 %306, 1
  resume { ptr, i32 } %308

309:                                              ; preds = %296
  %310 = landingpad { ptr, i32 }
          catch ptr null
  %311 = extractvalue { ptr, i32 } %310, 0
  call void @__clang_call_terminate(ptr %311) #9
  unreachable

312:                                              ; preds = %270
  unreachable
}

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

; Function Attrs: nounwind memory(none)
declare i32 @llvm.eh.typeid.for.p0(ptr) #6

declare ptr @__cxa_begin_catch(ptr)

declare void @__cxa_end_catch()

; Function Attrs: noinline noreturn nounwind uwtable
declare hidden void @__clang_call_terminate(ptr noundef) #7

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 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 #3 align 2

declare void @_ZN6qtorch9LineGraphC1ESt10shared_ptrINS_7NetworkEE(ptr, ptr)

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 = { 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 = { 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 #6 = { nounwind memory(none) }
attributes #7 = { noinline noreturn nounwind uwtable "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 nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"vtable pointer", !8, 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::shared_ptr.178" = type { %"class.std::__shared_ptr.179" }
%"class.std::__shared_ptr.179" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = 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::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon.0 }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon.0 = type { i64, [8 x i8] }
%"class.std::complex" = type { { double, double } }
%"class.std::vector.186" = type { %"struct.std::_Vector_base.187" }
%"struct.std::_Vector_base.187" = type { %"struct.std::_Vector_base<std::shared_ptr<std::vector<std::shared_ptr<qtorch::Node>>>, std::allocator<std::shared_ptr<std::vector<std::shared_ptr<qtorch::Node>>>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::shared_ptr<std::vector<std::shared_ptr<qtorch::Node>>>, std::allocator<std::shared_ptr<std::vector<std::shared_ptr<qtorch::Node>>>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::shared_ptr<std::vector<std::shared_ptr<qtorch::Node>>>, std::allocator<std::shared_ptr<std::vector<std::shared_ptr<qtorch::Node>>>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::shared_ptr<std::vector<std::shared_ptr<qtorch::Node>>>, std::allocator<std::shared_ptr<std::vector<std::shared_ptr<qtorch::Node>>>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::random_device" = type { %union.anon.191 }
%union.anon.191 = type { %"class.std::mersenne_twister_engine" }
%"class.std::mersenne_twister_engine" = type { [624 x i64], i64 }
%"class.std::allocator" = type { i8 }
%"class.qtorch::LineGraph" = type { %"class.std::shared_ptr.178", %"class.std::vector.4", %"class.std::vector.181", %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string" }
%"class.std::vector.4" = type { %"struct.std::_Vector_base.5" }
%"struct.std::_Vector_base.5" = type { %"struct.std::_Vector_base<std::shared_ptr<qtorch::Wire>, std::allocator<std::shared_ptr<qtorch::Wire>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::shared_ptr<qtorch::Wire>, std::allocator<std::shared_ptr<qtorch::Wire>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::shared_ptr<qtorch::Wire>, std::allocator<std::shared_ptr<qtorch::Wire>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::shared_ptr<qtorch::Wire>, std::allocator<std::shared_ptr<qtorch::Wire>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.181" = type { %"struct.std::_Vector_base.182" }
%"struct.std::_Vector_base.182" = type { %"struct.std::_Vector_base<std::array<std::shared_ptr<qtorch::Wire>, 2>, std::allocator<std::array<std::shared_ptr<qtorch::Wire>, 2>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::array<std::shared_ptr<qtorch::Wire>, 2>, std::allocator<std::array<std::shared_ptr<qtorch::Wire>, 2>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::array<std::shared_ptr<qtorch::Wire>, 2>, std::allocator<std::array<std::shared_ptr<qtorch::Wire>, 2>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::array<std::shared_ptr<qtorch::Wire>, 2>, std::allocator<std::array<std::shared_ptr<qtorch::Wire>, 2>>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@_ZTISt9exception = external constant ptr
@.str.128 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.129 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.130 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.131 = external hidden unnamed_addr constant [53 x i8], align 1
@.str.132 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.133 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.134 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.135 = external hidden unnamed_addr constant [52 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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN6qtorch9LineGraph10runQuickBBEiPNS_5TimerEb(ptr noundef nonnull align 8 dereferenceable(160), i32 noundef, ptr noundef, i1 noundef zeroext) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN6qtorch9LineGraph10LGContractEv(ptr noundef nonnull align 8 dereferenceable(160)) local_unnamed_addr #2 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6qtorch16ContractionTools8ContractENS_15ContractionTypeEii(ptr dead_on_unwind noalias writable sret(%"class.std::shared_ptr.178") align 8, ptr noundef nonnull align 8 dereferenceable(10128), i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #2 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 #3 align 2

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZSt3absd(double noundef) local_unnamed_addr #5

; Function Attrs: mustprogress nounwind uwtable
declare dso_local { double, double } @_ZN6qtorch16ContractionTools11GetFinalValEv(ptr noundef nonnull align 8 dereferenceable(10128)) local_unnamed_addr #3 align 2

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_Z16largeCircuitTestRSt14basic_ofstreamIcSt11char_traitsIcEE(ptr noundef nonnull align 8 dereferenceable(248) %0) local_unnamed_addr #2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.qtorch::ContractionTools", align 8
  %3 = alloca %"class.std::__cxx11::basic_string", align 8
  %4 = alloca %"class.std::allocator", align 1
  %5 = alloca %"class.std::__cxx11::basic_string", align 8
  %6 = alloca %"class.std::allocator", align 1
  %7 = alloca %"class.std::shared_ptr.178", align 8
  %8 = alloca %"class.std::complex", align 8
  %9 = alloca %"class.std::complex", align 8
  %10 = alloca %"class.std::complex", align 8
  %11 = alloca %"class.std::__cxx11::basic_string", align 8
  %12 = alloca %"class.std::allocator", align 1
  %13 = alloca %"class.std::__cxx11::basic_string", align 8
  %14 = alloca %"class.std::allocator", align 1
  %15 = alloca %"class.std::shared_ptr.178", align 8
  %16 = alloca %"class.std::complex", align 8
  %17 = alloca %"class.std::complex", align 8
  %18 = alloca %"class.std::complex", align 8
  %19 = alloca %"class.std::shared_ptr.178", align 8
  %20 = alloca %"class.std::shared_ptr.178", align 8
  %21 = alloca %"class.qtorch::LineGraph", align 8
  %22 = alloca %"class.std::shared_ptr.178", align 8
  %23 = alloca %"class.qtorch::LineGraph", align 8
  %24 = alloca %"class.std::shared_ptr.178", align 8
  %25 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull @.str.128)
  %26 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %25, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %27 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %26, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.start.p0(i64 10128, ptr nonnull %2) #8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %3) #8
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %4) #8
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #8
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %3, ptr noundef nonnull @.str.129, ptr noundef nonnull align 1 dereferenceable(1) %4)
          to label %28 unwind label %59

28:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #8
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %6) #8
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #8
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef nonnull @.str.130, ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %29 unwind label %61

29:                                               ; preds = %28
  invoke void @_ZN6qtorch16ContractionToolsC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_i(ptr noundef nonnull align 8 dereferenceable(10128) %2, ptr noundef nonnull align 8 dereferenceable(32) %3, ptr noundef nonnull align 8 dereferenceable(32) %5, i32 noundef 8)
          to label %30 unwind label %63

30:                                               ; preds = %29
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #8
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #8
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #8
  invoke void @_ZN6qtorch16ContractionTools8ContractENS_15ContractionTypeEii(ptr dead_on_unwind nonnull writable sret(%"class.std::shared_ptr.178") align 8 %7, ptr noundef nonnull align 8 dereferenceable(10128) %2, i32 noundef 0, i32 noundef 1, i32 noundef 1)
          to label %31 unwind label %67

31:                                               ; preds = %30
  call void @_ZNSt12__shared_ptrIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %7) #8
  %32 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull @.str.131)
          to label %33 unwind label %67

33:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #8
  %34 = call { double, double } @_ZN6qtorch16ContractionTools11GetFinalValEv(ptr noundef nonnull align 8 dereferenceable(10128) %2) #8
  %35 = extractvalue { double, double } %34, 0
  store double %35, ptr %8, align 8
  %36 = getelementptr inbounds i8, ptr %8, i64 8
  %37 = extractvalue { double, double } %34, 1
  store double %37, ptr %36, align 8
  %38 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIdcSt11char_traitsIcEERSt13basic_ostreamIT0_T1_ES6_RKSt7complexIT_E(ptr noundef nonnull align 8 dereferenceable(8) %32, ptr noundef nonnull align 8 dereferenceable(16) %8)
          to label %39 unwind label %69

39:                                               ; preds = %33
  %40 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %38, ptr noundef nonnull @.str.132)
          to label %41 unwind label %69

41:                                               ; preds = %39
  %42 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %40, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %43 unwind label %69

43:                                               ; preds = %41
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #8
  %44 = call { double, double } @_ZN6qtorch16ContractionTools11GetFinalValEv(ptr noundef nonnull align 8 dereferenceable(10128) %2) #8
  %45 = extractvalue { double, double } %44, 0
  store double %45, ptr %9, align 8
  %46 = getelementptr inbounds i8, ptr %9, i64 8
  %47 = extractvalue { double, double } %44, 1
  store double %47, ptr %46, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %10) #8
  %48 = call noundef double @_ZNKSt7complexIdE4realB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(16) %9)
  %49 = fadd double %48, -3.575700e-03
  %50 = call noundef double @_ZSt3absd(double noundef %49)
  %51 = fcmp ult double %50, 1.000000e-05
  br i1 %51, label %52, label %.critedge

52:                                               ; preds = %43
  %53 = call { double, double } @_ZN6qtorch16ContractionTools11GetFinalValEv(ptr noundef nonnull align 8 dereferenceable(10128) %2) #8
  %54 = extractvalue { double, double } %53, 0
  store double %54, ptr %10, align 8
  %55 = getelementptr inbounds i8, ptr %10, i64 8
  %56 = extractvalue { double, double } %53, 1
  store double %56, ptr %55, align 8
  %57 = call noundef double @_ZNKSt7complexIdE4imagB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(16) %10)
  %58 = fcmp ult double %57, 1.000000e-05
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #8
  br i1 %58, label %71, label %182

.critedge:                                        ; preds = %43
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #8
  br label %182

59:                                               ; preds = %1
  %60 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  br label %66

61:                                               ; preds = %28
  %62 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  br label %65

63:                                               ; preds = %29
  %64 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #8
  br label %65

65:                                               ; preds = %63, %61
  %.pn = phi { ptr, i32 } [ %64, %63 ], [ %62, %61 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #8
  br label %66

66:                                               ; preds = %65, %59
  %.pn.pn = phi { ptr, i32 } [ %.pn, %65 ], [ %60, %59 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #8
  br label %188

67:                                               ; preds = %75, %74, %31, %30
  %68 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  br label %187

69:                                               ; preds = %41, %39, %33
  %70 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #8
  br label %187

71:                                               ; preds = %52
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %11) #8
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %12) #8
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #8
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %11, ptr noundef nonnull @.str.133, ptr noundef nonnull align 1 dereferenceable(1) %12)
          to label %72 unwind label %103

72:                                               ; preds = %71
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %13) #8
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %14) #8
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #8
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %13, ptr noundef nonnull @.str.130, ptr noundef nonnull align 1 dereferenceable(1) %14)
          to label %73 unwind label %105

73:                                               ; preds = %72
  invoke void @_ZN6qtorch16ContractionTools5ResetERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_i(ptr noundef nonnull align 8 dereferenceable(10128) %2, ptr noundef nonnull align 8 dereferenceable(32) %11, ptr noundef nonnull align 8 dereferenceable(32) %13, i32 noundef 8)
          to label %74 unwind label %107

74:                                               ; preds = %73
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #8
  call void @_ZNSt15__new_allocatorIcED2Ev(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.end.p0(i64 32, ptr nonnull %13) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #8
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %12) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %11) #8
  invoke void @_ZN6qtorch16ContractionTools8ContractENS_15ContractionTypeEii(ptr dead_on_unwind nonnull writable sret(%"class.std::shared_ptr.178") align 8 %15, ptr noundef nonnull align 8 dereferenceable(10128) %2, i32 noundef 0, i32 noundef 1, i32 noundef 1)
          to label %75 unwind label %67

75:                                               ; preds = %74
  call void @_ZNSt12__shared_ptrIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %15) #8
  %76 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull @.str.131)
          to label %77 unwind label %67

77:                                               ; preds = %75
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %16) #8
  %78 = call { double, double } @_ZN6qtorch16ContractionTools11GetFinalValEv(ptr noundef nonnull align 8 dereferenceable(10128) %2) #8
  %79 = extractvalue { double, double } %78, 0
  store double %79, ptr %16, align 8
  %80 = getelementptr inbounds i8, ptr %16, i64 8
  %81 = extractvalue { double, double } %78, 1
  store double %81, ptr %80, align 8
  %82 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIdcSt11char_traitsIcEERSt13basic_ostreamIT0_T1_ES6_RKSt7complexIT_E(ptr noundef nonnull align 8 dereferenceable(8) %76, ptr noundef nonnull align 8 dereferenceable(16) %16)
          to label %83 unwind label %111

83:                                               ; preds = %77
  %84 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %82, ptr noundef nonnull @.str.134)
          to label %85 unwind label %111

85:                                               ; preds = %83
  %86 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %84, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %87 unwind label %111

87:                                               ; preds = %85
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %16) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %17) #8
  %88 = call { double, double } @_ZN6qtorch16ContractionTools11GetFinalValEv(ptr noundef nonnull align 8 dereferenceable(10128) %2) #8
  %89 = extractvalue { double, double } %88, 0
  store double %89, ptr %17, align 8
  %90 = getelementptr inbounds i8, ptr %17, i64 8
  %91 = extractvalue { double, double } %88, 1
  store double %91, ptr %90, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %18) #8
  %92 = call noundef double @_ZNKSt7complexIdE4realB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(16) %17)
  %93 = fadd double %92, -2.555910e-03
  %94 = call noundef double @_ZSt3absd(double noundef %93)
  %95 = fcmp ult double %94, 1.000000e-05
  br i1 %95, label %96, label %.critedge2

96:                                               ; preds = %87
  %97 = call { double, double } @_ZN6qtorch16ContractionTools11GetFinalValEv(ptr noundef nonnull align 8 dereferenceable(10128) %2) #8
  %98 = extractvalue { double, double } %97, 0
  store double %98, ptr %18, align 8
  %99 = getelementptr inbounds i8, ptr %18, i64 8
  %100 = extractvalue { double, double } %97, 1
  store double %100, ptr %99, align 8
  %101 = call noundef double @_ZNKSt7complexIdE4imagB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(16) %18)
  %102 = fcmp ult double %101, 1.000000e-05
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %18) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %17) #8
  br i1 %102, label %113, label %182

.critedge2:                                       ; preds = %87
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %18) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %17) #8
  br label %182

103:                                              ; preds = %71
  %104 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  br label %110

105:                                              ; preds = %72
  %106 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  br label %109

107:                                              ; preds = %73
  %108 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #8
  br label %109

109:                                              ; preds = %107, %105
  %.pn32 = phi { ptr, i32 } [ %108, %107 ], [ %106, %105 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(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.end.p0(i64 32, ptr nonnull %13) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #8
  br label %110

110:                                              ; preds = %109, %103
  %.pn32.pn = phi { ptr, i32 } [ %.pn32, %109 ], [ %104, %103 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %12) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %11) #8
  br label %187

111:                                              ; preds = %85, %83, %77
  %112 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %16) #8
  br label %187

113:                                              ; preds = %96
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %19) #8
  invoke void @_ZSt11make_sharedIN6qtorch7NetworkEJRA32_KcRA23_S2_EESt10shared_ptrINSt9enable_ifIXntsr8is_arrayIT_EE5valueES9_E4typeEEDpOT0_(ptr dead_on_unwind nonnull writable sret(%"class.std::shared_ptr.178") align 8 %19, ptr noundef nonnull align 1 dereferenceable(32) @.str.129, ptr noundef nonnull align 1 dereferenceable(23) @.str.130)
          to label %114 unwind label %143

114:                                              ; preds = %113
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %20) #8
  invoke void @_ZSt11make_sharedIN6qtorch7NetworkEJRA32_KcRA23_S2_EESt10shared_ptrINSt9enable_ifIXntsr8is_arrayIT_EE5valueES9_E4typeEEDpOT0_(ptr dead_on_unwind nonnull writable sret(%"class.std::shared_ptr.178") align 8 %20, ptr noundef nonnull align 1 dereferenceable(32) @.str.133, ptr noundef nonnull align 1 dereferenceable(23) @.str.130)
          to label %115 unwind label %145

115:                                              ; preds = %114
  call void @llvm.lifetime.start.p0(i64 160, ptr nonnull %21) #8
  call void @_ZNSt10shared_ptrIN6qtorch7NetworkEEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(16) %22, ptr noundef nonnull align 8 dereferenceable(16) %19) #8
  invoke void @_ZN6qtorch9LineGraphC1ESt10shared_ptrINS_7NetworkEE(ptr noundef nonnull align 8 dereferenceable(160) %21, ptr noundef nonnull %22)
          to label %116 unwind label %147

116:                                              ; preds = %115
  call void @_ZNSt12__shared_ptrIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %22) #8
  call void @llvm.lifetime.start.p0(i64 160, ptr nonnull %23) #8
  call void @_ZNSt10shared_ptrIN6qtorch7NetworkEEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(16) %24, ptr noundef nonnull align 8 dereferenceable(16) %20) #8
  invoke void @_ZN6qtorch9LineGraphC1ESt10shared_ptrINS_7NetworkEE(ptr noundef nonnull align 8 dereferenceable(160) %23, ptr noundef nonnull %24)
          to label %117 unwind label %149

117:                                              ; preds = %116
  call void @_ZNSt12__shared_ptrIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %24) #8
  %118 = invoke noundef zeroext i1 @_ZN6qtorch9LineGraph10runQuickBBEiPNS_5TimerEb(ptr noundef nonnull align 8 dereferenceable(160) %21, i32 noundef 20, ptr noundef null, i1 noundef zeroext true)
          to label %119 unwind label %151

119:                                              ; preds = %117
  %120 = invoke noundef zeroext i1 @_ZN6qtorch9LineGraph10LGContractEv(ptr noundef nonnull align 8 dereferenceable(160) %21)
          to label %121 unwind label %151

121:                                              ; preds = %119
  %122 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull @.str.135)
          to label %123 unwind label %151

123:                                              ; preds = %121
  %124 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %19) #8
  %125 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK6qtorch7Network13GetFinalValueEv(ptr noundef nonnull align 8 dereferenceable(380) %124) #8
  %126 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIdcSt11char_traitsIcEERSt13basic_ostreamIT0_T1_ES6_RKSt7complexIT_E(ptr noundef nonnull align 8 dereferenceable(8) %122, ptr noundef nonnull align 8 dereferenceable(16) %125)
          to label %127 unwind label %151

127:                                              ; preds = %123
  %128 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %126, ptr noundef nonnull @.str.132)
          to label %129 unwind label %151

129:                                              ; preds = %127
  %130 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %128, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %131 unwind label %151

131:                                              ; preds = %129
  %132 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %19) #8
  %133 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK6qtorch7Network13GetFinalValueEv(ptr noundef nonnull align 8 dereferenceable(380) %132) #8
  %134 = call noundef double @_ZNKSt7complexIdE4realB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(16) %133)
  %135 = fadd double %134, -3.575700e-03
  %136 = call noundef double @_ZSt3absd(double noundef %135)
  %137 = fcmp ult double %136, 1.000000e-05
  br i1 %137, label %138, label %180

138:                                              ; preds = %131
  %139 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %19) #8
  %140 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK6qtorch7Network13GetFinalValueEv(ptr noundef nonnull align 8 dereferenceable(380) %139) #8
  %141 = call noundef double @_ZNKSt7complexIdE4imagB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(16) %140)
  %142 = fcmp ult double %141, 1.000000e-05
  br i1 %142, label %153, label %180

143:                                              ; preds = %113
  %144 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  br label %186

145:                                              ; preds = %114
  %146 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  br label %185

147:                                              ; preds = %115
  %148 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  call void @_ZNSt12__shared_ptrIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %22) #8
  br label %184

149:                                              ; preds = %116
  %150 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  call void @_ZNSt12__shared_ptrIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %24) #8
  br label %183

151:                                              ; preds = %165, %163, %159, %157, %155, %153, %129, %127, %123, %121, %119, %117
  %152 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  call void @_ZN6qtorch9LineGraphD2Ev(ptr noundef nonnull align 8 dereferenceable(160) %23) #8
  br label %183

153:                                              ; preds = %138
  %154 = invoke noundef zeroext i1 @_ZN6qtorch9LineGraph10runQuickBBEiPNS_5TimerEb(ptr noundef nonnull align 8 dereferenceable(160) %23, i32 noundef 20, ptr noundef null, i1 noundef zeroext true)
          to label %155 unwind label %151

155:                                              ; preds = %153
  %156 = invoke noundef zeroext i1 @_ZN6qtorch9LineGraph10LGContractEv(ptr noundef nonnull align 8 dereferenceable(160) %23)
          to label %157 unwind label %151

157:                                              ; preds = %155
  %158 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull @.str.135)
          to label %159 unwind label %151

159:                                              ; preds = %157
  %160 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %20) #8
  %161 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK6qtorch7Network13GetFinalValueEv(ptr noundef nonnull align 8 dereferenceable(380) %160) #8
  %162 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIdcSt11char_traitsIcEERSt13basic_ostreamIT0_T1_ES6_RKSt7complexIT_E(ptr noundef nonnull align 8 dereferenceable(8) %158, ptr noundef nonnull align 8 dereferenceable(16) %161)
          to label %163 unwind label %151

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

165:                                              ; preds = %163
  %166 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %164, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %167 unwind label %151

167:                                              ; preds = %165
  %168 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %20) #8
  %169 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK6qtorch7Network13GetFinalValueEv(ptr noundef nonnull align 8 dereferenceable(380) %168) #8
  %170 = call noundef double @_ZNKSt7complexIdE4realB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(16) %169)
  %171 = fadd double %170, -2.555910e-03
  %172 = call noundef double @_ZSt3absd(double noundef %171)
  %173 = fcmp ult double %172, 1.000000e-05
  br i1 %173, label %174, label %180

174:                                              ; preds = %167
  %175 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %20) #8
  %176 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK6qtorch7Network13GetFinalValueEv(ptr noundef nonnull align 8 dereferenceable(380) %175) #8
  %177 = call noundef double @_ZNKSt7complexIdE4imagB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(16) %176)
  %178 = fcmp ult double %177, 1.000000e-05
  br i1 %178, label %179, label %180

179:                                              ; preds = %174
  br label %180

180:                                              ; preds = %167, %174, %131, %138, %179
  %181 = phi i1 [ true, %179 ], [ false, %138 ], [ false, %131 ], [ false, %174 ], [ false, %167 ]
  call void @_ZN6qtorch9LineGraphD2Ev(ptr noundef nonnull align 8 dereferenceable(160) %23) #8
  call void @llvm.lifetime.end.p0(i64 160, ptr nonnull %23) #8
  call void @_ZN6qtorch9LineGraphD2Ev(ptr noundef nonnull align 8 dereferenceable(160) %21) #8
  call void @llvm.lifetime.end.p0(i64 160, ptr nonnull %21) #8
  call void @_ZNSt12__shared_ptrIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %20) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %20) #8
  call void @_ZNSt12__shared_ptrIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %19) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %19) #8
  br label %182

182:                                              ; preds = %96, %.critedge2, %52, %.critedge, %180
  %.115 = phi i1 [ %181, %180 ], [ false, %.critedge ], [ false, %52 ], [ false, %.critedge2 ], [ false, %96 ]
  call void @_ZN6qtorch16ContractionToolsD2Ev(ptr noundef nonnull align 8 dereferenceable(10128) %2) #8
  call void @llvm.lifetime.end.p0(i64 10128, ptr nonnull %2) #8
  br label %203

183:                                              ; preds = %151, %149
  %.pn35 = phi { ptr, i32 } [ %152, %151 ], [ %150, %149 ]
  call void @llvm.lifetime.end.p0(i64 160, ptr nonnull %23) #8
  call void @_ZN6qtorch9LineGraphD2Ev(ptr noundef nonnull align 8 dereferenceable(160) %21) #8
  br label %184

184:                                              ; preds = %183, %147
  %.pn35.pn = phi { ptr, i32 } [ %.pn35, %183 ], [ %148, %147 ]
  call void @llvm.lifetime.end.p0(i64 160, ptr nonnull %21) #8
  call void @_ZNSt12__shared_ptrIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %20) #8
  br label %185

185:                                              ; preds = %184, %145
  %.pn35.pn.pn = phi { ptr, i32 } [ %.pn35.pn, %184 ], [ %146, %145 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %20) #8
  call void @_ZNSt12__shared_ptrIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %19) #8
  br label %186

186:                                              ; preds = %185, %143
  %.pn35.pn.pn.pn = phi { ptr, i32 } [ %.pn35.pn.pn, %185 ], [ %144, %143 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %19) #8
  br label %187

187:                                              ; preds = %186, %111, %110, %69, %67
  %.pn35.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn35.pn.pn.pn, %186 ], [ %112, %111 ], [ %68, %67 ], [ %.pn32.pn, %110 ], [ %70, %69 ]
  call void @_ZN6qtorch16ContractionToolsD2Ev(ptr noundef nonnull align 8 dereferenceable(10128) %2) #8
  br label %188

188:                                              ; preds = %187, %66
  %.pn35.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn35.pn.pn.pn.pn, %187 ], [ %.pn.pn, %66 ]
  %.9 = extractvalue { ptr, i32 } %.pn35.pn.pn.pn.pn.pn, 1
  call void @llvm.lifetime.end.p0(i64 10128, ptr nonnull %2) #8
  %189 = call i32 @llvm.eh.typeid.for.p0(ptr nonnull @_ZTISt9exception) #8
  %190 = icmp eq i32 %.9, %189
  br i1 %190, label %191, label %204

191:                                              ; preds = %188
  %.928 = extractvalue { ptr, i32 } %.pn35.pn.pn.pn.pn.pn, 0
  %192 = call ptr @__cxa_begin_catch(ptr %.928) #8
  %193 = load ptr, ptr %192, align 8, !tbaa !5
  %194 = getelementptr inbounds i8, ptr %193, i64 16
  %195 = load ptr, ptr %194, align 8
  %196 = call noundef ptr %195(ptr noundef nonnull align 8 dereferenceable(8) %192) #8
  %197 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef %196)
          to label %198 unwind label %201

198:                                              ; preds = %191
  %199 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %197, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %200 unwind label %201

200:                                              ; preds = %198
  call void @__cxa_end_catch()
  br label %203

201:                                              ; preds = %198, %191
  %202 = landingpad { ptr, i32 }
          cleanup
  invoke void @__cxa_end_catch()
          to label %204 unwind label %205

203:                                              ; preds = %182, %200
  %.2 = phi i1 [ false, %200 ], [ %.115, %182 ]
  ret i1 %.2

204:                                              ; preds = %201, %188
  %.merged = phi { ptr, i32 } [ %.pn35.pn.pn.pn.pn.pn, %188 ], [ %202, %201 ]
  resume { ptr, i32 } %.merged

205:                                              ; preds = %201
  %206 = landingpad { ptr, i32 }
          catch ptr null
  %207 = extractvalue { ptr, i32 } %206, 0
  call void @__clang_call_terminate(ptr %207) #9
  unreachable
}

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

; Function Attrs: nofree nosync nounwind memory(none)
declare i32 @llvm.eh.typeid.for.p0(ptr) #6

declare ptr @__cxa_begin_catch(ptr) local_unnamed_addr

declare void @__cxa_end_catch() local_unnamed_addr

; Function Attrs: noinline noreturn nounwind uwtable
declare hidden void @__clang_call_terminate(ptr noundef) local_unnamed_addr #7

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 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 #3 align 2

declare void @_ZN6qtorch9LineGraphC1ESt10shared_ptrINS_7NetworkEE(ptr, ptr) local_unnamed_addr

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 = { 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 = { 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 #6 = { nofree nosync nounwind memory(none) }
attributes #7 = { noinline noreturn nounwind uwtable "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 nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}


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