; LLVM IR from aspuru-guzik-group/qtorch :: src/tests.ll (Z20testRotationCircuitsRSt14basic_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.std::basic_ofstream" = type { %"class.std::basic_ostream.base", %"class.std::basic_filebuf", %"class.std::basic_ios" }
%"class.std::basic_ostream.base" = type { ptr }
%"class.std::basic_filebuf" = type { %"class.std::basic_streambuf", %union.pthread_mutex_t, %"class.std::__basic_file", i32, %struct.__mbstate_t, %struct.__mbstate_t, %struct.__mbstate_t, ptr, i64, i8, i8, i8, i8, ptr, ptr, i8, ptr, ptr, i64, ptr, ptr }
%"class.std::basic_streambuf" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, %"class.std::locale" }
%"class.std::locale" = type { ptr }
%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }
%"class.std::__basic_file" = type <{ ptr, i8, [7 x i8] }>
%struct.__mbstate_t = type { i32, %union.anon }
%union.anon = type { i32 }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.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 }

@.str.21 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.106 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.116 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.118 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.119 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.136 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.137 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.138 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.139 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.140 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.141 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.142 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.143 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.144 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.145 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.146 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.147 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.148 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.149 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.150 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.151 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.152 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.153 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.154 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.155 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.156 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.157 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.158 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.159 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.160 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.161 = external hidden unnamed_addr constant [21 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

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

; 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 uwtable
declare void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE5closeEv(ptr noundef nonnull align 8 dereferenceable(248)) #2 align 2

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

; Function Attrs: mustprogress uwtable
declare void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248), ptr noundef, i32 noundef) unnamed_addr #2 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: mustprogress uwtable
declare void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE4openEPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248), ptr noundef, i32 noundef) #2 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 @_Z20testRotationCircuitsRSt14basic_ofstreamIcSt11char_traitsIcEE(ptr noundef nonnull align 8 dereferenceable(248) %0) #2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca i8, align 1
  %5 = alloca %"class.std::basic_ofstream", align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca %"class.std::basic_ofstream", align 8
  %9 = alloca %"class.qtorch::ContractionTools", align 8
  %10 = alloca %"class.std::__cxx11::basic_string", align 8
  %11 = alloca %"class.std::allocator", align 1
  %12 = alloca %"class.std::__cxx11::basic_string", align 8
  %13 = alloca %"class.std::allocator", align 1
  %14 = alloca %"class.std::shared_ptr.178", align 8
  %15 = alloca %"class.std::complex", align 8
  %16 = alloca %"class.std::complex", align 8
  %17 = alloca %"class.std::basic_ofstream", align 8
  %18 = alloca %"class.qtorch::ContractionTools", align 8
  %19 = alloca %"class.std::__cxx11::basic_string", align 8
  %20 = alloca %"class.std::allocator", align 1
  %21 = alloca %"class.std::__cxx11::basic_string", align 8
  %22 = alloca %"class.std::allocator", align 1
  %23 = alloca %"class.std::shared_ptr.178", align 8
  %24 = alloca %"class.std::complex", align 8
  %25 = alloca %"class.std::complex", align 8
  %26 = alloca %"class.qtorch::ContractionTools", align 8
  %27 = alloca %"class.std::__cxx11::basic_string", align 8
  %28 = alloca %"class.std::allocator", align 1
  %29 = alloca %"class.std::__cxx11::basic_string", align 8
  %30 = alloca %"class.std::allocator", align 1
  %31 = alloca %"class.std::shared_ptr.178", align 8
  %32 = alloca %"class.std::complex", align 8
  %33 = alloca %"class.std::complex", align 8
  %34 = alloca %"class.qtorch::ContractionTools", align 8
  %35 = alloca %"class.std::__cxx11::basic_string", align 8
  %36 = alloca %"class.std::allocator", align 1
  %37 = alloca %"class.std::__cxx11::basic_string", align 8
  %38 = alloca %"class.std::allocator", align 1
  %39 = alloca %"class.std::shared_ptr.178", align 8
  %40 = alloca %"class.std::complex", align 8
  %41 = alloca %"class.std::complex", align 8
  %42 = alloca %"class.qtorch::ContractionTools", align 8
  %43 = alloca %"class.std::__cxx11::basic_string", align 8
  %44 = alloca %"class.std::allocator", align 1
  %45 = alloca %"class.std::__cxx11::basic_string", align 8
  %46 = alloca %"class.std::allocator", align 1
  %47 = alloca %"class.std::shared_ptr.178", align 8
  %48 = alloca %"class.std::complex", align 8
  %49 = alloca %"class.std::complex", align 8
  %50 = alloca %"class.qtorch::ContractionTools", align 8
  %51 = alloca %"class.std::__cxx11::basic_string", align 8
  %52 = alloca %"class.std::allocator", align 1
  %53 = alloca %"class.std::__cxx11::basic_string", align 8
  %54 = alloca %"class.std::allocator", align 1
  %55 = alloca %"class.std::shared_ptr.178", align 8
  %56 = alloca %"class.std::complex", align 8
  %57 = alloca %"class.std::complex", align 8
  %58 = alloca %"class.qtorch::ContractionTools", align 8
  %59 = alloca %"class.std::__cxx11::basic_string", align 8
  %60 = alloca %"class.std::allocator", align 1
  %61 = alloca %"class.std::__cxx11::basic_string", align 8
  %62 = alloca %"class.std::allocator", align 1
  %63 = alloca %"class.std::shared_ptr.178", align 8
  %64 = alloca %"class.std::complex", align 8
  %65 = alloca %"class.std::complex", align 8
  %66 = alloca %"class.qtorch::ContractionTools", align 8
  %67 = alloca %"class.std::__cxx11::basic_string", align 8
  %68 = alloca %"class.std::allocator", align 1
  %69 = alloca %"class.std::__cxx11::basic_string", align 8
  %70 = alloca %"class.std::allocator", align 1
  %71 = alloca %"class.std::shared_ptr.178", align 8
  %72 = alloca %"class.std::complex", align 8
  %73 = alloca %"class.std::complex", align 8
  %74 = alloca %"class.qtorch::ContractionTools", align 8
  %75 = alloca %"class.std::__cxx11::basic_string", align 8
  %76 = alloca %"class.std::allocator", align 1
  %77 = alloca %"class.std::__cxx11::basic_string", align 8
  %78 = alloca %"class.std::allocator", align 1
  %79 = alloca %"class.std::shared_ptr.178", align 8
  %80 = alloca %"class.std::complex", align 8
  %81 = alloca %"class.std::complex", align 8
  %82 = alloca %"class.qtorch::ContractionTools", align 8
  %83 = alloca %"class.std::__cxx11::basic_string", align 8
  %84 = alloca %"class.std::allocator", align 1
  %85 = alloca %"class.std::__cxx11::basic_string", align 8
  %86 = alloca %"class.std::allocator", align 1
  %87 = alloca %"class.std::shared_ptr.178", align 8
  %88 = alloca %"class.std::complex", align 8
  %89 = alloca %"class.std::complex", align 8
  %90 = alloca %"class.qtorch::ContractionTools", align 8
  %91 = alloca %"class.std::__cxx11::basic_string", align 8
  %92 = alloca %"class.std::allocator", align 1
  %93 = alloca %"class.std::__cxx11::basic_string", align 8
  %94 = alloca %"class.std::allocator", align 1
  %95 = alloca %"class.std::shared_ptr.178", align 8
  %96 = alloca %"class.std::complex", align 8
  %97 = alloca %"class.std::complex", align 8
  %98 = alloca %"class.qtorch::ContractionTools", align 8
  %99 = alloca %"class.std::__cxx11::basic_string", align 8
  %100 = alloca %"class.std::allocator", align 1
  %101 = alloca %"class.std::__cxx11::basic_string", align 8
  %102 = alloca %"class.std::allocator", align 1
  %103 = alloca %"class.std::shared_ptr.178", align 8
  %104 = alloca %"class.std::complex", align 8
  %105 = alloca %"class.std::complex", align 8
  %106 = alloca %"class.qtorch::ContractionTools", align 8
  %107 = alloca %"class.std::__cxx11::basic_string", align 8
  %108 = alloca %"class.std::allocator", align 1
  %109 = alloca %"class.std::__cxx11::basic_string", align 8
  %110 = alloca %"class.std::allocator", align 1
  %111 = alloca %"class.std::shared_ptr.178", align 8
  %112 = alloca %"class.std::complex", align 8
  %113 = alloca %"class.std::complex", align 8
  %114 = alloca %"class.qtorch::ContractionTools", align 8
  %115 = alloca %"class.std::__cxx11::basic_string", align 8
  %116 = alloca %"class.std::allocator", align 1
  %117 = alloca %"class.std::__cxx11::basic_string", align 8
  %118 = alloca %"class.std::allocator", align 1
  %119 = alloca %"class.std::shared_ptr.178", align 8
  %120 = alloca %"class.std::complex", align 8
  %121 = alloca %"class.std::complex", align 8
  %122 = alloca %"class.qtorch::ContractionTools", align 8
  %123 = alloca %"class.std::__cxx11::basic_string", align 8
  %124 = alloca %"class.std::allocator", align 1
  %125 = alloca %"class.std::__cxx11::basic_string", align 8
  %126 = alloca %"class.std::allocator", align 1
  %127 = alloca %"class.std::shared_ptr.178", align 8
  %128 = alloca %"class.std::complex", align 8
  %129 = alloca %"class.std::complex", align 8
  %130 = alloca %"class.qtorch::ContractionTools", align 8
  %131 = alloca %"class.std::__cxx11::basic_string", align 8
  %132 = alloca %"class.std::allocator", align 1
  %133 = alloca %"class.std::__cxx11::basic_string", align 8
  %134 = alloca %"class.std::allocator", align 1
  %135 = alloca %"class.std::shared_ptr.178", align 8
  %136 = alloca %"class.std::complex", align 8
  %137 = alloca %"class.std::complex", align 8
  %138 = alloca %"class.qtorch::ContractionTools", align 8
  %139 = alloca %"class.std::__cxx11::basic_string", align 8
  %140 = alloca %"class.std::allocator", align 1
  %141 = alloca %"class.std::__cxx11::basic_string", align 8
  %142 = alloca %"class.std::allocator", align 1
  %143 = alloca %"class.std::shared_ptr.178", align 8
  %144 = alloca %"class.std::complex", align 8
  %145 = alloca %"class.std::complex", align 8
  %146 = alloca %"class.qtorch::ContractionTools", align 8
  %147 = alloca %"class.std::__cxx11::basic_string", align 8
  %148 = alloca %"class.std::allocator", align 1
  %149 = alloca %"class.std::__cxx11::basic_string", align 8
  %150 = alloca %"class.std::allocator", align 1
  %151 = alloca %"class.std::shared_ptr.178", align 8
  %152 = alloca %"class.std::complex", align 8
  %153 = alloca %"class.std::complex", align 8
  %154 = alloca %"class.std::__cxx11::basic_string", align 8
  %155 = alloca %"class.std::allocator", align 1
  %156 = alloca %"class.std::__cxx11::basic_string", align 8
  %157 = alloca %"class.std::allocator", align 1
  store ptr %0, ptr %2, align 8, !tbaa !5
  %158 = load ptr, ptr %2, align 8, !tbaa !5
  %159 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %158, ptr noundef @.str.136)
  %160 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %159, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %161 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %160, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  store i32 0, ptr %3, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %4) #6
  store i8 1, ptr %4, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 512, ptr %5) #6
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248) %5, ptr noundef @.str.118, i32 noundef 16)
  %162 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef @.str.119)
          to label %163 unwind label %213

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

165:                                              ; preds = %163
  %166 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef @.str.137)
          to label %167 unwind label %213

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

169:                                              ; preds = %167
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE5closeEv(ptr noundef nonnull align 8 dereferenceable(248) %5)
          to label %170 unwind label %213

170:                                              ; preds = %169
  call void @llvm.lifetime.start.p0(i64 512, ptr %8) #6
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248) %8, ptr noundef @.str.106, i32 noundef 16)
          to label %171 unwind label %217

171:                                              ; preds = %170
  %172 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef @.str.21)
          to label %173 unwind label %221

173:                                              ; preds = %171
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE5closeEv(ptr noundef nonnull align 8 dereferenceable(248) %8)
          to label %174 unwind label %221

174:                                              ; preds = %173
  call void @llvm.lifetime.start.p0(i64 10128, ptr %9) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr %10) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %11) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %10, ptr noundef @.str.118, ptr noundef nonnull align 1 dereferenceable(1) %11)
          to label %175 unwind label %225

175:                                              ; preds = %174
  call void @llvm.lifetime.start.p0(i64 32, ptr %12) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %13) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %12, ptr noundef @.str.106, ptr noundef nonnull align 1 dereferenceable(1) %13)
          to label %176 unwind label %229

176:                                              ; preds = %175
  invoke void @_ZN6qtorch16ContractionToolsC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_i(ptr noundef nonnull align 8 dereferenceable(10128) %9, ptr noundef nonnull align 8 dereferenceable(32) %10, ptr noundef nonnull align 8 dereferenceable(32) %12, i32 noundef 8)
          to label %177 unwind label %233

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

178:                                              ; preds = %177
  call void @_ZNSt12__shared_ptrIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %14) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %15) #6
  %179 = call { double, double } @_ZN6qtorch16ContractionTools11GetFinalValEv(ptr noundef nonnull align 8 dereferenceable(10128) %9) #6
  %180 = getelementptr inbounds %"class.std::complex", ptr %15, i32 0, i32 0
  %181 = getelementptr inbounds { double, double }, ptr %180, i32 0, i32 0
  %182 = extractvalue { double, double } %179, 0
  store double %182, ptr %181, align 8
  %183 = getelementptr inbounds { double, double }, ptr %180, i32 0, i32 1
  %184 = extractvalue { double, double } %179, 1
  store double %184, ptr %183, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %16) #6
  %185 = invoke noundef double @_ZNKSt7complexIdE4realB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(16) %15)
          to label %186 unwind label %243

186:                                              ; preds = %178
  %187 = fsub double %185, 9.983340e-02
  %188 = invoke noundef double @_ZSt3absd(double noundef %187)
          to label %189 unwind label %243

189:                                              ; preds = %186
  %190 = fcmp ogt double %188, 1.000000e-05
  br i1 %190, label %203, label %191

191:                                              ; preds = %189
  %192 = call { double, double } @_ZN6qtorch16ContractionTools11GetFinalValEv(ptr noundef nonnull align 8 dereferenceable(10128) %9) #6
  %193 = getelementptr inbounds %"class.std::complex", ptr %16, i32 0, i32 0
  %194 = getelementptr inbounds { double, double }, ptr %193, i32 0, i32 0
  %195 = extractvalue { double, double } %192, 0
  store double %195, ptr %194, align 8
  %196 = getelementptr inbounds { double, double }, ptr %193, i32 0, i32 1
  %197 = extractvalue { double, double } %192, 1
  store double %197, ptr %196, align 8
  %198 = invoke noundef double @_ZNKSt7complexIdE4imagB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(16) %16)
          to label %199 unwind label %247

199:                                              ; preds = %191
  %200 = invoke noundef double @_ZSt3absd(double noundef %198)
          to label %201 unwind label %247

201:                                              ; preds = %199
  %202 = fcmp ogt double %200, 1.000000e-05
  br label %203

203:                                              ; preds = %201, %189
  %204 = phi i1 [ true, %189 ], [ %202, %201 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #6
  br i1 %204, label %205, label %252

205:                                              ; preds = %203
  %206 = load ptr, ptr %2, align 8, !tbaa !5
  %207 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %206, ptr noundef @.str.138)
          to label %208 unwind label %239

208:                                              ; preds = %205
  %209 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %207, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %210 unwind label %239

210:                                              ; preds = %208
  %211 = load i32, ptr %3, align 4, !tbaa !9
  %212 = add nsw i32 %211, 1
  store i32 %212, ptr %3, align 4, !tbaa !9
  store i8 0, ptr %4, align 1, !tbaa !11
  br label %252

213:                                              ; preds = %169, %167, %165, %163, %1
  %214 = landingpad { ptr, i32 }
          cleanup
  %215 = extractvalue { ptr, i32 } %214, 0
  store ptr %215, ptr %6, align 8
  %216 = extractvalue { ptr, i32 } %214, 1
  store i32 %216, ptr %7, align 4
  br label %1575

217:                                              ; preds = %170
  %218 = landingpad { ptr, i32 }
          cleanup
  %219 = extractvalue { ptr, i32 } %218, 0
  store ptr %219, ptr %6, align 8
  %220 = extractvalue { ptr, i32 } %218, 1
  store i32 %220, ptr %7, align 4
  br label %1574

221:                                              ; preds = %173, %171
  %222 = landingpad { ptr, i32 }
          cleanup
  %223 = extractvalue { ptr, i32 } %222, 0
  store ptr %223, ptr %6, align 8
  %224 = extractvalue { ptr, i32 } %222, 1
  store i32 %224, ptr %7, align 4
  br label %1573

225:                                              ; preds = %174
  %226 = landingpad { ptr, i32 }
          cleanup
  %227 = extractvalue { ptr, i32 } %226, 0
  store ptr %227, ptr %6, align 8
  %228 = extractvalue { ptr, i32 } %226, 1
  store i32 %228, ptr %7, align 4
  br label %238

229:                                              ; preds = %175
  %230 = landingpad { ptr, i32 }
          cleanup
  %231 = extractvalue { ptr, i32 } %230, 0
  store ptr %231, ptr %6, align 8
  %232 = extractvalue { ptr, i32 } %230, 1
  store i32 %232, ptr %7, align 4
  br label %237

233:                                              ; preds = %176
  %234 = landingpad { ptr, i32 }
          cleanup
  %235 = extractvalue { ptr, i32 } %234, 0
  store ptr %235, ptr %6, align 8
  %236 = extractvalue { ptr, i32 } %234, 1
  store i32 %236, ptr %7, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #6
  br label %237

237:                                              ; preds = %233, %229
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #6
  br label %238

238:                                              ; preds = %237, %225
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %10) #6
  br label %1572

239:                                              ; preds = %208, %205, %177
  %240 = landingpad { ptr, i32 }
          cleanup
  %241 = extractvalue { ptr, i32 } %240, 0
  store ptr %241, ptr %6, align 8
  %242 = extractvalue { ptr, i32 } %240, 1
  store i32 %242, ptr %7, align 4
  br label %1571

243:                                              ; preds = %186, %178
  %244 = landingpad { ptr, i32 }
          cleanup
  %245 = extractvalue { ptr, i32 } %244, 0
  store ptr %245, ptr %6, align 8
  %246 = extractvalue { ptr, i32 } %244, 1
  store i32 %246, ptr %7, align 4
  br label %251

247:                                              ; preds = %199, %191
  %248 = landingpad { ptr, i32 }
          cleanup
  %249 = extractvalue { ptr, i32 } %248, 0
  store ptr %249, ptr %6, align 8
  %250 = extractvalue { ptr, i32 } %248, 1
  store i32 %250, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #6
  br label %251

251:                                              ; preds = %247, %243
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #6
  br label %1571

252:                                              ; preds = %210, %203
  call void @llvm.lifetime.start.p0(i64 512, ptr %17) #6
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248) %17, ptr noundef @.str.106, i32 noundef 16)
          to label %253 unwind label %294

253:                                              ; preds = %252
  %254 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %17, ptr noundef @.str.22)
          to label %255 unwind label %298

255:                                              ; preds = %253
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE5closeEv(ptr noundef nonnull align 8 dereferenceable(248) %17)
          to label %256 unwind label %298

256:                                              ; preds = %255
  call void @llvm.lifetime.start.p0(i64 10128, ptr %18) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr %19) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %20) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %20) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %19, ptr noundef @.str.118, ptr noundef nonnull align 1 dereferenceable(1) %20)
          to label %257 unwind label %302

257:                                              ; preds = %256
  call void @llvm.lifetime.start.p0(i64 32, ptr %21) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %22) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %22) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %21, ptr noundef @.str.106, ptr noundef nonnull align 1 dereferenceable(1) %22)
          to label %258 unwind label %306

258:                                              ; preds = %257
  invoke void @_ZN6qtorch16ContractionToolsC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_i(ptr noundef nonnull align 8 dereferenceable(10128) %18, ptr noundef nonnull align 8 dereferenceable(32) %19, ptr noundef nonnull align 8 dereferenceable(32) %21, i32 noundef 8)
          to label %259 unwind label %310

259:                                              ; preds = %258
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %21) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %22) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %22) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %21) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %20) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %19) #6
  invoke void @_ZN6qtorch16ContractionTools8ContractENS_15ContractionTypeEii(ptr dead_on_unwind writable sret(%"class.std::shared_ptr.178") align 8 %23, ptr noundef nonnull align 8 dereferenceable(10128) %18, i32 noundef 0, i32 noundef 1, i32 noundef 1)
          to label %260 unwind label %316

260:                                              ; preds = %259
  call void @_ZNSt12__shared_ptrIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %23) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %24) #6
  %261 = call { double, double } @_ZN6qtorch16ContractionTools11GetFinalValEv(ptr noundef nonnull align 8 dereferenceable(10128) %18) #6
  %262 = getelementptr inbounds %"class.std::complex", ptr %24, i32 0, i32 0
  %263 = getelementptr inbounds { double, double }, ptr %262, i32 0, i32 0
  %264 = extractvalue { double, double } %261, 0
  store double %264, ptr %263, align 8
  %265 = getelementptr inbounds { double, double }, ptr %262, i32 0, i32 1
  %266 = extractvalue { double, double } %261, 1
  store double %266, ptr %265, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %25) #6
  %267 = invoke noundef double @_ZNKSt7complexIdE4realB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(16) %24)
          to label %268 unwind label %320

268:                                              ; preds = %260
  %269 = invoke noundef double @_ZSt3absd(double noundef %267)
          to label %270 unwind label %320

270:                                              ; preds = %268
  %271 = fcmp ogt double %269, 1.000000e-05
  br i1 %271, label %284, label %272

272:                                              ; preds = %270
  %273 = call { double, double } @_ZN6qtorch16ContractionTools11GetFinalValEv(ptr noundef nonnull align 8 dereferenceable(10128) %18) #6
  %274 = getelementptr inbounds %"class.std::complex", ptr %25, i32 0, i32 0
  %275 = getelementptr inbounds { double, double }, ptr %274, i32 0, i32 0
  %276 = extractvalue { double, double } %273, 0
  store double %276, ptr %275, align 8
  %277 = getelementptr inbounds { double, double }, ptr %274, i32 0, i32 1
  %278 = extractvalue { double, double } %273, 1
  store double %278, ptr %277, align 8
  %279 = invoke noundef double @_ZNKSt7complexIdE4imagB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(16) %25)
          to label %280 unwind label %324

280:                                              ; preds = %272
  %281 = invoke noundef double @_ZSt3absd(double noundef %279)
          to label %282 unwind label %324

282:                                              ; preds = %280
  %283 = fcmp ogt double %281, 1.000000e-05
  br label %284

284:                                              ; preds = %282, %270
  %285 = phi i1 [ true, %270 ], [ %283, %282 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr %25) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %24) #6
  br i1 %285, label %286, label %329

286:                                              ; preds = %284
  %287 = load ptr, ptr %2, align 8, !tbaa !5
  %288 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %287, ptr noundef @.str.139)
          to label %289 unwind label %316

289:                                              ; preds = %286
  %290 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %288, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %291 unwind label %316

291:                                              ; preds = %289
  %292 = load i32, ptr %3, align 4, !tbaa !9
  %293 = add nsw i32 %292, 1
  store i32 %293, ptr %3, align 4, !tbaa !9
  store i8 0, ptr %4, align 1, !tbaa !11
  br label %329

294:                                              ; preds = %252
  %295 = landingpad { ptr, i32 }
          cleanup
  %296 = extractvalue { ptr, i32 } %295, 0
  store ptr %296, ptr %6, align 8
  %297 = extractvalue { ptr, i32 } %295, 1
  store i32 %297, ptr %7, align 4
  br label %1570

298:                                              ; preds = %255, %253
  %299 = landingpad { ptr, i32 }
          cleanup
  %300 = extractvalue { ptr, i32 } %299, 0
  store ptr %300, ptr %6, align 8
  %301 = extractvalue { ptr, i32 } %299, 1
  store i32 %301, ptr %7, align 4
  br label %1569

302:                                              ; preds = %256
  %303 = landingpad { ptr, i32 }
          cleanup
  %304 = extractvalue { ptr, i32 } %303, 0
  store ptr %304, ptr %6, align 8
  %305 = extractvalue { ptr, i32 } %303, 1
  store i32 %305, ptr %7, align 4
  br label %315

306:                                              ; preds = %257
  %307 = landingpad { ptr, i32 }
          cleanup
  %308 = extractvalue { ptr, i32 } %307, 0
  store ptr %308, ptr %6, align 8
  %309 = extractvalue { ptr, i32 } %307, 1
  store i32 %309, ptr %7, align 4
  br label %314

310:                                              ; preds = %258
  %311 = landingpad { ptr, i32 }
          cleanup
  %312 = extractvalue { ptr, i32 } %311, 0
  store ptr %312, ptr %6, align 8
  %313 = extractvalue { ptr, i32 } %311, 1
  store i32 %313, ptr %7, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %21) #6
  br label %314

314:                                              ; preds = %310, %306
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %22) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %22) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %21) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #6
  br label %315

315:                                              ; preds = %314, %302
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %20) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %19) #6
  br label %1568

316:                                              ; preds = %332, %330, %329, %289, %286, %259
  %317 = landingpad { ptr, i32 }
          cleanup
  %318 = extractvalue { ptr, i32 } %317, 0
  store ptr %318, ptr %6, align 8
  %319 = extractvalue { ptr, i32 } %317, 1
  store i32 %319, ptr %7, align 4
  br label %1567

320:                                              ; preds = %268, %260
  %321 = landingpad { ptr, i32 }
          cleanup
  %322 = extractvalue { ptr, i32 } %321, 0
  store ptr %322, ptr %6, align 8
  %323 = extractvalue { ptr, i32 } %321, 1
  store i32 %323, ptr %7, align 4
  br label %328

324:                                              ; preds = %280, %272
  %325 = landingpad { ptr, i32 }
          cleanup
  %326 = extractvalue { ptr, i32 } %325, 0
  store ptr %326, ptr %6, align 8
  %327 = extractvalue { ptr, i32 } %325, 1
  store i32 %327, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %25) #6
  br label %328

328:                                              ; preds = %324, %320
  call void @llvm.lifetime.end.p0(i64 16, ptr %24) #6
  br label %1567

329:                                              ; preds = %291, %284
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE4openEPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248) %8, ptr noundef @.str.106, i32 noundef 16)
          to label %330 unwind label %316

330:                                              ; preds = %329
  %331 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef @.str.23)
          to label %332 unwind label %316

332:                                              ; preds = %330
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE5closeEv(ptr noundef nonnull align 8 dereferenceable(248) %8)
          to label %333 unwind label %316

333:                                              ; preds = %332
  call void @llvm.lifetime.start.p0(i64 10128, ptr %26) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr %27) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %28) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %28) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %27, ptr noundef @.str.118, ptr noundef nonnull align 1 dereferenceable(1) %28)
          to label %334 unwind label %372

334:                                              ; preds = %333
  call void @llvm.lifetime.start.p0(i64 32, ptr %29) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %30) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %30) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %29, ptr noundef @.str.106, ptr noundef nonnull align 1 dereferenceable(1) %30)
          to label %335 unwind label %376

335:                                              ; preds = %334
  invoke void @_ZN6qtorch16ContractionToolsC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_i(ptr noundef nonnull align 8 dereferenceable(10128) %26, ptr noundef nonnull align 8 dereferenceable(32) %27, ptr noundef nonnull align 8 dereferenceable(32) %29, i32 noundef 8)
          to label %336 unwind label %380

336:                                              ; preds = %335
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %29) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %30) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %30) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %29) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %27) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %28) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %28) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %27) #6
  invoke void @_ZN6qtorch16ContractionTools8ContractENS_15ContractionTypeEii(ptr dead_on_unwind writable sret(%"class.std::shared_ptr.178") align 8 %31, ptr noundef nonnull align 8 dereferenceable(10128) %26, i32 noundef 0, i32 noundef 1, i32 noundef 1)
          to label %337 unwind label %386

337:                                              ; preds = %336
  call void @_ZNSt12__shared_ptrIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %31) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %32) #6
  %338 = call { double, double } @_ZN6qtorch16ContractionTools11GetFinalValEv(ptr noundef nonnull align 8 dereferenceable(10128) %26) #6
  %339 = getelementptr inbounds %"class.std::complex", ptr %32, i32 0, i32 0
  %340 = getelementptr inbounds { double, double }, ptr %339, i32 0, i32 0
  %341 = extractvalue { double, double } %338, 0
  store double %341, ptr %340, align 8
  %342 = getelementptr inbounds { double, double }, ptr %339, i32 0, i32 1
  %343 = extractvalue { double, double } %338, 1
  store double %343, ptr %342, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %33) #6
  %344 = invoke noundef double @_ZNKSt7complexIdE4realB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(16) %32)
          to label %345 unwind label %390

345:                                              ; preds = %337
  %346 = fsub double %344, 0x3FEFD712A0EC7432
  %347 = invoke noundef double @_ZSt3absd(double noundef %346)
          to label %348 unwind label %390

348:                                              ; preds = %345
  %349 = fcmp ogt double %347, 1.000000e-05
  br i1 %349, label %362, label %350

350:                                              ; preds = %348
  %351 = call { double, double } @_ZN6qtorch16ContractionTools11GetFinalValEv(ptr noundef nonnull align 8 dereferenceable(10128) %26) #6
  %352 = getelementptr inbounds %"class.std::complex", ptr %33, i32 0, i32 0
  %353 = getelementptr inbounds { double, double }, ptr %352, i32 0, i32 0
  %354 = extractvalue { double, double } %351, 0
  store double %354, ptr %353, align 8
  %355 = getelementptr inbounds { double, double }, ptr %352, i32 0, i32 1
  %356 = extractvalue { double, double } %351, 1
  store double %356, ptr %355, align 8
  %357 = invoke noundef double @_ZNKSt7complexIdE4imagB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(16) %33)
          to label %358 unwind label %394

358:                                              ; preds = %350
  %359 = invoke noundef double @_ZSt3absd(double noundef %357)
          to label %360 unwind label %394

360:                                              ; preds = %358
  %361 = fcmp ogt double %359, 1.000000e-05
  br label %362

362:                                              ; preds = %360, %348
  %363 = phi i1 [ true, %348 ], [ %361, %360 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr %33) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %32) #6
  br i1 %363, label %364, label %399

364:                                              ; preds = %362
  %365 = load ptr, ptr %2, align 8, !tbaa !5
  %366 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %365, ptr noundef @.str.140)
          to label %367 unwind label %386

367:                                              ; preds = %364
  %368 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %366, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %369 unwind label %386

369:                                              ; preds = %367
  %370 = load i32, ptr %3, align 4, !tbaa !9
  %371 = add nsw i32 %370, 1
  store i32 %371, ptr %3, align 4, !tbaa !9
  store i8 0, ptr %4, align 1, !tbaa !11
  br label %399

372:                                              ; preds = %333
  %373 = landingpad { ptr, i32 }
          cleanup
  %374 = extractvalue { ptr, i32 } %373, 0
  store ptr %374, ptr %6, align 8
  %375 = extractvalue { ptr, i32 } %373, 1
  store i32 %375, ptr %7, align 4
  br label %385

376:                                              ; preds = %334
  %377 = landingpad { ptr, i32 }
          cleanup
  %378 = extractvalue { ptr, i32 } %377, 0
  store ptr %378, ptr %6, align 8
  %379 = extractvalue { ptr, i32 } %377, 1
  store i32 %379, ptr %7, align 4
  br label %384

380:                                              ; preds = %335
  %381 = landingpad { ptr, i32 }
          cleanup
  %382 = extractvalue { ptr, i32 } %381, 0
  store ptr %382, ptr %6, align 8
  %383 = extractvalue { ptr, i32 } %381, 1
  store i32 %383, ptr %7, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %29) #6
  br label %384

384:                                              ; preds = %380, %376
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %30) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %30) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %29) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %27) #6
  br label %385

385:                                              ; preds = %384, %372
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %28) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %28) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %27) #6
  br label %1566

386:                                              ; preds = %412, %410, %409, %408, %406, %404, %402, %400, %399, %367, %364, %336
  %387 = landingpad { ptr, i32 }
          cleanup
  %388 = extractvalue { ptr, i32 } %387, 0
  store ptr %388, ptr %6, align 8
  %389 = extractvalue { ptr, i32 } %387, 1
  store i32 %389, ptr %7, align 4
  br label %1565

390:                                              ; preds = %345, %337
  %391 = landingpad { ptr, i32 }
          cleanup
  %392 = extractvalue { ptr, i32 } %391, 0
  store ptr %392, ptr %6, align 8
  %393 = extractvalue { ptr, i32 } %391, 1
  store i32 %393, ptr %7, align 4
  br label %398

394:                                              ; preds = %358, %350
  %395 = landingpad { ptr, i32 }
          cleanup
  %396 = extractvalue { ptr, i32 } %395, 0
  store ptr %396, ptr %6, align 8
  %397 = extractvalue { ptr, i32 } %395, 1
  store i32 %397, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %33) #6
  br label %398

398:                                              ; preds = %394, %390
  call void @llvm.lifetime.end.p0(i64 16, ptr %32) #6
  br label %1565

399:                                              ; preds = %369, %362
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE4openEPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248) %5, ptr noundef @.str.118, i32 noundef 16)
          to label %400 unwind label %386

400:                                              ; preds = %399
  %401 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef @.str.119)
          to label %402 unwind label %386

402:                                              ; preds = %400
  %403 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %401, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %404 unwind label %386

404:                                              ; preds = %402
  %405 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef @.str.141)
          to label %406 unwind label %386

406:                                              ; preds = %404
  %407 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %405, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %408 unwind label %386

408:                                              ; preds = %406
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE5closeEv(ptr noundef nonnull align 8 dereferenceable(248) %5)
          to label %409 unwind label %386

409:                                              ; preds = %408
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE4openEPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248) %8, ptr noundef @.str.106, i32 noundef 16)
          to label %410 unwind label %386

410:                                              ; preds = %409
  %411 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef @.str.21)
          to label %412 unwind label %386

412:                                              ; preds = %410
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE5closeEv(ptr noundef nonnull align 8 dereferenceable(248) %8)
          to label %413 unwind label %386

413:                                              ; preds = %412
  call void @llvm.lifetime.start.p0(i64 10128, ptr %34) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr %35) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %36) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %36) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %35, ptr noundef @.str.118, ptr noundef nonnull align 1 dereferenceable(1) %36)
          to label %414 unwind label %452

414:                                              ; preds = %413
  call void @llvm.lifetime.start.p0(i64 32, ptr %37) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %38) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %38) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %37, ptr noundef @.str.106, ptr noundef nonnull align 1 dereferenceable(1) %38)
          to label %415 unwind label %456

415:                                              ; preds = %414
  invoke void @_ZN6qtorch16ContractionToolsC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_i(ptr noundef nonnull align 8 dereferenceable(10128) %34, ptr noundef nonnull align 8 dereferenceable(32) %35, ptr noundef nonnull align 8 dereferenceable(32) %37, i32 noundef 8)
          to label %416 unwind label %460

416:                                              ; preds = %415
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %37) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %38) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %38) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %37) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %35) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %36) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %36) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %35) #6
  invoke void @_ZN6qtorch16ContractionTools8ContractENS_15ContractionTypeEii(ptr dead_on_unwind writable sret(%"class.std::shared_ptr.178") align 8 %39, ptr noundef nonnull align 8 dereferenceable(10128) %34, i32 noundef 0, i32 noundef 1, i32 noundef 1)
          to label %417 unwind label %466

417:                                              ; preds = %416
  call void @_ZNSt12__shared_ptrIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %39) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %40) #6
  %418 = call { double, double } @_ZN6qtorch16ContractionTools11GetFinalValEv(ptr noundef nonnull align 8 dereferenceable(10128) %34) #6
  %419 = getelementptr inbounds %"class.std::complex", ptr %40, i32 0, i32 0
  %420 = getelementptr inbounds { double, double }, ptr %419, i32 0, i32 0
  %421 = extractvalue { double, double } %418, 0
  store double %421, ptr %420, align 8
  %422 = getelementptr inbounds { double, double }, ptr %419, i32 0, i32 1
  %423 = extractvalue { double, double } %418, 1
  store double %423, ptr %422, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %41) #6
  %424 = invoke noundef double @_ZNKSt7complexIdE4realB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(16) %40)
          to label %425 unwind label %470

425:                                              ; preds = %417
  %426 = fadd double %424, 0x3FB98EAECB8BC33F
  %427 = invoke noundef double @_ZSt3absd(double noundef %426)
          to label %428 unwind label %470

428:                                              ; preds = %425
  %429 = fcmp ogt double %427, 1.000000e-05
  br i1 %429, label %442, label %430

430:                                              ; preds = %428
  %431 = call { double, double } @_ZN6qtorch16ContractionTools11GetFinalValEv(ptr noundef nonnull align 8 dereferenceable(10128) %34) #6
  %432 = getelementptr inbounds %"class.std::complex", ptr %41, i32 0, i32 0
  %433 = getelementptr inbounds { double, double }, ptr %432, i32 0, i32 0
  %434 = extractvalue { double, double } %431, 0
  store double %434, ptr %433, align 8
  %435 = getelementptr inbounds { double, double }, ptr %432, i32 0, i32 1
  %436 = extractvalue { double, double } %431, 1
  store double %436, ptr %435, align 8
  %437 = invoke noundef double @_ZNKSt7complexIdE4imagB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(16) %41)
          to label %438 unwind label %474

438:                                              ; preds = %430
  %439 = invoke noundef double @_ZSt3absd(double noundef %437)
          to label %440 unwind label %474

440:                                              ; preds = %438
  %441 = fcmp ogt double %439, 1.000000e-05
  br label %442

442:                                              ; preds = %440, %428
  %443 = phi i1 [ true, %428 ], [ %441, %440 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr %41) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %40) #6
  br i1 %443, label %444, label %479

444:                                              ; preds = %442
  %445 = load ptr, ptr %2, align 8, !tbaa !5
  %446 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %445, ptr noundef @.str.142)
          to label %447 unwind label %466

447:                                              ; preds = %444
  %448 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %446, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %449 unwind label %466

449:                                              ; preds = %447
  %450 = load i32, ptr %3, align 4, !tbaa !9
  %451 = add nsw i32 %450, 1
  store i32 %451, ptr %3, align 4, !tbaa !9
  store i8 0, ptr %4, align 1, !tbaa !11
  br label %479

452:                                              ; preds = %413
  %453 = landingpad { ptr, i32 }
          cleanup
  %454 = extractvalue { ptr, i32 } %453, 0
  store ptr %454, ptr %6, align 8
  %455 = extractvalue { ptr, i32 } %453, 1
  store i32 %455, ptr %7, align 4
  br label %465

456:                                              ; preds = %414
  %457 = landingpad { ptr, i32 }
          cleanup
  %458 = extractvalue { ptr, i32 } %457, 0
  store ptr %458, ptr %6, align 8
  %459 = extractvalue { ptr, i32 } %457, 1
  store i32 %459, ptr %7, align 4
  br label %464

460:                                              ; preds = %415
  %461 = landingpad { ptr, i32 }
          cleanup
  %462 = extractvalue { ptr, i32 } %461, 0
  store ptr %462, ptr %6, align 8
  %463 = extractvalue { ptr, i32 } %461, 1
  store i32 %463, ptr %7, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %37) #6
  br label %464

464:                                              ; preds = %460, %456
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %38) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %38) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %37) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %35) #6
  br label %465

465:                                              ; preds = %464, %452
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %36) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %36) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %35) #6
  br label %1564

466:                                              ; preds = %482, %480, %479, %447, %444, %416
  %467 = landingpad { ptr, i32 }
          cleanup
  %468 = extractvalue { ptr, i32 } %467, 0
  store ptr %468, ptr %6, align 8
  %469 = extractvalue { ptr, i32 } %467, 1
  store i32 %469, ptr %7, align 4
  br label %1563

470:                                              ; preds = %425, %417
  %471 = landingpad { ptr, i32 }
          cleanup
  %472 = extractvalue { ptr, i32 } %471, 0
  store ptr %472, ptr %6, align 8
  %473 = extractvalue { ptr, i32 } %471, 1
  store i32 %473, ptr %7, align 4
  br label %478

474:                                              ; preds = %438, %430
  %475 = landingpad { ptr, i32 }
          cleanup
  %476 = extractvalue { ptr, i32 } %475, 0
  store ptr %476, ptr %6, align 8
  %477 = extractvalue { ptr, i32 } %475, 1
  store i32 %477, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %41) #6
  br label %478

478:                                              ; preds = %474, %470
  call void @llvm.lifetime.end.p0(i64 16, ptr %40) #6
  br label %1563

479:                                              ; preds = %449, %442
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE4openEPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248) %8, ptr noundef @.str.106, i32 noundef 16)
          to label %480 unwind label %466

480:                                              ; preds = %479
  %481 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef @.str.22)
          to label %482 unwind label %466

482:                                              ; preds = %480
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE5closeEv(ptr noundef nonnull align 8 dereferenceable(248) %8)
          to label %483 unwind label %466

483:                                              ; preds = %482
  call void @llvm.lifetime.start.p0(i64 10128, ptr %42) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr %43) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %44) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %44) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %43, ptr noundef @.str.118, ptr noundef nonnull align 1 dereferenceable(1) %44)
          to label %484 unwind label %521

484:                                              ; preds = %483
  call void @llvm.lifetime.start.p0(i64 32, ptr %45) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %46) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %46) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %45, ptr noundef @.str.106, ptr noundef nonnull align 1 dereferenceable(1) %46)
          to label %485 unwind label %525

485:                                              ; preds = %484
  invoke void @_ZN6qtorch16ContractionToolsC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_i(ptr noundef nonnull align 8 dereferenceable(10128) %42, ptr noundef nonnull align 8 dereferenceable(32) %43, ptr noundef nonnull align 8 dereferenceable(32) %45, i32 noundef 8)
          to label %486 unwind label %529

486:                                              ; preds = %485
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %45) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %46) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %46) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %45) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %43) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %44) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %44) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %43) #6
  invoke void @_ZN6qtorch16ContractionTools8ContractENS_15ContractionTypeEii(ptr dead_on_unwind writable sret(%"class.std::shared_ptr.178") align 8 %47, ptr noundef nonnull align 8 dereferenceable(10128) %42, i32 noundef 0, i32 noundef 1, i32 noundef 1)
          to label %487 unwind label %535

487:                                              ; preds = %486
  call void @_ZNSt12__shared_ptrIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %47) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %48) #6
  %488 = call { double, double } @_ZN6qtorch16ContractionTools11GetFinalValEv(ptr noundef nonnull align 8 dereferenceable(10128) %42) #6
  %489 = getelementptr inbounds %"class.std::complex", ptr %48, i32 0, i32 0
  %490 = getelementptr inbounds { double, double }, ptr %489, i32 0, i32 0
  %491 = extractvalue { double, double } %488, 0
  store double %491, ptr %490, align 8
  %492 = getelementptr inbounds { double, double }, ptr %489, i32 0, i32 1
  %493 = extractvalue { double, double } %488, 1
  store double %493, ptr %492, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %49) #6
  %494 = invoke noundef double @_ZNKSt7complexIdE4realB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(16) %48)
          to label %495 unwind label %539

495:                                              ; preds = %487
  %496 = invoke noundef double @_ZSt3absd(double noundef %494)
          to label %497 unwind label %539

497:                                              ; preds = %495
  %498 = fcmp ogt double %496, 1.000000e-05
  br i1 %498, label %511, label %499

499:                                              ; preds = %497
  %500 = call { double, double } @_ZN6qtorch16ContractionTools11GetFinalValEv(ptr noundef nonnull align 8 dereferenceable(10128) %42) #6
  %501 = getelementptr inbounds %"class.std::complex", ptr %49, i32 0, i32 0
  %502 = getelementptr inbounds { double, double }, ptr %501, i32 0, i32 0
  %503 = extractvalue { double, double } %500, 0
  store double %503, ptr %502, align 8
  %504 = getelementptr inbounds { double, double }, ptr %501, i32 0, i32 1
  %505 = extractvalue { double, double } %500, 1
  store double %505, ptr %504, align 8
  %506 = invoke noundef double @_ZNKSt7complexIdE4imagB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(16) %49)
          to label %507 unwind label %543

507:                                              ; preds = %499
  %508 = invoke noundef double @_ZSt3absd(double noundef %506)
          to label %509 unwind label %543

509:                                              ; preds = %507
  %510 = fcmp ogt double %508, 1.000000e-05
  br label %511

511:                                              ; preds = %509, %497
  %512 = phi i1 [ true, %497 ], [ %510, %509 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr %49) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %48) #6
  br i1 %512, label %513, label %548

513:                                              ; preds = %511
  %514 = load ptr, ptr %2, align 8, !tbaa !5
  %515 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %514, ptr noundef @.str.143)
          to label %516 unwind label %535

516:                                              ; preds = %513
  %517 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %515, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %518 unwind label %535

518:                                              ; preds = %516
  %519 = load i32, ptr %3, align 4, !tbaa !9
  %520 = add nsw i32 %519, 1
  store i32 %520, ptr %3, align 4, !tbaa !9
  store i8 0, ptr %4, align 1, !tbaa !11
  br label %548

521:                                              ; preds = %483
  %522 = landingpad { ptr, i32 }
          cleanup
  %523 = extractvalue { ptr, i32 } %522, 0
  store ptr %523, ptr %6, align 8
  %524 = extractvalue { ptr, i32 } %522, 1
  store i32 %524, ptr %7, align 4
  br label %534

525:                                              ; preds = %484
  %526 = landingpad { ptr, i32 }
          cleanup
  %527 = extractvalue { ptr, i32 } %526, 0
  store ptr %527, ptr %6, align 8
  %528 = extractvalue { ptr, i32 } %526, 1
  store i32 %528, ptr %7, align 4
  br label %533

529:                                              ; preds = %485
  %530 = landingpad { ptr, i32 }
          cleanup
  %531 = extractvalue { ptr, i32 } %530, 0
  store ptr %531, ptr %6, align 8
  %532 = extractvalue { ptr, i32 } %530, 1
  store i32 %532, ptr %7, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %45) #6
  br label %533

533:                                              ; preds = %529, %525
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %46) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %46) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %45) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %43) #6
  br label %534

534:                                              ; preds = %533, %521
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %44) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %44) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %43) #6
  br label %1562

535:                                              ; preds = %551, %549, %548, %516, %513, %486
  %536 = landingpad { ptr, i32 }
          cleanup
  %537 = extractvalue { ptr, i32 } %536, 0
  store ptr %537, ptr %6, align 8
  %538 = extractvalue { ptr, i32 } %536, 1
  store i32 %538, ptr %7, align 4
  br label %1561

539:                                              ; preds = %495, %487
  %540 = landingpad { ptr, i32 }
          cleanup
  %541 = extractvalue { ptr, i32 } %540, 0
  store ptr %541, ptr %6, align 8
  %542 = extractvalue { ptr, i32 } %540, 1
  store i32 %542, ptr %7, align 4
  br label %547

543:                                              ; preds = %507, %499
  %544 = landingpad { ptr, i32 }
          cleanup
  %545 = extractvalue { ptr, i32 } %544, 0
  store ptr %545, ptr %6, align 8
  %546 = extractvalue { ptr, i32 } %544, 1
  store i32 %546, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %49) #6
  br label %547

547:                                              ; preds = %543, %539
  call void @llvm.lifetime.end.p0(i64 16, ptr %48) #6
  br label %1561

548:                                              ; preds = %518, %511
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE4openEPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248) %8, ptr noundef @.str.106, i32 noundef 16)
          to label %549 unwind label %535

549:                                              ; preds = %548
  %550 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef @.str.23)
          to label %551 unwind label %535

551:                                              ; preds = %549
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE5closeEv(ptr noundef nonnull align 8 dereferenceable(248) %8)
          to label %552 unwind label %535

552:                                              ; preds = %551
  call void @llvm.lifetime.start.p0(i64 10128, ptr %50) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr %51) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %52) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %52) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %51, ptr noundef @.str.118, ptr noundef nonnull align 1 dereferenceable(1) %52)
          to label %553 unwind label %591

553:                                              ; preds = %552
  call void @llvm.lifetime.start.p0(i64 32, ptr %53) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %54) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %54) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %53, ptr noundef @.str.106, ptr noundef nonnull align 1 dereferenceable(1) %54)
          to label %554 unwind label %595

554:                                              ; preds = %553
  invoke void @_ZN6qtorch16ContractionToolsC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_i(ptr noundef nonnull align 8 dereferenceable(10128) %50, ptr noundef nonnull align 8 dereferenceable(32) %51, ptr noundef nonnull align 8 dereferenceable(32) %53, i32 noundef 8)
          to label %555 unwind label %599

555:                                              ; preds = %554
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %53) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %54) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %54) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %53) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %51) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %52) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %52) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %51) #6
  invoke void @_ZN6qtorch16ContractionTools8ContractENS_15ContractionTypeEii(ptr dead_on_unwind writable sret(%"class.std::shared_ptr.178") align 8 %55, ptr noundef nonnull align 8 dereferenceable(10128) %50, i32 noundef 0, i32 noundef 1, i32 noundef 1)
          to label %556 unwind label %605

556:                                              ; preds = %555
  call void @_ZNSt12__shared_ptrIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %55) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %56) #6
  %557 = call { double, double } @_ZN6qtorch16ContractionTools11GetFinalValEv(ptr noundef nonnull align 8 dereferenceable(10128) %50) #6
  %558 = getelementptr inbounds %"class.std::complex", ptr %56, i32 0, i32 0
  %559 = getelementptr inbounds { double, double }, ptr %558, i32 0, i32 0
  %560 = extractvalue { double, double } %557, 0
  store double %560, ptr %559, align 8
  %561 = getelementptr inbounds { double, double }, ptr %558, i32 0, i32 1
  %562 = extractvalue { double, double } %557, 1
  store double %562, ptr %561, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %57) #6
  %563 = invoke noundef double @_ZNKSt7complexIdE4realB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(16) %56)
          to label %564 unwind label %609

564:                                              ; preds = %556
  %565 = fsub double %563, 0x3FEFD712F9A816D8
  %566 = invoke noundef double @_ZSt3absd(double noundef %565)
          to label %567 unwind label %609

567:                                              ; preds = %564
  %568 = fcmp ogt double %566, 1.000000e-05
  br i1 %568, label %581, label %569

569:                                              ; preds = %567
  %570 = call { double, double } @_ZN6qtorch16ContractionTools11GetFinalValEv(ptr noundef nonnull align 8 dereferenceable(10128) %50) #6
  %571 = getelementptr inbounds %"class.std::complex", ptr %57, i32 0, i32 0
  %572 = getelementptr inbounds { double, double }, ptr %571, i32 0, i32 0
  %573 = extractvalue { double, double } %570, 0
  store double %573, ptr %572, align 8
  %574 = getelementptr inbounds { double, double }, ptr %571, i32 0, i32 1
  %575 = extractvalue { double, double } %570, 1
  store double %575, ptr %574, align 8
  %576 = invoke noundef double @_ZNKSt7complexIdE4imagB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(16) %57)
          to label %577 unwind label %613

577:                                              ; preds = %569
  %578 = invoke noundef double @_ZSt3absd(double noundef %576)
          to label %579 unwind label %613

579:                                              ; preds = %577
  %580 = fcmp ogt double %578, 1.000000e-05
  br label %581

581:                                              ; preds = %579, %567
  %582 = phi i1 [ true, %567 ], [ %580, %579 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr %57) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %56) #6
  br i1 %582, label %583, label %618

583:                                              ; preds = %581
  %584 = load ptr, ptr %2, align 8, !tbaa !5
  %585 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %584, ptr noundef @.str.144)
          to label %586 unwind label %605

586:                                              ; preds = %583
  %587 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %585, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %588 unwind label %605

588:                                              ; preds = %586
  %589 = load i32, ptr %3, align 4, !tbaa !9
  %590 = add nsw i32 %589, 1
  store i32 %590, ptr %3, align 4, !tbaa !9
  store i8 0, ptr %4, align 1, !tbaa !11
  br label %618

591:                                              ; preds = %552
  %592 = landingpad { ptr, i32 }
          cleanup
  %593 = extractvalue { ptr, i32 } %592, 0
  store ptr %593, ptr %6, align 8
  %594 = extractvalue { ptr, i32 } %592, 1
  store i32 %594, ptr %7, align 4
  br label %604

595:                                              ; preds = %553
  %596 = landingpad { ptr, i32 }
          cleanup
  %597 = extractvalue { ptr, i32 } %596, 0
  store ptr %597, ptr %6, align 8
  %598 = extractvalue { ptr, i32 } %596, 1
  store i32 %598, ptr %7, align 4
  br label %603

599:                                              ; preds = %554
  %600 = landingpad { ptr, i32 }
          cleanup
  %601 = extractvalue { ptr, i32 } %600, 0
  store ptr %601, ptr %6, align 8
  %602 = extractvalue { ptr, i32 } %600, 1
  store i32 %602, ptr %7, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %53) #6
  br label %603

603:                                              ; preds = %599, %595
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %54) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %54) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %53) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %51) #6
  br label %604

604:                                              ; preds = %603, %591
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %52) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %52) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %51) #6
  br label %1560

605:                                              ; preds = %635, %633, %632, %631, %629, %627, %625, %623, %621, %619, %618, %586, %583, %555
  %606 = landingpad { ptr, i32 }
          cleanup
  %607 = extractvalue { ptr, i32 } %606, 0
  store ptr %607, ptr %6, align 8
  %608 = extractvalue { ptr, i32 } %606, 1
  store i32 %608, ptr %7, align 4
  br label %1559

609:                                              ; preds = %564, %556
  %610 = landingpad { ptr, i32 }
          cleanup
  %611 = extractvalue { ptr, i32 } %610, 0
  store ptr %611, ptr %6, align 8
  %612 = extractvalue { ptr, i32 } %610, 1
  store i32 %612, ptr %7, align 4
  br label %617

613:                                              ; preds = %577, %569
  %614 = landingpad { ptr, i32 }
          cleanup
  %615 = extractvalue { ptr, i32 } %614, 0
  store ptr %615, ptr %6, align 8
  %616 = extractvalue { ptr, i32 } %614, 1
  store i32 %616, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %57) #6
  br label %617

617:                                              ; preds = %613, %609
  call void @llvm.lifetime.end.p0(i64 16, ptr %56) #6
  br label %1559

618:                                              ; preds = %588, %581
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE4openEPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248) %5, ptr noundef @.str.118, i32 noundef 16)
          to label %619 unwind label %605

619:                                              ; preds = %618
  %620 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef @.str.119)
          to label %621 unwind label %605

621:                                              ; preds = %619
  %622 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %620, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %623 unwind label %605

623:                                              ; preds = %621
  %624 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef @.str.145)
          to label %625 unwind label %605

625:                                              ; preds = %623
  %626 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %624, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %627 unwind label %605

627:                                              ; preds = %625
  %628 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef @.str.146)
          to label %629 unwind label %605

629:                                              ; preds = %627
  %630 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %628, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %631 unwind label %605

631:                                              ; preds = %629
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE5closeEv(ptr noundef nonnull align 8 dereferenceable(248) %5)
          to label %632 unwind label %605

632:                                              ; preds = %631
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE4openEPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248) %8, ptr noundef @.str.106, i32 noundef 16)
          to label %633 unwind label %605

633:                                              ; preds = %632
  %634 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef @.str.21)
          to label %635 unwind label %605

635:                                              ; preds = %633
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE5closeEv(ptr noundef nonnull align 8 dereferenceable(248) %8)
          to label %636 unwind label %605

636:                                              ; preds = %635
  call void @llvm.lifetime.start.p0(i64 10128, ptr %58) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr %59) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %60) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %60) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %59, ptr noundef @.str.118, ptr noundef nonnull align 1 dereferenceable(1) %60)
          to label %637 unwind label %675

637:                                              ; preds = %636
  call void @llvm.lifetime.start.p0(i64 32, ptr %61) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %62) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %62) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %61, ptr noundef @.str.106, ptr noundef nonnull align 1 dereferenceable(1) %62)
          to label %638 unwind label %679

638:                                              ; preds = %637
  invoke void @_ZN6qtorch16ContractionToolsC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_i(ptr noundef nonnull align 8 dereferenceable(10128) %58, ptr noundef nonnull align 8 dereferenceable(32) %59, ptr noundef nonnull align 8 dereferenceable(32) %61, i32 noundef 8)
          to label %639 unwind label %683

639:                                              ; preds = %638
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %61) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %62) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %62) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %61) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %59) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %60) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %60) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %59) #6
  invoke void @_ZN6qtorch16ContractionTools8ContractENS_15ContractionTypeEii(ptr dead_on_unwind writable sret(%"class.std::shared_ptr.178") align 8 %63, ptr noundef nonnull align 8 dereferenceable(10128) %58, i32 noundef 0, i32 noundef 1, i32 noundef 1)
          to label %640 unwind label %689

640:                                              ; preds = %639
  call void @_ZNSt12__shared_ptrIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %63) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %64) #6
  %641 = call { double, double } @_ZN6qtorch16ContractionTools11GetFinalValEv(ptr noundef nonnull align 8 dereferenceable(10128) %58) #6
  %642 = getelementptr inbounds %"class.std::complex", ptr %64, i32 0, i32 0
  %643 = getelementptr inbounds { double, double }, ptr %642, i32 0, i32 0
  %644 = extractvalue { double, double } %641, 0
  store double %644, ptr %643, align 8
  %645 = getelementptr inbounds { double, double }, ptr %642, i32 0, i32 1
  %646 = extractvalue { double, double } %641, 1
  store double %646, ptr %645, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %65) #6
  %647 = invoke noundef double @_ZNKSt7complexIdE4realB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(16) %64)
          to label %648 unwind label %693

648:                                              ; preds = %640
  %649 = fsub double %647, 0x3FEFD712F9A816D8
  %650 = invoke noundef double @_ZSt3absd(double noundef %649)
          to label %651 unwind label %693

651:                                              ; preds = %648
  %652 = fcmp ogt double %650, 1.000000e-05
  br i1 %652, label %665, label %653

653:                                              ; preds = %651
  %654 = call { double, double } @_ZN6qtorch16ContractionTools11GetFinalValEv(ptr noundef nonnull align 8 dereferenceable(10128) %58) #6
  %655 = getelementptr inbounds %"class.std::complex", ptr %65, i32 0, i32 0
  %656 = getelementptr inbounds { double, double }, ptr %655, i32 0, i32 0
  %657 = extractvalue { double, double } %654, 0
  store double %657, ptr %656, align 8
  %658 = getelementptr inbounds { double, double }, ptr %655, i32 0, i32 1
  %659 = extractvalue { double, double } %654, 1
  store double %659, ptr %658, align 8
  %660 = invoke noundef double @_ZNKSt7complexIdE4imagB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(16) %65)
          to label %661 unwind label %697

661:                                              ; preds = %653
  %662 = invoke noundef double @_ZSt3absd(double noundef %660)
          to label %663 unwind label %697

663:                                              ; preds = %661
  %664 = fcmp ogt double %662, 1.000000e-05
  br label %665

665:                                              ; preds = %663, %651
  %666 = phi i1 [ true, %651 ], [ %664, %663 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr %65) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %64) #6
  br i1 %666, label %667, label %702

667:                                              ; preds = %665
  %668 = load ptr, ptr %2, align 8, !tbaa !5
  %669 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %668, ptr noundef @.str.147)
          to label %670 unwind label %689

670:                                              ; preds = %667
  %671 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %669, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %672 unwind label %689

672:                                              ; preds = %670
  %673 = load i32, ptr %3, align 4, !tbaa !9
  %674 = add nsw i32 %673, 1
  store i32 %674, ptr %3, align 4, !tbaa !9
  store i8 0, ptr %4, align 1, !tbaa !11
  br label %702

675:                                              ; preds = %636
  %676 = landingpad { ptr, i32 }
          cleanup
  %677 = extractvalue { ptr, i32 } %676, 0
  store ptr %677, ptr %6, align 8
  %678 = extractvalue { ptr, i32 } %676, 1
  store i32 %678, ptr %7, align 4
  br label %688

679:                                              ; preds = %637
  %680 = landingpad { ptr, i32 }
          cleanup
  %681 = extractvalue { ptr, i32 } %680, 0
  store ptr %681, ptr %6, align 8
  %682 = extractvalue { ptr, i32 } %680, 1
  store i32 %682, ptr %7, align 4
  br label %687

683:                                              ; preds = %638
  %684 = landingpad { ptr, i32 }
          cleanup
  %685 = extractvalue { ptr, i32 } %684, 0
  store ptr %685, ptr %6, align 8
  %686 = extractvalue { ptr, i32 } %684, 1
  store i32 %686, ptr %7, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %61) #6
  br label %687

687:                                              ; preds = %683, %679
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %62) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %62) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %61) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %59) #6
  br label %688

688:                                              ; preds = %687, %675
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %60) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %60) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %59) #6
  br label %1558

689:                                              ; preds = %705, %703, %702, %670, %667, %639
  %690 = landingpad { ptr, i32 }
          cleanup
  %691 = extractvalue { ptr, i32 } %690, 0
  store ptr %691, ptr %6, align 8
  %692 = extractvalue { ptr, i32 } %690, 1
  store i32 %692, ptr %7, align 4
  br label %1557

693:                                              ; preds = %648, %640
  %694 = landingpad { ptr, i32 }
          cleanup
  %695 = extractvalue { ptr, i32 } %694, 0
  store ptr %695, ptr %6, align 8
  %696 = extractvalue { ptr, i32 } %694, 1
  store i32 %696, ptr %7, align 4
  br label %701

697:                                              ; preds = %661, %653
  %698 = landingpad { ptr, i32 }
          cleanup
  %699 = extractvalue { ptr, i32 } %698, 0
  store ptr %699, ptr %6, align 8
  %700 = extractvalue { ptr, i32 } %698, 1
  store i32 %700, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %65) #6
  br label %701

701:                                              ; preds = %697, %693
  call void @llvm.lifetime.end.p0(i64 16, ptr %64) #6
  br label %1557

702:                                              ; preds = %672, %665
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE4openEPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248) %8, ptr noundef @.str.106, i32 noundef 16)
          to label %703 unwind label %689

703:                                              ; preds = %702
  %704 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef @.str.22)
          to label %705 unwind label %689

705:                                              ; preds = %703
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE5closeEv(ptr noundef nonnull align 8 dereferenceable(248) %8)
          to label %706 unwind label %689

706:                                              ; preds = %705
  call void @llvm.lifetime.start.p0(i64 10128, ptr %66) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr %67) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %68) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %68) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %67, ptr noundef @.str.118, ptr noundef nonnull align 1 dereferenceable(1) %68)
          to label %707 unwind label %745

707:                                              ; preds = %706
  call void @llvm.lifetime.start.p0(i64 32, ptr %69) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %70) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %70) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %69, ptr noundef @.str.106, ptr noundef nonnull align 1 dereferenceable(1) %70)
          to label %708 unwind label %749

708:                                              ; preds = %707
  invoke void @_ZN6qtorch16ContractionToolsC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_i(ptr noundef nonnull align 8 dereferenceable(10128) %66, ptr noundef nonnull align 8 dereferenceable(32) %67, ptr noundef nonnull align 8 dereferenceable(32) %69, i32 noundef 8)
          to label %709 unwind label %753

709:                                              ; preds = %708
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %69) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %70) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %70) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %69) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %67) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %68) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %68) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %67) #6
  invoke void @_ZN6qtorch16ContractionTools8ContractENS_15ContractionTypeEii(ptr dead_on_unwind writable sret(%"class.std::shared_ptr.178") align 8 %71, ptr noundef nonnull align 8 dereferenceable(10128) %66, i32 noundef 0, i32 noundef 1, i32 noundef 1)
          to label %710 unwind label %759

710:                                              ; preds = %709
  call void @_ZNSt12__shared_ptrIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %71) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %72) #6
  %711 = call { double, double } @_ZN6qtorch16ContractionTools11GetFinalValEv(ptr noundef nonnull align 8 dereferenceable(10128) %66) #6
  %712 = getelementptr inbounds %"class.std::complex", ptr %72, i32 0, i32 0
  %713 = getelementptr inbounds { double, double }, ptr %712, i32 0, i32 0
  %714 = extractvalue { double, double } %711, 0
  store double %714, ptr %713, align 8
  %715 = getelementptr inbounds { double, double }, ptr %712, i32 0, i32 1
  %716 = extractvalue { double, double } %711, 1
  store double %716, ptr %715, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %73) #6
  %717 = invoke noundef double @_ZNKSt7complexIdE4realB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(16) %72)
          to label %718 unwind label %763

718:                                              ; preds = %710
  %719 = fsub double %717, 0x3FB98EAECB8BC33F
  %720 = invoke noundef double @_ZSt3absd(double noundef %719)
          to label %721 unwind label %763

721:                                              ; preds = %718
  %722 = fcmp ogt double %720, 1.000000e-05
  br i1 %722, label %735, label %723

723:                                              ; preds = %721
  %724 = call { double, double } @_ZN6qtorch16ContractionTools11GetFinalValEv(ptr noundef nonnull align 8 dereferenceable(10128) %66) #6
  %725 = getelementptr inbounds %"class.std::complex", ptr %73, i32 0, i32 0
  %726 = getelementptr inbounds { double, double }, ptr %725, i32 0, i32 0
  %727 = extractvalue { double, double } %724, 0
  store double %727, ptr %726, align 8
  %728 = getelementptr inbounds { double, double }, ptr %725, i32 0, i32 1
  %729 = extractvalue { double, double } %724, 1
  store double %729, ptr %728, align 8
  %730 = invoke noundef double @_ZNKSt7complexIdE4imagB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(16) %73)
          to label %731 unwind label %767

731:                                              ; preds = %723
  %732 = invoke noundef double @_ZSt3absd(double noundef %730)
          to label %733 unwind label %767

733:                                              ; preds = %731
  %734 = fcmp ogt double %732, 1.000000e-05
  br label %735

735:                                              ; preds = %733, %721
  %736 = phi i1 [ true, %721 ], [ %734, %733 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr %73) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %72) #6
  br i1 %736, label %737, label %772

737:                                              ; preds = %735
  %738 = load ptr, ptr %2, align 8, !tbaa !5
  %739 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %738, ptr noundef @.str.148)
          to label %740 unwind label %759

740:                                              ; preds = %737
  %741 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %739, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %742 unwind label %759

742:                                              ; preds = %740
  %743 = load i32, ptr %3, align 4, !tbaa !9
  %744 = add nsw i32 %743, 1
  store i32 %744, ptr %3, align 4, !tbaa !9
  store i8 0, ptr %4, align 1, !tbaa !11
  br label %772

745:                                              ; preds = %706
  %746 = landingpad { ptr, i32 }
          cleanup
  %747 = extractvalue { ptr, i32 } %746, 0
  store ptr %747, ptr %6, align 8
  %748 = extractvalue { ptr, i32 } %746, 1
  store i32 %748, ptr %7, align 4
  br label %758

749:                                              ; preds = %707
  %750 = landingpad { ptr, i32 }
          cleanup
  %751 = extractvalue { ptr, i32 } %750, 0
  store ptr %751, ptr %6, align 8
  %752 = extractvalue { ptr, i32 } %750, 1
  store i32 %752, ptr %7, align 4
  br label %757

753:                                              ; preds = %708
  %754 = landingpad { ptr, i32 }
          cleanup
  %755 = extractvalue { ptr, i32 } %754, 0
  store ptr %755, ptr %6, align 8
  %756 = extractvalue { ptr, i32 } %754, 1
  store i32 %756, ptr %7, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %69) #6
  br label %757

757:                                              ; preds = %753, %749
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %70) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %70) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %69) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %67) #6
  br label %758

758:                                              ; preds = %757, %745
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %68) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %68) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %67) #6
  br label %1556

759:                                              ; preds = %775, %773, %772, %740, %737, %709
  %760 = landingpad { ptr, i32 }
          cleanup
  %761 = extractvalue { ptr, i32 } %760, 0
  store ptr %761, ptr %6, align 8
  %762 = extractvalue { ptr, i32 } %760, 1
  store i32 %762, ptr %7, align 4
  br label %1555

763:                                              ; preds = %718, %710
  %764 = landingpad { ptr, i32 }
          cleanup
  %765 = extractvalue { ptr, i32 } %764, 0
  store ptr %765, ptr %6, align 8
  %766 = extractvalue { ptr, i32 } %764, 1
  store i32 %766, ptr %7, align 4
  br label %771

767:                                              ; preds = %731, %723
  %768 = landingpad { ptr, i32 }
          cleanup
  %769 = extractvalue { ptr, i32 } %768, 0
  store ptr %769, ptr %6, align 8
  %770 = extractvalue { ptr, i32 } %768, 1
  store i32 %770, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %73) #6
  br label %771

771:                                              ; preds = %767, %763
  call void @llvm.lifetime.end.p0(i64 16, ptr %72) #6
  br label %1555

772:                                              ; preds = %742, %735
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE4openEPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248) %8, ptr noundef @.str.106, i32 noundef 16)
          to label %773 unwind label %759

773:                                              ; preds = %772
  %774 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef @.str.23)
          to label %775 unwind label %759

775:                                              ; preds = %773
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE5closeEv(ptr noundef nonnull align 8 dereferenceable(248) %8)
          to label %776 unwind label %759

776:                                              ; preds = %775
  call void @llvm.lifetime.start.p0(i64 10128, ptr %74) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr %75) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %76) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %76) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %75, ptr noundef @.str.118, ptr noundef nonnull align 1 dereferenceable(1) %76)
          to label %777 unwind label %814

777:                                              ; preds = %776
  call void @llvm.lifetime.start.p0(i64 32, ptr %77) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %78) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %78) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %77, ptr noundef @.str.106, ptr noundef nonnull align 1 dereferenceable(1) %78)
          to label %778 unwind label %818

778:                                              ; preds = %777
  invoke void @_ZN6qtorch16ContractionToolsC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_i(ptr noundef nonnull align 8 dereferenceable(10128) %74, ptr noundef nonnull align 8 dereferenceable(32) %75, ptr noundef nonnull align 8 dereferenceable(32) %77, i32 noundef 8)
          to label %779 unwind label %822

779:                                              ; preds = %778
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %77) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %78) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %78) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %77) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %75) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %76) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %76) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %75) #6
  invoke void @_ZN6qtorch16ContractionTools8ContractENS_15ContractionTypeEii(ptr dead_on_unwind writable sret(%"class.std::shared_ptr.178") align 8 %79, ptr noundef nonnull align 8 dereferenceable(10128) %74, i32 noundef 0, i32 noundef 1, i32 noundef 1)
          to label %780 unwind label %828

780:                                              ; preds = %779
  call void @_ZNSt12__shared_ptrIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %79) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %80) #6
  %781 = call { double, double } @_ZN6qtorch16ContractionTools11GetFinalValEv(ptr noundef nonnull align 8 dereferenceable(10128) %74) #6
  %782 = getelementptr inbounds %"class.std::complex", ptr %80, i32 0, i32 0
  %783 = getelementptr inbounds { double, double }, ptr %782, i32 0, i32 0
  %784 = extractvalue { double, double } %781, 0
  store double %784, ptr %783, align 8
  %785 = getelementptr inbounds { double, double }, ptr %782, i32 0, i32 1
  %786 = extractvalue { double, double } %781, 1
  store double %786, ptr %785, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %81) #6
  %787 = invoke noundef double @_ZNKSt7complexIdE4realB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(16) %80)
          to label %788 unwind label %832

788:                                              ; preds = %780
  %789 = invoke noundef double @_ZSt3absd(double noundef %787)
          to label %790 unwind label %832

790:                                              ; preds = %788
  %791 = fcmp ogt double %789, 1.000000e-05
  br i1 %791, label %804, label %792

792:                                              ; preds = %790
  %793 = call { double, double } @_ZN6qtorch16ContractionTools11GetFinalValEv(ptr noundef nonnull align 8 dereferenceable(10128) %74) #6
  %794 = getelementptr inbounds %"class.std::complex", ptr %81, i32 0, i32 0
  %795 = getelementptr inbounds { double, double }, ptr %794, i32 0, i32 0
  %796 = extractvalue { double, double } %793, 0
  store double %796, ptr %795, align 8
  %797 = getelementptr inbounds { double, double }, ptr %794, i32 0, i32 1
  %798 = extractvalue { double, double } %793, 1
  store double %798, ptr %797, align 8
  %799 = invoke noundef double @_ZNKSt7complexIdE4imagB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(16) %81)
          to label %800 unwind label %836

800:                                              ; preds = %792
  %801 = invoke noundef double @_ZSt3absd(double noundef %799)
          to label %802 unwind label %836

802:                                              ; preds = %800
  %803 = fcmp ogt double %801, 1.000000e-05
  br label %804

804:                                              ; preds = %802, %790
  %805 = phi i1 [ true, %790 ], [ %803, %802 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr %81) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %80) #6
  br i1 %805, label %806, label %841

806:                                              ; preds = %804
  %807 = load ptr, ptr %2, align 8, !tbaa !5
  %808 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %807, ptr noundef @.str.149)
          to label %809 unwind label %828

809:                                              ; preds = %806
  %810 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %808, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %811 unwind label %828

811:                                              ; preds = %809
  %812 = load i32, ptr %3, align 4, !tbaa !9
  %813 = add nsw i32 %812, 1
  store i32 %813, ptr %3, align 4, !tbaa !9
  store i8 0, ptr %4, align 1, !tbaa !11
  br label %841

814:                                              ; preds = %776
  %815 = landingpad { ptr, i32 }
          cleanup
  %816 = extractvalue { ptr, i32 } %815, 0
  store ptr %816, ptr %6, align 8
  %817 = extractvalue { ptr, i32 } %815, 1
  store i32 %817, ptr %7, align 4
  br label %827

818:                                              ; preds = %777
  %819 = landingpad { ptr, i32 }
          cleanup
  %820 = extractvalue { ptr, i32 } %819, 0
  store ptr %820, ptr %6, align 8
  %821 = extractvalue { ptr, i32 } %819, 1
  store i32 %821, ptr %7, align 4
  br label %826

822:                                              ; preds = %778
  %823 = landingpad { ptr, i32 }
          cleanup
  %824 = extractvalue { ptr, i32 } %823, 0
  store ptr %824, ptr %6, align 8
  %825 = extractvalue { ptr, i32 } %823, 1
  store i32 %825, ptr %7, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %77) #6
  br label %826

826:                                              ; preds = %822, %818
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %78) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %78) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %77) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %75) #6
  br label %827

827:                                              ; preds = %826, %814
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %76) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %76) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %75) #6
  br label %1554

828:                                              ; preds = %858, %856, %855, %854, %852, %850, %848, %846, %844, %842, %841, %809, %806, %779
  %829 = landingpad { ptr, i32 }
          cleanup
  %830 = extractvalue { ptr, i32 } %829, 0
  store ptr %830, ptr %6, align 8
  %831 = extractvalue { ptr, i32 } %829, 1
  store i32 %831, ptr %7, align 4
  br label %1553

832:                                              ; preds = %788, %780
  %833 = landingpad { ptr, i32 }
          cleanup
  %834 = extractvalue { ptr, i32 } %833, 0
  store ptr %834, ptr %6, align 8
  %835 = extractvalue { ptr, i32 } %833, 1
  store i32 %835, ptr %7, align 4
  br label %840

836:                                              ; preds = %800, %792
  %837 = landingpad { ptr, i32 }
          cleanup
  %838 = extractvalue { ptr, i32 } %837, 0
  store ptr %838, ptr %6, align 8
  %839 = extractvalue { ptr, i32 } %837, 1
  store i32 %839, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %81) #6
  br label %840

840:                                              ; preds = %836, %832
  call void @llvm.lifetime.end.p0(i64 16, ptr %80) #6
  br label %1553

841:                                              ; preds = %811, %804
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE4openEPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248) %5, ptr noundef @.str.118, i32 noundef 16)
          to label %842 unwind label %828

842:                                              ; preds = %841
  %843 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef @.str.119)
          to label %844 unwind label %828

844:                                              ; preds = %842
  %845 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %843, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %846 unwind label %828

846:                                              ; preds = %844
  %847 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef @.str.145)
          to label %848 unwind label %828

848:                                              ; preds = %846
  %849 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %847, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %850 unwind label %828

850:                                              ; preds = %848
  %851 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef @.str.150)
          to label %852 unwind label %828

852:                                              ; preds = %850
  %853 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %851, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %854 unwind label %828

854:                                              ; preds = %852
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE5closeEv(ptr noundef nonnull align 8 dereferenceable(248) %5)
          to label %855 unwind label %828

855:                                              ; preds = %854
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE4openEPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248) %8, ptr noundef @.str.106, i32 noundef 16)
          to label %856 unwind label %828

856:                                              ; preds = %855
  %857 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef @.str.21)
          to label %858 unwind label %828

858:                                              ; preds = %856
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE5closeEv(ptr noundef nonnull align 8 dereferenceable(248) %8)
          to label %859 unwind label %828

859:                                              ; preds = %858
  call void @llvm.lifetime.start.p0(i64 10128, ptr %82) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr %83) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %84) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %84) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %83, ptr noundef @.str.118, ptr noundef nonnull align 1 dereferenceable(1) %84)
          to label %860 unwind label %898

860:                                              ; preds = %859
  call void @llvm.lifetime.start.p0(i64 32, ptr %85) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %86) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %86) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %85, ptr noundef @.str.106, ptr noundef nonnull align 1 dereferenceable(1) %86)
          to label %861 unwind label %902

861:                                              ; preds = %860
  invoke void @_ZN6qtorch16ContractionToolsC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_i(ptr noundef nonnull align 8 dereferenceable(10128) %82, ptr noundef nonnull align 8 dereferenceable(32) %83, ptr noundef nonnull align 8 dereferenceable(32) %85, i32 noundef 8)
          to label %862 unwind label %906

862:                                              ; preds = %861
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %85) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %86) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %86) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %85) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %83) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %84) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %84) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %83) #6
  invoke void @_ZN6qtorch16ContractionTools8ContractENS_15ContractionTypeEii(ptr dead_on_unwind writable sret(%"class.std::shared_ptr.178") align 8 %87, ptr noundef nonnull align 8 dereferenceable(10128) %82, i32 noundef 0, i32 noundef 1, i32 noundef 1)
          to label %863 unwind label %912

863:                                              ; preds = %862
  call void @_ZNSt12__shared_ptrIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %87) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %88) #6
  %864 = call { double, double } @_ZN6qtorch16ContractionTools11GetFinalValEv(ptr noundef nonnull align 8 dereferenceable(10128) %82) #6
  %865 = getelementptr inbounds %"class.std::complex", ptr %88, i32 0, i32 0
  %866 = getelementptr inbounds { double, double }, ptr %865, i32 0, i32 0
  %867 = extractvalue { double, double } %864, 0
  store double %867, ptr %866, align 8
  %868 = getelementptr inbounds { double, double }, ptr %865, i32 0, i32 1
  %869 = extractvalue { double, double } %864, 1
  store double %869, ptr %868, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %89) #6
  %870 = invoke noundef double @_ZNKSt7complexIdE4realB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(16) %88)
          to label %871 unwind label %916

871:                                              ; preds = %863
  %872 = fsub double %870, 0x3FEFD712F9A816D8
  %873 = invoke noundef double @_ZSt3absd(double noundef %872)
          to label %874 unwind label %916

874:                                              ; preds = %871
  %875 = fcmp ogt double %873, 1.000000e-05
  br i1 %875, label %888, label %876

876:                                              ; preds = %874
  %877 = call { double, double } @_ZN6qtorch16ContractionTools11GetFinalValEv(ptr noundef nonnull align 8 dereferenceable(10128) %82) #6
  %878 = getelementptr inbounds %"class.std::complex", ptr %89, i32 0, i32 0
  %879 = getelementptr inbounds { double, double }, ptr %878, i32 0, i32 0
  %880 = extractvalue { double, double } %877, 0
  store double %880, ptr %879, align 8
  %881 = getelementptr inbounds { double, double }, ptr %878, i32 0, i32 1
  %882 = extractvalue { double, double } %877, 1
  store double %882, ptr %881, align 8
  %883 = invoke noundef double @_ZNKSt7complexIdE4imagB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(16) %89)
          to label %884 unwind label %920

884:                                              ; preds = %876
  %885 = invoke noundef double @_ZSt3absd(double noundef %883)
          to label %886 unwind label %920

886:                                              ; preds = %884
  %887 = fcmp ogt double %885, 1.000000e-05
  br label %888

888:                                              ; preds = %886, %874
  %889 = phi i1 [ true, %874 ], [ %887, %886 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr %89) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %88) #6
  br i1 %889, label %890, label %925

890:                                              ; preds = %888
  %891 = load ptr, ptr %2, align 8, !tbaa !5
  %892 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %891, ptr noundef @.str.151)
          to label %893 unwind label %912

893:                                              ; preds = %890
  %894 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %892, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %895 unwind label %912

895:                                              ; preds = %893
  %896 = load i32, ptr %3, align 4, !tbaa !9
  %897 = add nsw i32 %896, 1
  store i32 %897, ptr %3, align 4, !tbaa !9
  store i8 0, ptr %4, align 1, !tbaa !11
  br label %925

898:                                              ; preds = %859
  %899 = landingpad { ptr, i32 }
          cleanup
  %900 = extractvalue { ptr, i32 } %899, 0
  store ptr %900, ptr %6, align 8
  %901 = extractvalue { ptr, i32 } %899, 1
  store i32 %901, ptr %7, align 4
  br label %911

902:                                              ; preds = %860
  %903 = landingpad { ptr, i32 }
          cleanup
  %904 = extractvalue { ptr, i32 } %903, 0
  store ptr %904, ptr %6, align 8
  %905 = extractvalue { ptr, i32 } %903, 1
  store i32 %905, ptr %7, align 4
  br label %910

906:                                              ; preds = %861
  %907 = landingpad { ptr, i32 }
          cleanup
  %908 = extractvalue { ptr, i32 } %907, 0
  store ptr %908, ptr %6, align 8
  %909 = extractvalue { ptr, i32 } %907, 1
  store i32 %909, ptr %7, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %85) #6
  br label %910

910:                                              ; preds = %906, %902
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %86) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %86) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %85) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %83) #6
  br label %911

911:                                              ; preds = %910, %898
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %84) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %84) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %83) #6
  br label %1552

912:                                              ; preds = %928, %926, %925, %893, %890, %862
  %913 = landingpad { ptr, i32 }
          cleanup
  %914 = extractvalue { ptr, i32 } %913, 0
  store ptr %914, ptr %6, align 8
  %915 = extractvalue { ptr, i32 } %913, 1
  store i32 %915, ptr %7, align 4
  br label %1551

916:                                              ; preds = %871, %863
  %917 = landingpad { ptr, i32 }
          cleanup
  %918 = extractvalue { ptr, i32 } %917, 0
  store ptr %918, ptr %6, align 8
  %919 = extractvalue { ptr, i32 } %917, 1
  store i32 %919, ptr %7, align 4
  br label %924

920:                                              ; preds = %884, %876
  %921 = landingpad { ptr, i32 }
          cleanup
  %922 = extractvalue { ptr, i32 } %921, 0
  store ptr %922, ptr %6, align 8
  %923 = extractvalue { ptr, i32 } %921, 1
  store i32 %923, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %89) #6
  br label %924

924:                                              ; preds = %920, %916
  call void @llvm.lifetime.end.p0(i64 16, ptr %88) #6
  br label %1551

925:                                              ; preds = %895, %888
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE4openEPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248) %8, ptr noundef @.str.106, i32 noundef 16)
          to label %926 unwind label %912

926:                                              ; preds = %925
  %927 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef @.str.22)
          to label %928 unwind label %912

928:                                              ; preds = %926
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE5closeEv(ptr noundef nonnull align 8 dereferenceable(248) %8)
          to label %929 unwind label %912

929:                                              ; preds = %928
  call void @llvm.lifetime.start.p0(i64 10128, ptr %90) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr %91) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %92) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %92) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %91, ptr noundef @.str.118, ptr noundef nonnull align 1 dereferenceable(1) %92)
          to label %930 unwind label %968

930:                                              ; preds = %929
  call void @llvm.lifetime.start.p0(i64 32, ptr %93) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %94) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %94) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %93, ptr noundef @.str.106, ptr noundef nonnull align 1 dereferenceable(1) %94)
          to label %931 unwind label %972

931:                                              ; preds = %930
  invoke void @_ZN6qtorch16ContractionToolsC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_i(ptr noundef nonnull align 8 dereferenceable(10128) %90, ptr noundef nonnull align 8 dereferenceable(32) %91, ptr noundef nonnull align 8 dereferenceable(32) %93, i32 noundef 8)
          to label %932 unwind label %976

932:                                              ; preds = %931
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %93) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %94) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %94) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %93) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %91) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %92) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %92) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %91) #6
  invoke void @_ZN6qtorch16ContractionTools8ContractENS_15ContractionTypeEii(ptr dead_on_unwind writable sret(%"class.std::shared_ptr.178") align 8 %95, ptr noundef nonnull align 8 dereferenceable(10128) %90, i32 noundef 0, i32 noundef 1, i32 noundef 1)
          to label %933 unwind label %982

933:                                              ; preds = %932
  call void @_ZNSt12__shared_ptrIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %95) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %96) #6
  %934 = call { double, double } @_ZN6qtorch16ContractionTools11GetFinalValEv(ptr noundef nonnull align 8 dereferenceable(10128) %90) #6
  %935 = getelementptr inbounds %"class.std::complex", ptr %96, i32 0, i32 0
  %936 = getelementptr inbounds { double, double }, ptr %935, i32 0, i32 0
  %937 = extractvalue { double, double } %934, 0
  store double %937, ptr %936, align 8
  %938 = getelementptr inbounds { double, double }, ptr %935, i32 0, i32 1
  %939 = extractvalue { double, double } %934, 1
  store double %939, ptr %938, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %97) #6
  %940 = invoke noundef double @_ZNKSt7complexIdE4realB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(16) %96)
          to label %941 unwind label %986

941:                                              ; preds = %933
  %942 = fadd double %940, 0x3FB98EAECB8BC33F
  %943 = invoke noundef double @_ZSt3absd(double noundef %942)
          to label %944 unwind label %986

944:                                              ; preds = %941
  %945 = fcmp ogt double %943, 1.000000e-05
  br i1 %945, label %958, label %946

946:                                              ; preds = %944
  %947 = call { double, double } @_ZN6qtorch16ContractionTools11GetFinalValEv(ptr noundef nonnull align 8 dereferenceable(10128) %90) #6
  %948 = getelementptr inbounds %"class.std::complex", ptr %97, i32 0, i32 0
  %949 = getelementptr inbounds { double, double }, ptr %948, i32 0, i32 0
  %950 = extractvalue { double, double } %947, 0
  store double %950, ptr %949, align 8
  %951 = getelementptr inbounds { double, double }, ptr %948, i32 0, i32 1
  %952 = extractvalue { double, double } %947, 1
  store double %952, ptr %951, align 8
  %953 = invoke noundef double @_ZNKSt7complexIdE4imagB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(16) %97)
          to label %954 unwind label %990

954:                                              ; preds = %946
  %955 = invoke noundef double @_ZSt3absd(double noundef %953)
          to label %956 unwind label %990

956:                                              ; preds = %954
  %957 = fcmp ogt double %955, 1.000000e-05
  br label %958

958:                                              ; preds = %956, %944
  %959 = phi i1 [ true, %944 ], [ %957, %956 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr %97) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %96) #6
  br i1 %959, label %960, label %995

960:                                              ; preds = %958
  %961 = load ptr, ptr %2, align 8, !tbaa !5
  %962 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %961, ptr noundef @.str.152)
          to label %963 unwind label %982

963:                                              ; preds = %960
  %964 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %962, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %965 unwind label %982

965:                                              ; preds = %963
  %966 = load i32, ptr %3, align 4, !tbaa !9
  %967 = add nsw i32 %966, 1
  store i32 %967, ptr %3, align 4, !tbaa !9
  store i8 0, ptr %4, align 1, !tbaa !11
  br label %995

968:                                              ; preds = %929
  %969 = landingpad { ptr, i32 }
          cleanup
  %970 = extractvalue { ptr, i32 } %969, 0
  store ptr %970, ptr %6, align 8
  %971 = extractvalue { ptr, i32 } %969, 1
  store i32 %971, ptr %7, align 4
  br label %981

972:                                              ; preds = %930
  %973 = landingpad { ptr, i32 }
          cleanup
  %974 = extractvalue { ptr, i32 } %973, 0
  store ptr %974, ptr %6, align 8
  %975 = extractvalue { ptr, i32 } %973, 1
  store i32 %975, ptr %7, align 4
  br label %980

976:                                              ; preds = %931
  %977 = landingpad { ptr, i32 }
          cleanup
  %978 = extractvalue { ptr, i32 } %977, 0
  store ptr %978, ptr %6, align 8
  %979 = extractvalue { ptr, i32 } %977, 1
  store i32 %979, ptr %7, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %93) #6
  br label %980

980:                                              ; preds = %976, %972
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %94) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %94) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %93) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %91) #6
  br label %981

981:                                              ; preds = %980, %968
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %92) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %92) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %91) #6
  br label %1550

982:                                              ; preds = %998, %996, %995, %963, %960, %932
  %983 = landingpad { ptr, i32 }
          cleanup
  %984 = extractvalue { ptr, i32 } %983, 0
  store ptr %984, ptr %6, align 8
  %985 = extractvalue { ptr, i32 } %983, 1
  store i32 %985, ptr %7, align 4
  br label %1549

986:                                              ; preds = %941, %933
  %987 = landingpad { ptr, i32 }
          cleanup
  %988 = extractvalue { ptr, i32 } %987, 0
  store ptr %988, ptr %6, align 8
  %989 = extractvalue { ptr, i32 } %987, 1
  store i32 %989, ptr %7, align 4
  br label %994

990:                                              ; preds = %954, %946
  %991 = landingpad { ptr, i32 }
          cleanup
  %992 = extractvalue { ptr, i32 } %991, 0
  store ptr %992, ptr %6, align 8
  %993 = extractvalue { ptr, i32 } %991, 1
  store i32 %993, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %97) #6
  br label %994

994:                                              ; preds = %990, %986
  call void @llvm.lifetime.end.p0(i64 16, ptr %96) #6
  br label %1549

995:                                              ; preds = %965, %958
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE4openEPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248) %8, ptr noundef @.str.106, i32 noundef 16)
          to label %996 unwind label %982

996:                                              ; preds = %995
  %997 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef @.str.23)
          to label %998 unwind label %982

998:                                              ; preds = %996
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE5closeEv(ptr noundef nonnull align 8 dereferenceable(248) %8)
          to label %999 unwind label %982

999:                                              ; preds = %998
  call void @llvm.lifetime.start.p0(i64 10128, ptr %98) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr %99) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %100) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %100) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %99, ptr noundef @.str.118, ptr noundef nonnull align 1 dereferenceable(1) %100)
          to label %1000 unwind label %1037

1000:                                             ; preds = %999
  call void @llvm.lifetime.start.p0(i64 32, ptr %101) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %102) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %102) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %101, ptr noundef @.str.106, ptr noundef nonnull align 1 dereferenceable(1) %102)
          to label %1001 unwind label %1041

1001:                                             ; preds = %1000
  invoke void @_ZN6qtorch16ContractionToolsC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_i(ptr noundef nonnull align 8 dereferenceable(10128) %98, ptr noundef nonnull align 8 dereferenceable(32) %99, ptr noundef nonnull align 8 dereferenceable(32) %101, i32 noundef 8)
          to label %1002 unwind label %1045

1002:                                             ; preds = %1001
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %101) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %102) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %102) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %101) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %99) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %100) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %100) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %99) #6
  invoke void @_ZN6qtorch16ContractionTools8ContractENS_15ContractionTypeEii(ptr dead_on_unwind writable sret(%"class.std::shared_ptr.178") align 8 %103, ptr noundef nonnull align 8 dereferenceable(10128) %98, i32 noundef 0, i32 noundef 1, i32 noundef 1)
          to label %1003 unwind label %1051

1003:                                             ; preds = %1002
  call void @_ZNSt12__shared_ptrIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %103) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %104) #6
  %1004 = call { double, double } @_ZN6qtorch16ContractionTools11GetFinalValEv(ptr noundef nonnull align 8 dereferenceable(10128) %98) #6
  %1005 = getelementptr inbounds %"class.std::complex", ptr %104, i32 0, i32 0
  %1006 = getelementptr inbounds { double, double }, ptr %1005, i32 0, i32 0
  %1007 = extractvalue { double, double } %1004, 0
  store double %1007, ptr %1006, align 8
  %1008 = getelementptr inbounds { double, double }, ptr %1005, i32 0, i32 1
  %1009 = extractvalue { double, double } %1004, 1
  store double %1009, ptr %1008, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %105) #6
  %1010 = invoke noundef double @_ZNKSt7complexIdE4realB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(16) %104)
          to label %1011 unwind label %1055

1011:                                             ; preds = %1003
  %1012 = invoke noundef double @_ZSt3absd(double noundef %1010)
          to label %1013 unwind label %1055

1013:                                             ; preds = %1011
  %1014 = fcmp ogt double %1012, 1.000000e-05
  br i1 %1014, label %1027, label %1015

1015:                                             ; preds = %1013
  %1016 = call { double, double } @_ZN6qtorch16ContractionTools11GetFinalValEv(ptr noundef nonnull align 8 dereferenceable(10128) %98) #6
  %1017 = getelementptr inbounds %"class.std::complex", ptr %105, i32 0, i32 0
  %1018 = getelementptr inbounds { double, double }, ptr %1017, i32 0, i32 0
  %1019 = extractvalue { double, double } %1016, 0
  store double %1019, ptr %1018, align 8
  %1020 = getelementptr inbounds { double, double }, ptr %1017, i32 0, i32 1
  %1021 = extractvalue { double, double } %1016, 1
  store double %1021, ptr %1020, align 8
  %1022 = invoke noundef double @_ZNKSt7complexIdE4imagB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(16) %105)
          to label %1023 unwind label %1059

1023:                                             ; preds = %1015
  %1024 = invoke noundef double @_ZSt3absd(double noundef %1022)
          to label %1025 unwind label %1059

1025:                                             ; preds = %1023
  %1026 = fcmp ogt double %1024, 1.000000e-05
  br label %1027

1027:                                             ; preds = %1025, %1013
  %1028 = phi i1 [ true, %1013 ], [ %1026, %1025 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr %105) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %104) #6
  br i1 %1028, label %1029, label %1064

1029:                                             ; preds = %1027
  %1030 = load ptr, ptr %2, align 8, !tbaa !5
  %1031 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %1030, ptr noundef @.str.153)
          to label %1032 unwind label %1051

1032:                                             ; preds = %1029
  %1033 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %1031, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %1034 unwind label %1051

1034:                                             ; preds = %1032
  %1035 = load i32, ptr %3, align 4, !tbaa !9
  %1036 = add nsw i32 %1035, 1
  store i32 %1036, ptr %3, align 4, !tbaa !9
  store i8 0, ptr %4, align 1, !tbaa !11
  br label %1064

1037:                                             ; preds = %999
  %1038 = landingpad { ptr, i32 }
          cleanup
  %1039 = extractvalue { ptr, i32 } %1038, 0
  store ptr %1039, ptr %6, align 8
  %1040 = extractvalue { ptr, i32 } %1038, 1
  store i32 %1040, ptr %7, align 4
  br label %1050

1041:                                             ; preds = %1000
  %1042 = landingpad { ptr, i32 }
          cleanup
  %1043 = extractvalue { ptr, i32 } %1042, 0
  store ptr %1043, ptr %6, align 8
  %1044 = extractvalue { ptr, i32 } %1042, 1
  store i32 %1044, ptr %7, align 4
  br label %1049

1045:                                             ; preds = %1001
  %1046 = landingpad { ptr, i32 }
          cleanup
  %1047 = extractvalue { ptr, i32 } %1046, 0
  store ptr %1047, ptr %6, align 8
  %1048 = extractvalue { ptr, i32 } %1046, 1
  store i32 %1048, ptr %7, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %101) #6
  br label %1049

1049:                                             ; preds = %1045, %1041
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %102) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %102) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %101) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %99) #6
  br label %1050

1050:                                             ; preds = %1049, %1037
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %100) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %100) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %99) #6
  br label %1548

1051:                                             ; preds = %1077, %1075, %1074, %1073, %1071, %1069, %1067, %1065, %1064, %1032, %1029, %1002
  %1052 = landingpad { ptr, i32 }
          cleanup
  %1053 = extractvalue { ptr, i32 } %1052, 0
  store ptr %1053, ptr %6, align 8
  %1054 = extractvalue { ptr, i32 } %1052, 1
  store i32 %1054, ptr %7, align 4
  br label %1547

1055:                                             ; preds = %1011, %1003
  %1056 = landingpad { ptr, i32 }
          cleanup
  %1057 = extractvalue { ptr, i32 } %1056, 0
  store ptr %1057, ptr %6, align 8
  %1058 = extractvalue { ptr, i32 } %1056, 1
  store i32 %1058, ptr %7, align 4
  br label %1063

1059:                                             ; preds = %1023, %1015
  %1060 = landingpad { ptr, i32 }
          cleanup
  %1061 = extractvalue { ptr, i32 } %1060, 0
  store ptr %1061, ptr %6, align 8
  %1062 = extractvalue { ptr, i32 } %1060, 1
  store i32 %1062, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %105) #6
  br label %1063

1063:                                             ; preds = %1059, %1055
  call void @llvm.lifetime.end.p0(i64 16, ptr %104) #6
  br label %1547

1064:                                             ; preds = %1034, %1027
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE4openEPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248) %5, ptr noundef @.str.118, i32 noundef 16)
          to label %1065 unwind label %1051

1065:                                             ; preds = %1064
  %1066 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef @.str.119)
          to label %1067 unwind label %1051

1067:                                             ; preds = %1065
  %1068 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %1066, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %1069 unwind label %1051

1069:                                             ; preds = %1067
  %1070 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef @.str.154)
          to label %1071 unwind label %1051

1071:                                             ; preds = %1069
  %1072 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %1070, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %1073 unwind label %1051

1073:                                             ; preds = %1071
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE5closeEv(ptr noundef nonnull align 8 dereferenceable(248) %5)
          to label %1074 unwind label %1051

1074:                                             ; preds = %1073
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE4openEPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248) %8, ptr noundef @.str.106, i32 noundef 16)
          to label %1075 unwind label %1051

1075:                                             ; preds = %1074
  %1076 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef @.str.21)
          to label %1077 unwind label %1051

1077:                                             ; preds = %1075
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE5closeEv(ptr noundef nonnull align 8 dereferenceable(248) %8)
          to label %1078 unwind label %1051

1078:                                             ; preds = %1077
  call void @llvm.lifetime.start.p0(i64 10128, ptr %106) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr %107) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %108) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %108) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %107, ptr noundef @.str.118, ptr noundef nonnull align 1 dereferenceable(1) %108)
          to label %1079 unwind label %1116

1079:                                             ; preds = %1078
  call void @llvm.lifetime.start.p0(i64 32, ptr %109) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %110) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %110) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %109, ptr noundef @.str.106, ptr noundef nonnull align 1 dereferenceable(1) %110)
          to label %1080 unwind label %1120

1080:                                             ; preds = %1079
  invoke void @_ZN6qtorch16ContractionToolsC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_i(ptr noundef nonnull align 8 dereferenceable(10128) %106, ptr noundef nonnull align 8 dereferenceable(32) %107, ptr noundef nonnull align 8 dereferenceable(32) %109, i32 noundef 8)
          to label %1081 unwind label %1124

1081:                                             ; preds = %1080
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %109) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %110) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %110) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %109) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %107) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %108) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %108) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %107) #6
  invoke void @_ZN6qtorch16ContractionTools8ContractENS_15ContractionTypeEii(ptr dead_on_unwind writable sret(%"class.std::shared_ptr.178") align 8 %111, ptr noundef nonnull align 8 dereferenceable(10128) %106, i32 noundef 0, i32 noundef 1, i32 noundef 1)
          to label %1082 unwind label %1130

1082:                                             ; preds = %1081
  call void @_ZNSt12__shared_ptrIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %111) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %112) #6
  %1083 = call { double, double } @_ZN6qtorch16ContractionTools11GetFinalValEv(ptr noundef nonnull align 8 dereferenceable(10128) %106) #6
  %1084 = getelementptr inbounds %"class.std::complex", ptr %112, i32 0, i32 0
  %1085 = getelementptr inbounds { double, double }, ptr %1084, i32 0, i32 0
  %1086 = extractvalue { double, double } %1083, 0
  store double %1086, ptr %1085, align 8
  %1087 = getelementptr inbounds { double, double }, ptr %1084, i32 0, i32 1
  %1088 = extractvalue { double, double } %1083, 1
  store double %1088, ptr %1087, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %113) #6
  %1089 = invoke noundef double @_ZNKSt7complexIdE4realB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(16) %112)
          to label %1090 unwind label %1134

1090:                                             ; preds = %1082
  %1091 = invoke noundef double @_ZSt3absd(double noundef %1089)
          to label %1092 unwind label %1134

1092:                                             ; preds = %1090
  %1093 = fcmp ogt double %1091, 1.000000e-05
  br i1 %1093, label %1106, label %1094

1094:                                             ; preds = %1092
  %1095 = call { double, double } @_ZN6qtorch16ContractionTools11GetFinalValEv(ptr noundef nonnull align 8 dereferenceable(10128) %106) #6
  %1096 = getelementptr inbounds %"class.std::complex", ptr %113, i32 0, i32 0
  %1097 = getelementptr inbounds { double, double }, ptr %1096, i32 0, i32 0
  %1098 = extractvalue { double, double } %1095, 0
  store double %1098, ptr %1097, align 8
  %1099 = getelementptr inbounds { double, double }, ptr %1096, i32 0, i32 1
  %1100 = extractvalue { double, double } %1095, 1
  store double %1100, ptr %1099, align 8
  %1101 = invoke noundef double @_ZNKSt7complexIdE4imagB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(16) %113)
          to label %1102 unwind label %1138

1102:                                             ; preds = %1094
  %1103 = invoke noundef double @_ZSt3absd(double noundef %1101)
          to label %1104 unwind label %1138

1104:                                             ; preds = %1102
  %1105 = fcmp ogt double %1103, 1.000000e-05
  br label %1106

1106:                                             ; preds = %1104, %1092
  %1107 = phi i1 [ true, %1092 ], [ %1105, %1104 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr %113) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %112) #6
  br i1 %1107, label %1108, label %1143

1108:                                             ; preds = %1106
  %1109 = load ptr, ptr %2, align 8, !tbaa !5
  %1110 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %1109, ptr noundef @.str.155)
          to label %1111 unwind label %1130

1111:                                             ; preds = %1108
  %1112 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %1110, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %1113 unwind label %1130

1113:                                             ; preds = %1111
  %1114 = load i32, ptr %3, align 4, !tbaa !9
  %1115 = add nsw i32 %1114, 1
  store i32 %1115, ptr %3, align 4, !tbaa !9
  store i8 0, ptr %4, align 1, !tbaa !11
  br label %1143

1116:                                             ; preds = %1078
  %1117 = landingpad { ptr, i32 }
          cleanup
  %1118 = extractvalue { ptr, i32 } %1117, 0
  store ptr %1118, ptr %6, align 8
  %1119 = extractvalue { ptr, i32 } %1117, 1
  store i32 %1119, ptr %7, align 4
  br label %1129

1120:                                             ; preds = %1079
  %1121 = landingpad { ptr, i32 }
          cleanup
  %1122 = extractvalue { ptr, i32 } %1121, 0
  store ptr %1122, ptr %6, align 8
  %1123 = extractvalue { ptr, i32 } %1121, 1
  store i32 %1123, ptr %7, align 4
  br label %1128

1124:                                             ; preds = %1080
  %1125 = landingpad { ptr, i32 }
          cleanup
  %1126 = extractvalue { ptr, i32 } %1125, 0
  store ptr %1126, ptr %6, align 8
  %1127 = extractvalue { ptr, i32 } %1125, 1
  store i32 %1127, ptr %7, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %109) #6
  br label %1128

1128:                                             ; preds = %1124, %1120
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %110) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %110) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %109) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %107) #6
  br label %1129

1129:                                             ; preds = %1128, %1116
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %108) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %108) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %107) #6
  br label %1546

1130:                                             ; preds = %1146, %1144, %1143, %1111, %1108, %1081
  %1131 = landingpad { ptr, i32 }
          cleanup
  %1132 = extractvalue { ptr, i32 } %1131, 0
  store ptr %1132, ptr %6, align 8
  %1133 = extractvalue { ptr, i32 } %1131, 1
  store i32 %1133, ptr %7, align 4
  br label %1545

1134:                                             ; preds = %1090, %1082
  %1135 = landingpad { ptr, i32 }
          cleanup
  %1136 = extractvalue { ptr, i32 } %1135, 0
  store ptr %1136, ptr %6, align 8
  %1137 = extractvalue { ptr, i32 } %1135, 1
  store i32 %1137, ptr %7, align 4
  br label %1142

1138:                                             ; preds = %1102, %1094
  %1139 = landingpad { ptr, i32 }
          cleanup
  %1140 = extractvalue { ptr, i32 } %1139, 0
  store ptr %1140, ptr %6, align 8
  %1141 = extractvalue { ptr, i32 } %1139, 1
  store i32 %1141, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %113) #6
  br label %1142

1142:                                             ; preds = %1138, %1134
  call void @llvm.lifetime.end.p0(i64 16, ptr %112) #6
  br label %1545

1143:                                             ; preds = %1113, %1106
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE4openEPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248) %8, ptr noundef @.str.106, i32 noundef 16)
          to label %1144 unwind label %1130

1144:                                             ; preds = %1143
  %1145 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef @.str.22)
          to label %1146 unwind label %1130

1146:                                             ; preds = %1144
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE5closeEv(ptr noundef nonnull align 8 dereferenceable(248) %8)
          to label %1147 unwind label %1130

1147:                                             ; preds = %1146
  call void @llvm.lifetime.start.p0(i64 10128, ptr %114) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr %115) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %116) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %116) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %115, ptr noundef @.str.118, ptr noundef nonnull align 1 dereferenceable(1) %116)
          to label %1148 unwind label %1186

1148:                                             ; preds = %1147
  call void @llvm.lifetime.start.p0(i64 32, ptr %117) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %118) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %118) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %117, ptr noundef @.str.106, ptr noundef nonnull align 1 dereferenceable(1) %118)
          to label %1149 unwind label %1190

1149:                                             ; preds = %1148
  invoke void @_ZN6qtorch16ContractionToolsC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_i(ptr noundef nonnull align 8 dereferenceable(10128) %114, ptr noundef nonnull align 8 dereferenceable(32) %115, ptr noundef nonnull align 8 dereferenceable(32) %117, i32 noundef 8)
          to label %1150 unwind label %1194

1150:                                             ; preds = %1149
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %117) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %118) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %118) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %117) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %115) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %116) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %116) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %115) #6
  invoke void @_ZN6qtorch16ContractionTools8ContractENS_15ContractionTypeEii(ptr dead_on_unwind writable sret(%"class.std::shared_ptr.178") align 8 %119, ptr noundef nonnull align 8 dereferenceable(10128) %114, i32 noundef 0, i32 noundef 1, i32 noundef 1)
          to label %1151 unwind label %1200

1151:                                             ; preds = %1150
  call void @_ZNSt12__shared_ptrIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %119) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %120) #6
  %1152 = call { double, double } @_ZN6qtorch16ContractionTools11GetFinalValEv(ptr noundef nonnull align 8 dereferenceable(10128) %114) #6
  %1153 = getelementptr inbounds %"class.std::complex", ptr %120, i32 0, i32 0
  %1154 = getelementptr inbounds { double, double }, ptr %1153, i32 0, i32 0
  %1155 = extractvalue { double, double } %1152, 0
  store double %1155, ptr %1154, align 8
  %1156 = getelementptr inbounds { double, double }, ptr %1153, i32 0, i32 1
  %1157 = extractvalue { double, double } %1152, 1
  store double %1157, ptr %1156, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %121) #6
  %1158 = invoke noundef double @_ZNKSt7complexIdE4realB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(16) %120)
          to label %1159 unwind label %1204

1159:                                             ; preds = %1151
  %1160 = fadd double %1158, 0x3FB98EAECB8BC33F
  %1161 = invoke noundef double @_ZSt3absd(double noundef %1160)
          to label %1162 unwind label %1204

1162:                                             ; preds = %1159
  %1163 = fcmp ogt double %1161, 1.000000e-05
  br i1 %1163, label %1176, label %1164

1164:                                             ; preds = %1162
  %1165 = call { double, double } @_ZN6qtorch16ContractionTools11GetFinalValEv(ptr noundef nonnull align 8 dereferenceable(10128) %114) #6
  %1166 = getelementptr inbounds %"class.std::complex", ptr %121, i32 0, i32 0
  %1167 = getelementptr inbounds { double, double }, ptr %1166, i32 0, i32 0
  %1168 = extractvalue { double, double } %1165, 0
  store double %1168, ptr %1167, align 8
  %1169 = getelementptr inbounds { double, double }, ptr %1166, i32 0, i32 1
  %1170 = extractvalue { double, double } %1165, 1
  store double %1170, ptr %1169, align 8
  %1171 = invoke noundef double @_ZNKSt7complexIdE4imagB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(16) %121)
          to label %1172 unwind label %1208

1172:                                             ; preds = %1164
  %1173 = invoke noundef double @_ZSt3absd(double noundef %1171)
          to label %1174 unwind label %1208

1174:                                             ; preds = %1172
  %1175 = fcmp ogt double %1173, 1.000000e-05
  br label %1176

1176:                                             ; preds = %1174, %1162
  %1177 = phi i1 [ true, %1162 ], [ %1175, %1174 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr %121) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %120) #6
  br i1 %1177, label %1178, label %1213

1178:                                             ; preds = %1176
  %1179 = load ptr, ptr %2, align 8, !tbaa !5
  %1180 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %1179, ptr noundef @.str.156)
          to label %1181 unwind label %1200

1181:                                             ; preds = %1178
  %1182 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %1180, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %1183 unwind label %1200

1183:                                             ; preds = %1181
  %1184 = load i32, ptr %3, align 4, !tbaa !9
  %1185 = add nsw i32 %1184, 1
  store i32 %1185, ptr %3, align 4, !tbaa !9
  store i8 0, ptr %4, align 1, !tbaa !11
  br label %1213

1186:                                             ; preds = %1147
  %1187 = landingpad { ptr, i32 }
          cleanup
  %1188 = extractvalue { ptr, i32 } %1187, 0
  store ptr %1188, ptr %6, align 8
  %1189 = extractvalue { ptr, i32 } %1187, 1
  store i32 %1189, ptr %7, align 4
  br label %1199

1190:                                             ; preds = %1148
  %1191 = landingpad { ptr, i32 }
          cleanup
  %1192 = extractvalue { ptr, i32 } %1191, 0
  store ptr %1192, ptr %6, align 8
  %1193 = extractvalue { ptr, i32 } %1191, 1
  store i32 %1193, ptr %7, align 4
  br label %1198

1194:                                             ; preds = %1149
  %1195 = landingpad { ptr, i32 }
          cleanup
  %1196 = extractvalue { ptr, i32 } %1195, 0
  store ptr %1196, ptr %6, align 8
  %1197 = extractvalue { ptr, i32 } %1195, 1
  store i32 %1197, ptr %7, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %117) #6
  br label %1198

1198:                                             ; preds = %1194, %1190
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %118) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %118) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %117) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %115) #6
  br label %1199

1199:                                             ; preds = %1198, %1186
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %116) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %116) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %115) #6
  br label %1544

1200:                                             ; preds = %1216, %1214, %1213, %1181, %1178, %1150
  %1201 = landingpad { ptr, i32 }
          cleanup
  %1202 = extractvalue { ptr, i32 } %1201, 0
  store ptr %1202, ptr %6, align 8
  %1203 = extractvalue { ptr, i32 } %1201, 1
  store i32 %1203, ptr %7, align 4
  br label %1543

1204:                                             ; preds = %1159, %1151
  %1205 = landingpad { ptr, i32 }
          cleanup
  %1206 = extractvalue { ptr, i32 } %1205, 0
  store ptr %1206, ptr %6, align 8
  %1207 = extractvalue { ptr, i32 } %1205, 1
  store i32 %1207, ptr %7, align 4
  br label %1212

1208:                                             ; preds = %1172, %1164
  %1209 = landingpad { ptr, i32 }
          cleanup
  %1210 = extractvalue { ptr, i32 } %1209, 0
  store ptr %1210, ptr %6, align 8
  %1211 = extractvalue { ptr, i32 } %1209, 1
  store i32 %1211, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %121) #6
  br label %1212

1212:                                             ; preds = %1208, %1204
  call void @llvm.lifetime.end.p0(i64 16, ptr %120) #6
  br label %1543

1213:                                             ; preds = %1183, %1176
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE4openEPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248) %8, ptr noundef @.str.106, i32 noundef 16)
          to label %1214 unwind label %1200

1214:                                             ; preds = %1213
  %1215 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef @.str.23)
          to label %1216 unwind label %1200

1216:                                             ; preds = %1214
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE5closeEv(ptr noundef nonnull align 8 dereferenceable(248) %8)
          to label %1217 unwind label %1200

1217:                                             ; preds = %1216
  call void @llvm.lifetime.start.p0(i64 10128, ptr %122) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr %123) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %124) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %124) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %123, ptr noundef @.str.118, ptr noundef nonnull align 1 dereferenceable(1) %124)
          to label %1218 unwind label %1256

1218:                                             ; preds = %1217
  call void @llvm.lifetime.start.p0(i64 32, ptr %125) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %126) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %126) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %125, ptr noundef @.str.106, ptr noundef nonnull align 1 dereferenceable(1) %126)
          to label %1219 unwind label %1260

1219:                                             ; preds = %1218
  invoke void @_ZN6qtorch16ContractionToolsC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_i(ptr noundef nonnull align 8 dereferenceable(10128) %122, ptr noundef nonnull align 8 dereferenceable(32) %123, ptr noundef nonnull align 8 dereferenceable(32) %125, i32 noundef 8)
          to label %1220 unwind label %1264

1220:                                             ; preds = %1219
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %125) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %126) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %126) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %125) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %123) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %124) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %124) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %123) #6
  invoke void @_ZN6qtorch16ContractionTools8ContractENS_15ContractionTypeEii(ptr dead_on_unwind writable sret(%"class.std::shared_ptr.178") align 8 %127, ptr noundef nonnull align 8 dereferenceable(10128) %122, i32 noundef 0, i32 noundef 1, i32 noundef 1)
          to label %1221 unwind label %1270

1221:                                             ; preds = %1220
  call void @_ZNSt12__shared_ptrIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %127) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %128) #6
  %1222 = call { double, double } @_ZN6qtorch16ContractionTools11GetFinalValEv(ptr noundef nonnull align 8 dereferenceable(10128) %122) #6
  %1223 = getelementptr inbounds %"class.std::complex", ptr %128, i32 0, i32 0
  %1224 = getelementptr inbounds { double, double }, ptr %1223, i32 0, i32 0
  %1225 = extractvalue { double, double } %1222, 0
  store double %1225, ptr %1224, align 8
  %1226 = getelementptr inbounds { double, double }, ptr %1223, i32 0, i32 1
  %1227 = extractvalue { double, double } %1222, 1
  store double %1227, ptr %1226, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %129) #6
  %1228 = invoke noundef double @_ZNKSt7complexIdE4realB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(16) %128)
          to label %1229 unwind label %1274

1229:                                             ; preds = %1221
  %1230 = fsub double %1228, 0x3FEFD712F9A816D8
  %1231 = invoke noundef double @_ZSt3absd(double noundef %1230)
          to label %1232 unwind label %1274

1232:                                             ; preds = %1229
  %1233 = fcmp ogt double %1231, 1.000000e-05
  br i1 %1233, label %1246, label %1234

1234:                                             ; preds = %1232
  %1235 = call { double, double } @_ZN6qtorch16ContractionTools11GetFinalValEv(ptr noundef nonnull align 8 dereferenceable(10128) %122) #6
  %1236 = getelementptr inbounds %"class.std::complex", ptr %129, i32 0, i32 0
  %1237 = getelementptr inbounds { double, double }, ptr %1236, i32 0, i32 0
  %1238 = extractvalue { double, double } %1235, 0
  store double %1238, ptr %1237, align 8
  %1239 = getelementptr inbounds { double, double }, ptr %1236, i32 0, i32 1
  %1240 = extractvalue { double, double } %1235, 1
  store double %1240, ptr %1239, align 8
  %1241 = invoke noundef double @_ZNKSt7complexIdE4imagB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(16) %129)
          to label %1242 unwind label %1278

1242:                                             ; preds = %1234
  %1243 = invoke noundef double @_ZSt3absd(double noundef %1241)
          to label %1244 unwind label %1278

1244:                                             ; preds = %1242
  %1245 = fcmp ogt double %1243, 1.000000e-05
  br label %1246

1246:                                             ; preds = %1244, %1232
  %1247 = phi i1 [ true, %1232 ], [ %1245, %1244 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr %129) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %128) #6
  br i1 %1247, label %1248, label %1283

1248:                                             ; preds = %1246
  %1249 = load ptr, ptr %2, align 8, !tbaa !5
  %1250 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %1249, ptr noundef @.str.157)
          to label %1251 unwind label %1270

1251:                                             ; preds = %1248
  %1252 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %1250, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %1253 unwind label %1270

1253:                                             ; preds = %1251
  %1254 = load i32, ptr %3, align 4, !tbaa !9
  %1255 = add nsw i32 %1254, 1
  store i32 %1255, ptr %3, align 4, !tbaa !9
  store i8 0, ptr %4, align 1, !tbaa !11
  br label %1283

1256:                                             ; preds = %1217
  %1257 = landingpad { ptr, i32 }
          cleanup
  %1258 = extractvalue { ptr, i32 } %1257, 0
  store ptr %1258, ptr %6, align 8
  %1259 = extractvalue { ptr, i32 } %1257, 1
  store i32 %1259, ptr %7, align 4
  br label %1269

1260:                                             ; preds = %1218
  %1261 = landingpad { ptr, i32 }
          cleanup
  %1262 = extractvalue { ptr, i32 } %1261, 0
  store ptr %1262, ptr %6, align 8
  %1263 = extractvalue { ptr, i32 } %1261, 1
  store i32 %1263, ptr %7, align 4
  br label %1268

1264:                                             ; preds = %1219
  %1265 = landingpad { ptr, i32 }
          cleanup
  %1266 = extractvalue { ptr, i32 } %1265, 0
  store ptr %1266, ptr %6, align 8
  %1267 = extractvalue { ptr, i32 } %1265, 1
  store i32 %1267, ptr %7, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %125) #6
  br label %1268

1268:                                             ; preds = %1264, %1260
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %126) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %126) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %125) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %123) #6
  br label %1269

1269:                                             ; preds = %1268, %1256
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %124) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %124) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %123) #6
  br label %1542

1270:                                             ; preds = %1296, %1294, %1293, %1292, %1290, %1288, %1286, %1284, %1283, %1251, %1248, %1220
  %1271 = landingpad { ptr, i32 }
          cleanup
  %1272 = extractvalue { ptr, i32 } %1271, 0
  store ptr %1272, ptr %6, align 8
  %1273 = extractvalue { ptr, i32 } %1271, 1
  store i32 %1273, ptr %7, align 4
  br label %1541

1274:                                             ; preds = %1229, %1221
  %1275 = landingpad { ptr, i32 }
          cleanup
  %1276 = extractvalue { ptr, i32 } %1275, 0
  store ptr %1276, ptr %6, align 8
  %1277 = extractvalue { ptr, i32 } %1275, 1
  store i32 %1277, ptr %7, align 4
  br label %1282

1278:                                             ; preds = %1242, %1234
  %1279 = landingpad { ptr, i32 }
          cleanup
  %1280 = extractvalue { ptr, i32 } %1279, 0
  store ptr %1280, ptr %6, align 8
  %1281 = extractvalue { ptr, i32 } %1279, 1
  store i32 %1281, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %129) #6
  br label %1282

1282:                                             ; preds = %1278, %1274
  call void @llvm.lifetime.end.p0(i64 16, ptr %128) #6
  br label %1541

1283:                                             ; preds = %1253, %1246
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE4openEPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248) %5, ptr noundef @.str.118, i32 noundef 16)
          to label %1284 unwind label %1270

1284:                                             ; preds = %1283
  %1285 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef @.str.119)
          to label %1286 unwind label %1270

1286:                                             ; preds = %1284
  %1287 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %1285, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %1288 unwind label %1270

1288:                                             ; preds = %1286
  %1289 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef @.str.158)
          to label %1290 unwind label %1270

1290:                                             ; preds = %1288
  %1291 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %1289, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %1292 unwind label %1270

1292:                                             ; preds = %1290
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE5closeEv(ptr noundef nonnull align 8 dereferenceable(248) %5)
          to label %1293 unwind label %1270

1293:                                             ; preds = %1292
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE4openEPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248) %8, ptr noundef @.str.106, i32 noundef 16)
          to label %1294 unwind label %1270

1294:                                             ; preds = %1293
  %1295 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef @.str.21)
          to label %1296 unwind label %1270

1296:                                             ; preds = %1294
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE5closeEv(ptr noundef nonnull align 8 dereferenceable(248) %8)
          to label %1297 unwind label %1270

1297:                                             ; preds = %1296
  call void @llvm.lifetime.start.p0(i64 10128, ptr %130) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr %131) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %132) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %132) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %131, ptr noundef @.str.118, ptr noundef nonnull align 1 dereferenceable(1) %132)
          to label %1298 unwind label %1335

1298:                                             ; preds = %1297
  call void @llvm.lifetime.start.p0(i64 32, ptr %133) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %134) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %134) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %133, ptr noundef @.str.106, ptr noundef nonnull align 1 dereferenceable(1) %134)
          to label %1299 unwind label %1339

1299:                                             ; preds = %1298
  invoke void @_ZN6qtorch16ContractionToolsC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_i(ptr noundef nonnull align 8 dereferenceable(10128) %130, ptr noundef nonnull align 8 dereferenceable(32) %131, ptr noundef nonnull align 8 dereferenceable(32) %133, i32 noundef 8)
          to label %1300 unwind label %1343

1300:                                             ; preds = %1299
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %133) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %134) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %134) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %133) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %131) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %132) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %132) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %131) #6
  invoke void @_ZN6qtorch16ContractionTools8ContractENS_15ContractionTypeEii(ptr dead_on_unwind writable sret(%"class.std::shared_ptr.178") align 8 %135, ptr noundef nonnull align 8 dereferenceable(10128) %130, i32 noundef 0, i32 noundef 1, i32 noundef 1)
          to label %1301 unwind label %1349

1301:                                             ; preds = %1300
  call void @_ZNSt12__shared_ptrIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %135) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %136) #6
  %1302 = call { double, double } @_ZN6qtorch16ContractionTools11GetFinalValEv(ptr noundef nonnull align 8 dereferenceable(10128) %130) #6
  %1303 = getelementptr inbounds %"class.std::complex", ptr %136, i32 0, i32 0
  %1304 = getelementptr inbounds { double, double }, ptr %1303, i32 0, i32 0
  %1305 = extractvalue { double, double } %1302, 0
  store double %1305, ptr %1304, align 8
  %1306 = getelementptr inbounds { double, double }, ptr %1303, i32 0, i32 1
  %1307 = extractvalue { double, double } %1302, 1
  store double %1307, ptr %1306, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %137) #6
  %1308 = invoke noundef double @_ZNKSt7complexIdE4realB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(16) %136)
          to label %1309 unwind label %1353

1309:                                             ; preds = %1301
  %1310 = invoke noundef double @_ZSt3absd(double noundef %1308)
          to label %1311 unwind label %1353

1311:                                             ; preds = %1309
  %1312 = fcmp ogt double %1310, 1.000000e-05
  br i1 %1312, label %1325, label %1313

1313:                                             ; preds = %1311
  %1314 = call { double, double } @_ZN6qtorch16ContractionTools11GetFinalValEv(ptr noundef nonnull align 8 dereferenceable(10128) %130) #6
  %1315 = getelementptr inbounds %"class.std::complex", ptr %137, i32 0, i32 0
  %1316 = getelementptr inbounds { double, double }, ptr %1315, i32 0, i32 0
  %1317 = extractvalue { double, double } %1314, 0
  store double %1317, ptr %1316, align 8
  %1318 = getelementptr inbounds { double, double }, ptr %1315, i32 0, i32 1
  %1319 = extractvalue { double, double } %1314, 1
  store double %1319, ptr %1318, align 8
  %1320 = invoke noundef double @_ZNKSt7complexIdE4imagB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(16) %137)
          to label %1321 unwind label %1357

1321:                                             ; preds = %1313
  %1322 = invoke noundef double @_ZSt3absd(double noundef %1320)
          to label %1323 unwind label %1357

1323:                                             ; preds = %1321
  %1324 = fcmp ogt double %1322, 1.000000e-05
  br label %1325

1325:                                             ; preds = %1323, %1311
  %1326 = phi i1 [ true, %1311 ], [ %1324, %1323 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr %137) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %136) #6
  br i1 %1326, label %1327, label %1362

1327:                                             ; preds = %1325
  %1328 = load ptr, ptr %2, align 8, !tbaa !5
  %1329 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %1328, ptr noundef @.str.159)
          to label %1330 unwind label %1349

1330:                                             ; preds = %1327
  %1331 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %1329, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %1332 unwind label %1349

1332:                                             ; preds = %1330
  %1333 = load i32, ptr %3, align 4, !tbaa !9
  %1334 = add nsw i32 %1333, 1
  store i32 %1334, ptr %3, align 4, !tbaa !9
  store i8 0, ptr %4, align 1, !tbaa !11
  br label %1362

1335:                                             ; preds = %1297
  %1336 = landingpad { ptr, i32 }
          cleanup
  %1337 = extractvalue { ptr, i32 } %1336, 0
  store ptr %1337, ptr %6, align 8
  %1338 = extractvalue { ptr, i32 } %1336, 1
  store i32 %1338, ptr %7, align 4
  br label %1348

1339:                                             ; preds = %1298
  %1340 = landingpad { ptr, i32 }
          cleanup
  %1341 = extractvalue { ptr, i32 } %1340, 0
  store ptr %1341, ptr %6, align 8
  %1342 = extractvalue { ptr, i32 } %1340, 1
  store i32 %1342, ptr %7, align 4
  br label %1347

1343:                                             ; preds = %1299
  %1344 = landingpad { ptr, i32 }
          cleanup
  %1345 = extractvalue { ptr, i32 } %1344, 0
  store ptr %1345, ptr %6, align 8
  %1346 = extractvalue { ptr, i32 } %1344, 1
  store i32 %1346, ptr %7, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %133) #6
  br label %1347

1347:                                             ; preds = %1343, %1339
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %134) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %134) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %133) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %131) #6
  br label %1348

1348:                                             ; preds = %1347, %1335
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %132) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %132) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %131) #6
  br label %1540

1349:                                             ; preds = %1365, %1363, %1362, %1330, %1327, %1300
  %1350 = landingpad { ptr, i32 }
          cleanup
  %1351 = extractvalue { ptr, i32 } %1350, 0
  store ptr %1351, ptr %6, align 8
  %1352 = extractvalue { ptr, i32 } %1350, 1
  store i32 %1352, ptr %7, align 4
  br label %1539

1353:                                             ; preds = %1309, %1301
  %1354 = landingpad { ptr, i32 }
          cleanup
  %1355 = extractvalue { ptr, i32 } %1354, 0
  store ptr %1355, ptr %6, align 8
  %1356 = extractvalue { ptr, i32 } %1354, 1
  store i32 %1356, ptr %7, align 4
  br label %1361

1357:                                             ; preds = %1321, %1313
  %1358 = landingpad { ptr, i32 }
          cleanup
  %1359 = extractvalue { ptr, i32 } %1358, 0
  store ptr %1359, ptr %6, align 8
  %1360 = extractvalue { ptr, i32 } %1358, 1
  store i32 %1360, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %137) #6
  br label %1361

1361:                                             ; preds = %1357, %1353
  call void @llvm.lifetime.end.p0(i64 16, ptr %136) #6
  br label %1539

1362:                                             ; preds = %1332, %1325
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE4openEPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248) %8, ptr noundef @.str.106, i32 noundef 16)
          to label %1363 unwind label %1349

1363:                                             ; preds = %1362
  %1364 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef @.str.22)
          to label %1365 unwind label %1349

1365:                                             ; preds = %1363
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE5closeEv(ptr noundef nonnull align 8 dereferenceable(248) %8)
          to label %1366 unwind label %1349

1366:                                             ; preds = %1365
  call void @llvm.lifetime.start.p0(i64 10128, ptr %138) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr %139) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %140) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %140) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %139, ptr noundef @.str.118, ptr noundef nonnull align 1 dereferenceable(1) %140)
          to label %1367 unwind label %1405

1367:                                             ; preds = %1366
  call void @llvm.lifetime.start.p0(i64 32, ptr %141) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %142) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %142) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %141, ptr noundef @.str.106, ptr noundef nonnull align 1 dereferenceable(1) %142)
          to label %1368 unwind label %1409

1368:                                             ; preds = %1367
  invoke void @_ZN6qtorch16ContractionToolsC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_i(ptr noundef nonnull align 8 dereferenceable(10128) %138, ptr noundef nonnull align 8 dereferenceable(32) %139, ptr noundef nonnull align 8 dereferenceable(32) %141, i32 noundef 8)
          to label %1369 unwind label %1413

1369:                                             ; preds = %1368
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %141) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %142) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %142) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %141) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %139) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %140) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %140) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %139) #6
  invoke void @_ZN6qtorch16ContractionTools8ContractENS_15ContractionTypeEii(ptr dead_on_unwind writable sret(%"class.std::shared_ptr.178") align 8 %143, ptr noundef nonnull align 8 dereferenceable(10128) %138, i32 noundef 0, i32 noundef 1, i32 noundef 1)
          to label %1370 unwind label %1419

1370:                                             ; preds = %1369
  call void @_ZNSt12__shared_ptrIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %143) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %144) #6
  %1371 = call { double, double } @_ZN6qtorch16ContractionTools11GetFinalValEv(ptr noundef nonnull align 8 dereferenceable(10128) %138) #6
  %1372 = getelementptr inbounds %"class.std::complex", ptr %144, i32 0, i32 0
  %1373 = getelementptr inbounds { double, double }, ptr %1372, i32 0, i32 0
  %1374 = extractvalue { double, double } %1371, 0
  store double %1374, ptr %1373, align 8
  %1375 = getelementptr inbounds { double, double }, ptr %1372, i32 0, i32 1
  %1376 = extractvalue { double, double } %1371, 1
  store double %1376, ptr %1375, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %145) #6
  %1377 = invoke noundef double @_ZNKSt7complexIdE4realB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(16) %144)
          to label %1378 unwind label %1423

1378:                                             ; preds = %1370
  %1379 = fsub double %1377, 0x3FB98EAECB8BC33F
  %1380 = invoke noundef double @_ZSt3absd(double noundef %1379)
          to label %1381 unwind label %1423

1381:                                             ; preds = %1378
  %1382 = fcmp ogt double %1380, 1.000000e-05
  br i1 %1382, label %1395, label %1383

1383:                                             ; preds = %1381
  %1384 = call { double, double } @_ZN6qtorch16ContractionTools11GetFinalValEv(ptr noundef nonnull align 8 dereferenceable(10128) %138) #6
  %1385 = getelementptr inbounds %"class.std::complex", ptr %145, i32 0, i32 0
  %1386 = getelementptr inbounds { double, double }, ptr %1385, i32 0, i32 0
  %1387 = extractvalue { double, double } %1384, 0
  store double %1387, ptr %1386, align 8
  %1388 = getelementptr inbounds { double, double }, ptr %1385, i32 0, i32 1
  %1389 = extractvalue { double, double } %1384, 1
  store double %1389, ptr %1388, align 8
  %1390 = invoke noundef double @_ZNKSt7complexIdE4imagB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(16) %145)
          to label %1391 unwind label %1427

1391:                                             ; preds = %1383
  %1392 = invoke noundef double @_ZSt3absd(double noundef %1390)
          to label %1393 unwind label %1427

1393:                                             ; preds = %1391
  %1394 = fcmp ogt double %1392, 1.000000e-05
  br label %1395

1395:                                             ; preds = %1393, %1381
  %1396 = phi i1 [ true, %1381 ], [ %1394, %1393 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr %145) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %144) #6
  br i1 %1396, label %1397, label %1432

1397:                                             ; preds = %1395
  %1398 = load ptr, ptr %2, align 8, !tbaa !5
  %1399 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %1398, ptr noundef @.str.160)
          to label %1400 unwind label %1419

1400:                                             ; preds = %1397
  %1401 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %1399, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %1402 unwind label %1419

1402:                                             ; preds = %1400
  %1403 = load i32, ptr %3, align 4, !tbaa !9
  %1404 = add nsw i32 %1403, 1
  store i32 %1404, ptr %3, align 4, !tbaa !9
  store i8 0, ptr %4, align 1, !tbaa !11
  br label %1432

1405:                                             ; preds = %1366
  %1406 = landingpad { ptr, i32 }
          cleanup
  %1407 = extractvalue { ptr, i32 } %1406, 0
  store ptr %1407, ptr %6, align 8
  %1408 = extractvalue { ptr, i32 } %1406, 1
  store i32 %1408, ptr %7, align 4
  br label %1418

1409:                                             ; preds = %1367
  %1410 = landingpad { ptr, i32 }
          cleanup
  %1411 = extractvalue { ptr, i32 } %1410, 0
  store ptr %1411, ptr %6, align 8
  %1412 = extractvalue { ptr, i32 } %1410, 1
  store i32 %1412, ptr %7, align 4
  br label %1417

1413:                                             ; preds = %1368
  %1414 = landingpad { ptr, i32 }
          cleanup
  %1415 = extractvalue { ptr, i32 } %1414, 0
  store ptr %1415, ptr %6, align 8
  %1416 = extractvalue { ptr, i32 } %1414, 1
  store i32 %1416, ptr %7, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %141) #6
  br label %1417

1417:                                             ; preds = %1413, %1409
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %142) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %142) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %141) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %139) #6
  br label %1418

1418:                                             ; preds = %1417, %1405
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %140) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %140) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %139) #6
  br label %1538

1419:                                             ; preds = %1435, %1433, %1432, %1400, %1397, %1369
  %1420 = landingpad { ptr, i32 }
          cleanup
  %1421 = extractvalue { ptr, i32 } %1420, 0
  store ptr %1421, ptr %6, align 8
  %1422 = extractvalue { ptr, i32 } %1420, 1
  store i32 %1422, ptr %7, align 4
  br label %1537

1423:                                             ; preds = %1378, %1370
  %1424 = landingpad { ptr, i32 }
          cleanup
  %1425 = extractvalue { ptr, i32 } %1424, 0
  store ptr %1425, ptr %6, align 8
  %1426 = extractvalue { ptr, i32 } %1424, 1
  store i32 %1426, ptr %7, align 4
  br label %1431

1427:                                             ; preds = %1391, %1383
  %1428 = landingpad { ptr, i32 }
          cleanup
  %1429 = extractvalue { ptr, i32 } %1428, 0
  store ptr %1429, ptr %6, align 8
  %1430 = extractvalue { ptr, i32 } %1428, 1
  store i32 %1430, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %145) #6
  br label %1431

1431:                                             ; preds = %1427, %1423
  call void @llvm.lifetime.end.p0(i64 16, ptr %144) #6
  br label %1537

1432:                                             ; preds = %1402, %1395
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE4openEPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248) %8, ptr noundef @.str.106, i32 noundef 16)
          to label %1433 unwind label %1419

1433:                                             ; preds = %1432
  %1434 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef @.str.23)
          to label %1435 unwind label %1419

1435:                                             ; preds = %1433
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE5closeEv(ptr noundef nonnull align 8 dereferenceable(248) %8)
          to label %1436 unwind label %1419

1436:                                             ; preds = %1435
  call void @llvm.lifetime.start.p0(i64 10128, ptr %146) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr %147) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %148) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %148) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %147, ptr noundef @.str.118, ptr noundef nonnull align 1 dereferenceable(1) %148)
          to label %1437 unwind label %1475

1437:                                             ; preds = %1436
  call void @llvm.lifetime.start.p0(i64 32, ptr %149) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %150) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %150) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %149, ptr noundef @.str.106, ptr noundef nonnull align 1 dereferenceable(1) %150)
          to label %1438 unwind label %1479

1438:                                             ; preds = %1437
  invoke void @_ZN6qtorch16ContractionToolsC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_i(ptr noundef nonnull align 8 dereferenceable(10128) %146, ptr noundef nonnull align 8 dereferenceable(32) %147, ptr noundef nonnull align 8 dereferenceable(32) %149, i32 noundef 8)
          to label %1439 unwind label %1483

1439:                                             ; preds = %1438
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %149) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %150) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %150) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %149) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %147) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %148) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %148) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %147) #6
  invoke void @_ZN6qtorch16ContractionTools8ContractENS_15ContractionTypeEii(ptr dead_on_unwind writable sret(%"class.std::shared_ptr.178") align 8 %151, ptr noundef nonnull align 8 dereferenceable(10128) %146, i32 noundef 0, i32 noundef 1, i32 noundef 1)
          to label %1440 unwind label %1489

1440:                                             ; preds = %1439
  call void @_ZNSt12__shared_ptrIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %151) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %152) #6
  %1441 = call { double, double } @_ZN6qtorch16ContractionTools11GetFinalValEv(ptr noundef nonnull align 8 dereferenceable(10128) %146) #6
  %1442 = getelementptr inbounds %"class.std::complex", ptr %152, i32 0, i32 0
  %1443 = getelementptr inbounds { double, double }, ptr %1442, i32 0, i32 0
  %1444 = extractvalue { double, double } %1441, 0
  store double %1444, ptr %1443, align 8
  %1445 = getelementptr inbounds { double, double }, ptr %1442, i32 0, i32 1
  %1446 = extractvalue { double, double } %1441, 1
  store double %1446, ptr %1445, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %153) #6
  %1447 = invoke noundef double @_ZNKSt7complexIdE4realB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(16) %152)
          to label %1448 unwind label %1493

1448:                                             ; preds = %1440
  %1449 = fsub double %1447, 0x3FEFD712F9A816D8
  %1450 = invoke noundef double @_ZSt3absd(double noundef %1449)
          to label %1451 unwind label %1493

1451:                                             ; preds = %1448
  %1452 = fcmp ogt double %1450, 1.000000e-05
  br i1 %1452, label %1465, label %1453

1453:                                             ; preds = %1451
  %1454 = call { double, double } @_ZN6qtorch16ContractionTools11GetFinalValEv(ptr noundef nonnull align 8 dereferenceable(10128) %146) #6
  %1455 = getelementptr inbounds %"class.std::complex", ptr %153, i32 0, i32 0
  %1456 = getelementptr inbounds { double, double }, ptr %1455, i32 0, i32 0
  %1457 = extractvalue { double, double } %1454, 0
  store double %1457, ptr %1456, align 8
  %1458 = getelementptr inbounds { double, double }, ptr %1455, i32 0, i32 1
  %1459 = extractvalue { double, double } %1454, 1
  store double %1459, ptr %1458, align 8
  %1460 = invoke noundef double @_ZNKSt7complexIdE4imagB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(16) %153)
          to label %1461 unwind label %1497

1461:                                             ; preds = %1453
  %1462 = invoke noundef double @_ZSt3absd(double noundef %1460)
          to label %1463 unwind label %1497

1463:                                             ; preds = %1461
  %1464 = fcmp ogt double %1462, 1.000000e-05
  br label %1465

1465:                                             ; preds = %1463, %1451
  %1466 = phi i1 [ true, %1451 ], [ %1464, %1463 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr %153) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %152) #6
  br i1 %1466, label %1467, label %1502

1467:                                             ; preds = %1465
  %1468 = load ptr, ptr %2, align 8, !tbaa !5
  %1469 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %1468, ptr noundef @.str.161)
          to label %1470 unwind label %1489

1470:                                             ; preds = %1467
  %1471 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %1469, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %1472 unwind label %1489

1472:                                             ; preds = %1470
  %1473 = load i32, ptr %3, align 4, !tbaa !9
  %1474 = add nsw i32 %1473, 1
  store i32 %1474, ptr %3, align 4, !tbaa !9
  store i8 0, ptr %4, align 1, !tbaa !11
  br label %1502

1475:                                             ; preds = %1436
  %1476 = landingpad { ptr, i32 }
          cleanup
  %1477 = extractvalue { ptr, i32 } %1476, 0
  store ptr %1477, ptr %6, align 8
  %1478 = extractvalue { ptr, i32 } %1476, 1
  store i32 %1478, ptr %7, align 4
  br label %1488

1479:                                             ; preds = %1437
  %1480 = landingpad { ptr, i32 }
          cleanup
  %1481 = extractvalue { ptr, i32 } %1480, 0
  store ptr %1481, ptr %6, align 8
  %1482 = extractvalue { ptr, i32 } %1480, 1
  store i32 %1482, ptr %7, align 4
  br label %1487

1483:                                             ; preds = %1438
  %1484 = landingpad { ptr, i32 }
          cleanup
  %1485 = extractvalue { ptr, i32 } %1484, 0
  store ptr %1485, ptr %6, align 8
  %1486 = extractvalue { ptr, i32 } %1484, 1
  store i32 %1486, ptr %7, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %149) #6
  br label %1487

1487:                                             ; preds = %1483, %1479
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %150) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %150) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %149) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %147) #6
  br label %1488

1488:                                             ; preds = %1487, %1475
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %148) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %148) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %147) #6
  br label %1536

1489:                                             ; preds = %1508, %1505, %1502, %1470, %1467, %1439
  %1490 = landingpad { ptr, i32 }
          cleanup
  %1491 = extractvalue { ptr, i32 } %1490, 0
  store ptr %1491, ptr %6, align 8
  %1492 = extractvalue { ptr, i32 } %1490, 1
  store i32 %1492, ptr %7, align 4
  br label %1535

1493:                                             ; preds = %1448, %1440
  %1494 = landingpad { ptr, i32 }
          cleanup
  %1495 = extractvalue { ptr, i32 } %1494, 0
  store ptr %1495, ptr %6, align 8
  %1496 = extractvalue { ptr, i32 } %1494, 1
  store i32 %1496, ptr %7, align 4
  br label %1501

1497:                                             ; preds = %1461, %1453
  %1498 = landingpad { ptr, i32 }
          cleanup
  %1499 = extractvalue { ptr, i32 } %1498, 0
  store ptr %1499, ptr %6, align 8
  %1500 = extractvalue { ptr, i32 } %1498, 1
  store i32 %1500, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %153) #6
  br label %1501

1501:                                             ; preds = %1497, %1493
  call void @llvm.lifetime.end.p0(i64 16, ptr %152) #6
  br label %1535

1502:                                             ; preds = %1472, %1465
  %1503 = load ptr, ptr %2, align 8, !tbaa !5
  %1504 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %1503, ptr noundef @.str.116)
          to label %1505 unwind label %1489

1505:                                             ; preds = %1502
  %1506 = load i32, ptr %3, align 4, !tbaa !9
  %1507 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %1504, i32 noundef %1506)
          to label %1508 unwind label %1489

1508:                                             ; preds = %1505
  %1509 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %1507, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %1510 unwind label %1489

1510:                                             ; preds = %1508
  call void @llvm.lifetime.start.p0(i64 32, ptr %154) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %155) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %155) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %154, ptr noundef @.str.106, ptr noundef nonnull align 1 dereferenceable(1) %155)
          to label %1511 unwind label %1517

1511:                                             ; preds = %1510
  invoke void @_Z10removeFileRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(32) %154)
          to label %1512 unwind label %1521

1512:                                             ; preds = %1511
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %154) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %155) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %155) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %154) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr %156) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %157) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %157) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %156, ptr noundef @.str.118, ptr noundef nonnull align 1 dereferenceable(1) %157)
          to label %1513 unwind label %1526

1513:                                             ; preds = %1512
  invoke void @_Z10removeFileRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(32) %156)
          to label %1514 unwind label %1530

1514:                                             ; preds = %1513
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %156) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %157) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %157) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %156) #6
  %1515 = load i8, ptr %4, align 1, !tbaa !11, !range !13, !noundef !14
  %1516 = trunc i8 %1515 to i1
  call void @_ZN6qtorch16ContractionToolsD2Ev(ptr noundef nonnull align 8 dereferenceable(10128) %146) #6
  call void @llvm.lifetime.end.p0(i64 10128, ptr %146) #6
  call void @_ZN6qtorch16ContractionToolsD2Ev(ptr noundef nonnull align 8 dereferenceable(10128) %138) #6
  call void @llvm.lifetime.end.p0(i64 10128, ptr %138) #6
  call void @_ZN6qtorch16ContractionToolsD2Ev(ptr noundef nonnull align 8 dereferenceable(10128) %130) #6
  call void @llvm.lifetime.end.p0(i64 10128, ptr %130) #6
  call void @_ZN6qtorch16ContractionToolsD2Ev(ptr noundef nonnull align 8 dereferenceable(10128) %122) #6
  call void @llvm.lifetime.end.p0(i64 10128, ptr %122) #6
  call void @_ZN6qtorch16ContractionToolsD2Ev(ptr noundef nonnull align 8 dereferenceable(10128) %114) #6
  call void @llvm.lifetime.end.p0(i64 10128, ptr %114) #6
  call void @_ZN6qtorch16ContractionToolsD2Ev(ptr noundef nonnull align 8 dereferenceable(10128) %106) #6
  call void @llvm.lifetime.end.p0(i64 10128, ptr %106) #6
  call void @_ZN6qtorch16ContractionToolsD2Ev(ptr noundef nonnull align 8 dereferenceable(10128) %98) #6
  call void @llvm.lifetime.end.p0(i64 10128, ptr %98) #6
  call void @_ZN6qtorch16ContractionToolsD2Ev(ptr noundef nonnull align 8 dereferenceable(10128) %90) #6
  call void @llvm.lifetime.end.p0(i64 10128, ptr %90) #6
  call void @_ZN6qtorch16ContractionToolsD2Ev(ptr noundef nonnull align 8 dereferenceable(10128) %82) #6
  call void @llvm.lifetime.end.p0(i64 10128, ptr %82) #6
  call void @_ZN6qtorch16ContractionToolsD2Ev(ptr noundef nonnull align 8 dereferenceable(10128) %74) #6
  call void @llvm.lifetime.end.p0(i64 10128, ptr %74) #6
  call void @_ZN6qtorch16ContractionToolsD2Ev(ptr noundef nonnull align 8 dereferenceable(10128) %66) #6
  call void @llvm.lifetime.end.p0(i64 10128, ptr %66) #6
  call void @_ZN6qtorch16ContractionToolsD2Ev(ptr noundef nonnull align 8 dereferenceable(10128) %58) #6
  call void @llvm.lifetime.end.p0(i64 10128, ptr %58) #6
  call void @_ZN6qtorch16ContractionToolsD2Ev(ptr noundef nonnull align 8 dereferenceable(10128) %50) #6
  call void @llvm.lifetime.end.p0(i64 10128, ptr %50) #6
  call void @_ZN6qtorch16ContractionToolsD2Ev(ptr noundef nonnull align 8 dereferenceable(10128) %42) #6
  call void @llvm.lifetime.end.p0(i64 10128, ptr %42) #6
  call void @_ZN6qtorch16ContractionToolsD2Ev(ptr noundef nonnull align 8 dereferenceable(10128) %34) #6
  call void @llvm.lifetime.end.p0(i64 10128, ptr %34) #6
  call void @_ZN6qtorch16ContractionToolsD2Ev(ptr noundef nonnull align 8 dereferenceable(10128) %26) #6
  call void @llvm.lifetime.end.p0(i64 10128, ptr %26) #6
  call void @_ZN6qtorch16ContractionToolsD2Ev(ptr noundef nonnull align 8 dereferenceable(10128) %18) #6
  call void @llvm.lifetime.end.p0(i64 10128, ptr %18) #6
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248) %17) #6
  call void @llvm.lifetime.end.p0(i64 512, ptr %17) #6
  call void @_ZN6qtorch16ContractionToolsD2Ev(ptr noundef nonnull align 8 dereferenceable(10128) %9) #6
  call void @llvm.lifetime.end.p0(i64 10128, ptr %9) #6
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248) %8) #6
  call void @llvm.lifetime.end.p0(i64 512, ptr %8) #6
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248) %5) #6
  call void @llvm.lifetime.end.p0(i64 512, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  ret i1 %1516

1517:                                             ; preds = %1510
  %1518 = landingpad { ptr, i32 }
          cleanup
  %1519 = extractvalue { ptr, i32 } %1518, 0
  store ptr %1519, ptr %6, align 8
  %1520 = extractvalue { ptr, i32 } %1518, 1
  store i32 %1520, ptr %7, align 4
  br label %1525

1521:                                             ; preds = %1511
  %1522 = landingpad { ptr, i32 }
          cleanup
  %1523 = extractvalue { ptr, i32 } %1522, 0
  store ptr %1523, ptr %6, align 8
  %1524 = extractvalue { ptr, i32 } %1522, 1
  store i32 %1524, ptr %7, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %154) #6
  br label %1525

1525:                                             ; preds = %1521, %1517
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %155) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %155) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %154) #6
  br label %1535

1526:                                             ; preds = %1512
  %1527 = landingpad { ptr, i32 }
          cleanup
  %1528 = extractvalue { ptr, i32 } %1527, 0
  store ptr %1528, ptr %6, align 8
  %1529 = extractvalue { ptr, i32 } %1527, 1
  store i32 %1529, ptr %7, align 4
  br label %1534

1530:                                             ; preds = %1513
  %1531 = landingpad { ptr, i32 }
          cleanup
  %1532 = extractvalue { ptr, i32 } %1531, 0
  store ptr %1532, ptr %6, align 8
  %1533 = extractvalue { ptr, i32 } %1531, 1
  store i32 %1533, ptr %7, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %156) #6
  br label %1534

1534:                                             ; preds = %1530, %1526
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %157) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %157) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %156) #6
  br label %1535

1535:                                             ; preds = %1534, %1525, %1501, %1489
  call void @_ZN6qtorch16ContractionToolsD2Ev(ptr noundef nonnull align 8 dereferenceable(10128) %146) #6
  br label %1536

1536:                                             ; preds = %1535, %1488
  call void @llvm.lifetime.end.p0(i64 10128, ptr %146) #6
  br label %1537

1537:                                             ; preds = %1536, %1431, %1419
  call void @_ZN6qtorch16ContractionToolsD2Ev(ptr noundef nonnull align 8 dereferenceable(10128) %138) #6
  br label %1538

1538:                                             ; preds = %1537, %1418
  call void @llvm.lifetime.end.p0(i64 10128, ptr %138) #6
  br label %1539

1539:                                             ; preds = %1538, %1361, %1349
  call void @_ZN6qtorch16ContractionToolsD2Ev(ptr noundef nonnull align 8 dereferenceable(10128) %130) #6
  br label %1540

1540:                                             ; preds = %1539, %1348
  call void @llvm.lifetime.end.p0(i64 10128, ptr %130) #6
  br label %1541

1541:                                             ; preds = %1540, %1282, %1270
  call void @_ZN6qtorch16ContractionToolsD2Ev(ptr noundef nonnull align 8 dereferenceable(10128) %122) #6
  br label %1542

1542:                                             ; preds = %1541, %1269
  call void @llvm.lifetime.end.p0(i64 10128, ptr %122) #6
  br label %1543

1543:                                             ; preds = %1542, %1212, %1200
  call void @_ZN6qtorch16ContractionToolsD2Ev(ptr noundef nonnull align 8 dereferenceable(10128) %114) #6
  br label %1544

1544:                                             ; preds = %1543, %1199
  call void @llvm.lifetime.end.p0(i64 10128, ptr %114) #6
  br label %1545

1545:                                             ; preds = %1544, %1142, %1130
  call void @_ZN6qtorch16ContractionToolsD2Ev(ptr noundef nonnull align 8 dereferenceable(10128) %106) #6
  br label %1546

1546:                                             ; preds = %1545, %1129
  call void @llvm.lifetime.end.p0(i64 10128, ptr %106) #6
  br label %1547

1547:                                             ; preds = %1546, %1063, %1051
  call void @_ZN6qtorch16ContractionToolsD2Ev(ptr noundef nonnull align 8 dereferenceable(10128) %98) #6
  br label %1548

1548:                                             ; preds = %1547, %1050
  call void @llvm.lifetime.end.p0(i64 10128, ptr %98) #6
  br label %1549

1549:                                             ; preds = %1548, %994, %982
  call void @_ZN6qtorch16ContractionToolsD2Ev(ptr noundef nonnull align 8 dereferenceable(10128) %90) #6
  br label %1550

1550:                                             ; preds = %1549, %981
  call void @llvm.lifetime.end.p0(i64 10128, ptr %90) #6
  br label %1551

1551:                                             ; preds = %1550, %924, %912
  call void @_ZN6qtorch16ContractionToolsD2Ev(ptr noundef nonnull align 8 dereferenceable(10128) %82) #6
  br label %1552

1552:                                             ; preds = %1551, %911
  call void @llvm.lifetime.end.p0(i64 10128, ptr %82) #6
  br label %1553

1553:                                             ; preds = %1552, %840, %828
  call void @_ZN6qtorch16ContractionToolsD2Ev(ptr noundef nonnull align 8 dereferenceable(10128) %74) #6
  br label %1554

1554:                                             ; preds = %1553, %827
  call void @llvm.lifetime.end.p0(i64 10128, ptr %74) #6
  br label %1555

1555:                                             ; preds = %1554, %771, %759
  call void @_ZN6qtorch16ContractionToolsD2Ev(ptr noundef nonnull align 8 dereferenceable(10128) %66) #6
  br label %1556

1556:                                             ; preds = %1555, %758
  call void @llvm.lifetime.end.p0(i64 10128, ptr %66) #6
  br label %1557

1557:                                             ; preds = %1556, %701, %689
  call void @_ZN6qtorch16ContractionToolsD2Ev(ptr noundef nonnull align 8 dereferenceable(10128) %58) #6
  br label %1558

1558:                                             ; preds = %1557, %688
  call void @llvm.lifetime.end.p0(i64 10128, ptr %58) #6
  br label %1559

1559:                                             ; preds = %1558, %617, %605
  call void @_ZN6qtorch16ContractionToolsD2Ev(ptr noundef nonnull align 8 dereferenceable(10128) %50) #6
  br label %1560

1560:                                             ; preds = %1559, %604
  call void @llvm.lifetime.end.p0(i64 10128, ptr %50) #6
  br label %1561

1561:                                             ; preds = %1560, %547, %535
  call void @_ZN6qtorch16ContractionToolsD2Ev(ptr noundef nonnull align 8 dereferenceable(10128) %42) #6
  br label %1562

1562:                                             ; preds = %1561, %534
  call void @llvm.lifetime.end.p0(i64 10128, ptr %42) #6
  br label %1563

1563:                                             ; preds = %1562, %478, %466
  call void @_ZN6qtorch16ContractionToolsD2Ev(ptr noundef nonnull align 8 dereferenceable(10128) %34) #6
  br label %1564

1564:                                             ; preds = %1563, %465
  call void @llvm.lifetime.end.p0(i64 10128, ptr %34) #6
  br label %1565

1565:                                             ; preds = %1564, %398, %386
  call void @_ZN6qtorch16ContractionToolsD2Ev(ptr noundef nonnull align 8 dereferenceable(10128) %26) #6
  br label %1566

1566:                                             ; preds = %1565, %385
  call void @llvm.lifetime.end.p0(i64 10128, ptr %26) #6
  br label %1567

1567:                                             ; preds = %1566, %328, %316
  call void @_ZN6qtorch16ContractionToolsD2Ev(ptr noundef nonnull align 8 dereferenceable(10128) %18) #6
  br label %1568

1568:                                             ; preds = %1567, %315
  call void @llvm.lifetime.end.p0(i64 10128, ptr %18) #6
  br label %1569

1569:                                             ; preds = %1568, %298
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248) %17) #6
  br label %1570

1570:                                             ; preds = %1569, %294
  call void @llvm.lifetime.end.p0(i64 512, ptr %17) #6
  br label %1571

1571:                                             ; preds = %1570, %251, %239
  call void @_ZN6qtorch16ContractionToolsD2Ev(ptr noundef nonnull align 8 dereferenceable(10128) %9) #6
  br label %1572

1572:                                             ; preds = %1571, %238
  call void @llvm.lifetime.end.p0(i64 10128, ptr %9) #6
  br label %1573

1573:                                             ; preds = %1572, %221
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248) %8) #6
  br label %1574

1574:                                             ; preds = %1573, %217
  call void @llvm.lifetime.end.p0(i64 512, ptr %8) #6
  br label %1575

1575:                                             ; preds = %1574, %213
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248) %5) #6
  call void @llvm.lifetime.end.p0(i64 512, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  br label %1576

1576:                                             ; preds = %1575
  %1577 = load ptr, ptr %6, align 8
  %1578 = load i32, ptr %7, align 4
  %1579 = insertvalue { ptr, i32 } poison, ptr %1577, 0
  %1580 = insertvalue { ptr, i32 } %1579, i32 %1578, 1
  resume { ptr, i32 } %1580
}

; 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

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 }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{i8 0, i8 2}
!14 = !{}


; 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.std::basic_ofstream" = type { %"class.std::basic_ostream.base", %"class.std::basic_filebuf", %"class.std::basic_ios" }
%"class.std::basic_ostream.base" = type { ptr }
%"class.std::basic_filebuf" = type { %"class.std::basic_streambuf", %union.pthread_mutex_t, %"class.std::__basic_file", i32, %struct.__mbstate_t, %struct.__mbstate_t, %struct.__mbstate_t, ptr, i64, i8, i8, i8, i8, ptr, ptr, i8, ptr, ptr, i64, ptr, ptr }
%"class.std::basic_streambuf" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, %"class.std::locale" }
%"class.std::locale" = type { ptr }
%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }
%"class.std::__basic_file" = type <{ ptr, i8, [7 x i8] }>
%struct.__mbstate_t = type { i32, %union.anon }
%union.anon = type { i32 }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.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 }

@.str.21 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.106 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.116 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.118 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.119 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.136 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.137 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.138 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.139 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.140 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.141 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.142 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.143 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.144 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.145 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.146 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.147 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.148 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.149 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.150 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.151 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.152 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.153 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.154 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.155 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.156 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.157 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.158 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.159 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.160 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.161 = external hidden unnamed_addr constant [21 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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248)) unnamed_addr #3 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 uwtable
declare dso_local void @_Z10removeFileRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248), ptr noundef, i32 noundef) unnamed_addr #2 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: mustprogress uwtable
declare void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE4openEPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248), ptr noundef, i32 noundef) local_unnamed_addr #2 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 @_Z20testRotationCircuitsRSt14basic_ofstreamIcSt11char_traitsIcEE(ptr noundef nonnull align 8 dereferenceable(248) %0) local_unnamed_addr #2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.std::basic_ofstream", align 8
  %3 = alloca %"class.std::basic_ofstream", 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 %"class.std::__cxx11::basic_string", align 8
  %8 = alloca %"class.std::allocator", align 1
  %9 = alloca %"class.std::shared_ptr.178", align 8
  %10 = alloca %"class.std::complex", align 8
  %11 = alloca %"class.std::complex", align 8
  %12 = alloca %"class.std::basic_ofstream", align 8
  %13 = alloca %"class.qtorch::ContractionTools", align 8
  %14 = alloca %"class.std::__cxx11::basic_string", align 8
  %15 = alloca %"class.std::allocator", align 1
  %16 = alloca %"class.std::__cxx11::basic_string", align 8
  %17 = alloca %"class.std::allocator", align 1
  %18 = alloca %"class.std::shared_ptr.178", align 8
  %19 = alloca %"class.std::complex", align 8
  %20 = alloca %"class.std::complex", align 8
  %21 = alloca %"class.qtorch::ContractionTools", align 8
  %22 = alloca %"class.std::__cxx11::basic_string", align 8
  %23 = alloca %"class.std::allocator", align 1
  %24 = alloca %"class.std::__cxx11::basic_string", align 8
  %25 = alloca %"class.std::allocator", align 1
  %26 = alloca %"class.std::shared_ptr.178", align 8
  %27 = alloca %"class.std::complex", align 8
  %28 = alloca %"class.std::complex", align 8
  %29 = alloca %"class.qtorch::ContractionTools", align 8
  %30 = alloca %"class.std::__cxx11::basic_string", align 8
  %31 = alloca %"class.std::allocator", align 1
  %32 = alloca %"class.std::__cxx11::basic_string", align 8
  %33 = alloca %"class.std::allocator", align 1
  %34 = alloca %"class.std::shared_ptr.178", align 8
  %35 = alloca %"class.std::complex", align 8
  %36 = alloca %"class.std::complex", align 8
  %37 = alloca %"class.qtorch::ContractionTools", align 8
  %38 = alloca %"class.std::__cxx11::basic_string", align 8
  %39 = alloca %"class.std::allocator", align 1
  %40 = alloca %"class.std::__cxx11::basic_string", align 8
  %41 = alloca %"class.std::allocator", align 1
  %42 = alloca %"class.std::shared_ptr.178", align 8
  %43 = alloca %"class.std::complex", align 8
  %44 = alloca %"class.std::complex", align 8
  %45 = alloca %"class.qtorch::ContractionTools", align 8
  %46 = alloca %"class.std::__cxx11::basic_string", align 8
  %47 = alloca %"class.std::allocator", align 1
  %48 = alloca %"class.std::__cxx11::basic_string", align 8
  %49 = alloca %"class.std::allocator", align 1
  %50 = alloca %"class.std::shared_ptr.178", align 8
  %51 = alloca %"class.std::complex", align 8
  %52 = alloca %"class.std::complex", align 8
  %53 = alloca %"class.qtorch::ContractionTools", align 8
  %54 = alloca %"class.std::__cxx11::basic_string", align 8
  %55 = alloca %"class.std::allocator", align 1
  %56 = alloca %"class.std::__cxx11::basic_string", align 8
  %57 = alloca %"class.std::allocator", align 1
  %58 = alloca %"class.std::shared_ptr.178", align 8
  %59 = alloca %"class.std::complex", align 8
  %60 = alloca %"class.std::complex", align 8
  %61 = alloca %"class.qtorch::ContractionTools", align 8
  %62 = alloca %"class.std::__cxx11::basic_string", align 8
  %63 = alloca %"class.std::allocator", align 1
  %64 = alloca %"class.std::__cxx11::basic_string", align 8
  %65 = alloca %"class.std::allocator", align 1
  %66 = alloca %"class.std::shared_ptr.178", align 8
  %67 = alloca %"class.std::complex", align 8
  %68 = alloca %"class.std::complex", align 8
  %69 = alloca %"class.qtorch::ContractionTools", align 8
  %70 = alloca %"class.std::__cxx11::basic_string", align 8
  %71 = alloca %"class.std::allocator", align 1
  %72 = alloca %"class.std::__cxx11::basic_string", align 8
  %73 = alloca %"class.std::allocator", align 1
  %74 = alloca %"class.std::shared_ptr.178", align 8
  %75 = alloca %"class.std::complex", align 8
  %76 = alloca %"class.std::complex", align 8
  %77 = alloca %"class.qtorch::ContractionTools", align 8
  %78 = alloca %"class.std::__cxx11::basic_string", align 8
  %79 = alloca %"class.std::allocator", align 1
  %80 = alloca %"class.std::__cxx11::basic_string", align 8
  %81 = alloca %"class.std::allocator", align 1
  %82 = alloca %"class.std::shared_ptr.178", align 8
  %83 = alloca %"class.std::complex", align 8
  %84 = alloca %"class.std::complex", align 8
  %85 = alloca %"class.qtorch::ContractionTools", align 8
  %86 = alloca %"class.std::__cxx11::basic_string", align 8
  %87 = alloca %"class.std::allocator", align 1
  %88 = alloca %"class.std::__cxx11::basic_string", align 8
  %89 = alloca %"class.std::allocator", align 1
  %90 = alloca %"class.std::shared_ptr.178", align 8
  %91 = alloca %"class.std::complex", align 8
  %92 = alloca %"class.std::complex", align 8
  %93 = alloca %"class.qtorch::ContractionTools", align 8
  %94 = alloca %"class.std::__cxx11::basic_string", align 8
  %95 = alloca %"class.std::allocator", align 1
  %96 = alloca %"class.std::__cxx11::basic_string", align 8
  %97 = alloca %"class.std::allocator", align 1
  %98 = alloca %"class.std::shared_ptr.178", align 8
  %99 = alloca %"class.std::complex", align 8
  %100 = alloca %"class.std::complex", align 8
  %101 = alloca %"class.qtorch::ContractionTools", align 8
  %102 = alloca %"class.std::__cxx11::basic_string", align 8
  %103 = alloca %"class.std::allocator", align 1
  %104 = alloca %"class.std::__cxx11::basic_string", align 8
  %105 = alloca %"class.std::allocator", align 1
  %106 = alloca %"class.std::shared_ptr.178", align 8
  %107 = alloca %"class.std::complex", align 8
  %108 = alloca %"class.std::complex", align 8
  %109 = alloca %"class.qtorch::ContractionTools", align 8
  %110 = alloca %"class.std::__cxx11::basic_string", align 8
  %111 = alloca %"class.std::allocator", align 1
  %112 = alloca %"class.std::__cxx11::basic_string", align 8
  %113 = alloca %"class.std::allocator", align 1
  %114 = alloca %"class.std::shared_ptr.178", align 8
  %115 = alloca %"class.std::complex", align 8
  %116 = alloca %"class.std::complex", align 8
  %117 = alloca %"class.qtorch::ContractionTools", align 8
  %118 = alloca %"class.std::__cxx11::basic_string", align 8
  %119 = alloca %"class.std::allocator", align 1
  %120 = alloca %"class.std::__cxx11::basic_string", align 8
  %121 = alloca %"class.std::allocator", align 1
  %122 = alloca %"class.std::shared_ptr.178", align 8
  %123 = alloca %"class.std::complex", align 8
  %124 = alloca %"class.std::complex", align 8
  %125 = alloca %"class.qtorch::ContractionTools", align 8
  %126 = alloca %"class.std::__cxx11::basic_string", align 8
  %127 = alloca %"class.std::allocator", align 1
  %128 = alloca %"class.std::__cxx11::basic_string", align 8
  %129 = alloca %"class.std::allocator", align 1
  %130 = alloca %"class.std::shared_ptr.178", align 8
  %131 = alloca %"class.std::complex", align 8
  %132 = alloca %"class.std::complex", align 8
  %133 = alloca %"class.qtorch::ContractionTools", align 8
  %134 = alloca %"class.std::__cxx11::basic_string", align 8
  %135 = alloca %"class.std::allocator", align 1
  %136 = alloca %"class.std::__cxx11::basic_string", align 8
  %137 = alloca %"class.std::allocator", align 1
  %138 = alloca %"class.std::shared_ptr.178", align 8
  %139 = alloca %"class.std::complex", align 8
  %140 = alloca %"class.std::complex", align 8
  %141 = alloca %"class.qtorch::ContractionTools", align 8
  %142 = alloca %"class.std::__cxx11::basic_string", align 8
  %143 = alloca %"class.std::allocator", align 1
  %144 = alloca %"class.std::__cxx11::basic_string", align 8
  %145 = alloca %"class.std::allocator", align 1
  %146 = alloca %"class.std::shared_ptr.178", align 8
  %147 = alloca %"class.std::complex", align 8
  %148 = alloca %"class.std::complex", align 8
  %149 = alloca %"class.std::__cxx11::basic_string", align 8
  %150 = alloca %"class.std::allocator", align 1
  %151 = alloca %"class.std::__cxx11::basic_string", align 8
  %152 = alloca %"class.std::allocator", align 1
  %153 = 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.136)
  %154 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %153, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %155 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %154, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.start.p0(i64 512, ptr nonnull %2) #6
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248) %2, ptr noundef nonnull @.str.118, i32 noundef 16)
  %156 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull @.str.119)
          to label %157 unwind label %193

157:                                              ; preds = %1
  %158 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %156, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %159 unwind label %193

159:                                              ; preds = %157
  %160 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull @.str.137)
          to label %161 unwind label %193

161:                                              ; preds = %159
  %162 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %160, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %163 unwind label %193

163:                                              ; preds = %161
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE5closeEv(ptr noundef nonnull align 8 dereferenceable(248) %2)
          to label %164 unwind label %193

164:                                              ; preds = %163
  call void @llvm.lifetime.start.p0(i64 512, ptr nonnull %3) #6
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248) %3, ptr noundef nonnull @.str.106, i32 noundef 16)
          to label %165 unwind label %195

165:                                              ; preds = %164
  %166 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull @.str.21)
          to label %167 unwind label %197

167:                                              ; preds = %165
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE5closeEv(ptr noundef nonnull align 8 dereferenceable(248) %3)
          to label %168 unwind label %197

168:                                              ; preds = %167
  call void @llvm.lifetime.start.p0(i64 10128, ptr nonnull %4) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %6) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef nonnull @.str.118, ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %169 unwind label %199

169:                                              ; preds = %168
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %8) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %7, ptr noundef nonnull @.str.106, ptr noundef nonnull align 1 dereferenceable(1) %8)
          to label %170 unwind label %201

170:                                              ; preds = %169
  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) %7, i32 noundef 8)
          to label %171 unwind label %203

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

172:                                              ; preds = %171
  call void @_ZNSt12__shared_ptrIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %9) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %10) #6
  %173 = call { double, double } @_ZN6qtorch16ContractionTools11GetFinalValEv(ptr noundef nonnull align 8 dereferenceable(10128) %4) #6
  %174 = extractvalue { double, double } %173, 0
  store double %174, ptr %10, align 8
  %175 = getelementptr inbounds i8, ptr %10, i64 8
  %176 = extractvalue { double, double } %173, 1
  store double %176, ptr %175, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %11) #6
  %177 = call noundef double @_ZNKSt7complexIdE4realB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(16) %10)
  %178 = fadd double %177, -9.983340e-02
  %179 = call noundef double @_ZSt3absd(double noundef %178)
  %180 = fcmp ogt double %179, 1.000000e-05
  br i1 %180, label %.critedge, label %181

181:                                              ; preds = %172
  %182 = call { double, double } @_ZN6qtorch16ContractionTools11GetFinalValEv(ptr noundef nonnull align 8 dereferenceable(10128) %4) #6
  %183 = extractvalue { double, double } %182, 0
  store double %183, ptr %11, align 8
  %184 = getelementptr inbounds i8, ptr %11, i64 8
  %185 = extractvalue { double, double } %182, 1
  store double %185, ptr %184, align 8
  %186 = call noundef double @_ZNKSt7complexIdE4imagB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(16) %11)
  %187 = call noundef double @_ZSt3absd(double noundef %186)
  %188 = fcmp ogt double %187, 1.000000e-05
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #6
  br i1 %188, label %189, label %209

.critedge:                                        ; preds = %172
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #6
  br label %189

189:                                              ; preds = %.critedge, %181
  %190 = 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.138)
          to label %191 unwind label %207

191:                                              ; preds = %189
  %192 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %190, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %209 unwind label %207

193:                                              ; preds = %163, %161, %159, %157, %1
  %194 = landingpad { ptr, i32 }
          cleanup
  br label %1023

195:                                              ; preds = %164
  %196 = landingpad { ptr, i32 }
          cleanup
  br label %1022

197:                                              ; preds = %167, %165
  %198 = landingpad { ptr, i32 }
          cleanup
  br label %1021

199:                                              ; preds = %168
  %200 = landingpad { ptr, i32 }
          cleanup
  br label %206

201:                                              ; preds = %169
  %202 = landingpad { ptr, i32 }
          cleanup
  br label %205

203:                                              ; preds = %170
  %204 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #6
  br label %205

205:                                              ; preds = %203, %201
  %.pn = phi { ptr, i32 } [ %204, %203 ], [ %202, %201 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #6
  br label %206

206:                                              ; preds = %205, %199
  %.pn.pn = phi { ptr, i32 } [ %.pn, %205 ], [ %200, %199 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #6
  br label %1020

207:                                              ; preds = %191, %189, %171
  %208 = landingpad { ptr, i32 }
          cleanup
  br label %1019

209:                                              ; preds = %191, %181
  %.0172 = phi i32 [ 0, %181 ], [ 1, %191 ]
  %.0154 = phi i1 [ true, %181 ], [ false, %191 ]
  call void @llvm.lifetime.start.p0(i64 512, ptr nonnull %12) #6
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248) %12, ptr noundef nonnull @.str.106, i32 noundef 16)
          to label %210 unwind label %239

210:                                              ; preds = %209
  %211 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull @.str.22)
          to label %212 unwind label %241

212:                                              ; preds = %210
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE5closeEv(ptr noundef nonnull align 8 dereferenceable(248) %12)
          to label %213 unwind label %241

213:                                              ; preds = %212
  call void @llvm.lifetime.start.p0(i64 10128, ptr nonnull %13) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %14) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %15) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %14, ptr noundef nonnull @.str.118, ptr noundef nonnull align 1 dereferenceable(1) %15)
          to label %214 unwind label %243

214:                                              ; preds = %213
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %16) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %17) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %16, ptr noundef nonnull @.str.106, ptr noundef nonnull align 1 dereferenceable(1) %17)
          to label %215 unwind label %245

215:                                              ; preds = %214
  invoke void @_ZN6qtorch16ContractionToolsC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_i(ptr noundef nonnull align 8 dereferenceable(10128) %13, ptr noundef nonnull align 8 dereferenceable(32) %14, ptr noundef nonnull align 8 dereferenceable(32) %16, i32 noundef 8)
          to label %216 unwind label %247

216:                                              ; preds = %215
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %17) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %16) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %15) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %14) #6
  invoke void @_ZN6qtorch16ContractionTools8ContractENS_15ContractionTypeEii(ptr dead_on_unwind nonnull writable sret(%"class.std::shared_ptr.178") align 8 %18, ptr noundef nonnull align 8 dereferenceable(10128) %13, i32 noundef 0, i32 noundef 1, i32 noundef 1)
          to label %217 unwind label %251

217:                                              ; preds = %216
  call void @_ZNSt12__shared_ptrIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %18) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %19) #6
  %218 = call { double, double } @_ZN6qtorch16ContractionTools11GetFinalValEv(ptr noundef nonnull align 8 dereferenceable(10128) %13) #6
  %219 = extractvalue { double, double } %218, 0
  store double %219, ptr %19, align 8
  %220 = getelementptr inbounds i8, ptr %19, i64 8
  %221 = extractvalue { double, double } %218, 1
  store double %221, ptr %220, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %20) #6
  %222 = call noundef double @_ZNKSt7complexIdE4realB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(16) %19)
  %223 = call noundef double @_ZSt3absd(double noundef %222)
  %224 = fcmp ogt double %223, 1.000000e-05
  br i1 %224, label %.critedge2, label %225

225:                                              ; preds = %217
  %226 = call { double, double } @_ZN6qtorch16ContractionTools11GetFinalValEv(ptr noundef nonnull align 8 dereferenceable(10128) %13) #6
  %227 = extractvalue { double, double } %226, 0
  store double %227, ptr %20, align 8
  %228 = getelementptr inbounds i8, ptr %20, i64 8
  %229 = extractvalue { double, double } %226, 1
  store double %229, ptr %228, align 8
  %230 = call noundef double @_ZNKSt7complexIdE4imagB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(16) %20)
  %231 = call noundef double @_ZSt3absd(double noundef %230)
  %232 = fcmp ogt double %231, 1.000000e-05
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %20) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %19) #6
  br i1 %232, label %233, label %253

.critedge2:                                       ; preds = %217
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %20) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %19) #6
  br label %233

233:                                              ; preds = %.critedge2, %225
  %234 = 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.139)
          to label %235 unwind label %251

235:                                              ; preds = %233
  %236 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %234, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %237 unwind label %251

237:                                              ; preds = %235
  %238 = add nuw nsw i32 %.0172, 1
  br label %253

239:                                              ; preds = %209
  %240 = landingpad { ptr, i32 }
          cleanup
  br label %1018

241:                                              ; preds = %212, %210
  %242 = landingpad { ptr, i32 }
          cleanup
  br label %1017

243:                                              ; preds = %213
  %244 = landingpad { ptr, i32 }
          cleanup
  br label %250

245:                                              ; preds = %214
  %246 = landingpad { ptr, i32 }
          cleanup
  br label %249

247:                                              ; preds = %215
  %248 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #6
  br label %249

249:                                              ; preds = %247, %245
  %.pn192 = phi { ptr, i32 } [ %248, %247 ], [ %246, %245 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %17) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %16) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #6
  br label %250

250:                                              ; preds = %249, %243
  %.pn192.pn = phi { ptr, i32 } [ %.pn192, %249 ], [ %244, %243 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %15) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %14) #6
  br label %1016

251:                                              ; preds = %256, %254, %253, %235, %233, %216
  %252 = landingpad { ptr, i32 }
          cleanup
  br label %1015

253:                                              ; preds = %237, %225
  %.1173 = phi i32 [ %238, %237 ], [ %.0172, %225 ]
  %.1155 = phi i1 [ false, %237 ], [ %.0154, %225 ]
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE4openEPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248) %3, ptr noundef nonnull @.str.106, i32 noundef 16)
          to label %254 unwind label %251

254:                                              ; preds = %253
  %255 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull @.str.23)
          to label %256 unwind label %251

256:                                              ; preds = %254
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE5closeEv(ptr noundef nonnull align 8 dereferenceable(248) %3)
          to label %257 unwind label %251

257:                                              ; preds = %256
  call void @llvm.lifetime.start.p0(i64 10128, ptr nonnull %21) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %22) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %23) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %23) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %22, ptr noundef nonnull @.str.118, ptr noundef nonnull align 1 dereferenceable(1) %23)
          to label %258 unwind label %284

258:                                              ; preds = %257
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %24) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %25) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %25) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %24, ptr noundef nonnull @.str.106, ptr noundef nonnull align 1 dereferenceable(1) %25)
          to label %259 unwind label %286

259:                                              ; preds = %258
  invoke void @_ZN6qtorch16ContractionToolsC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_i(ptr noundef nonnull align 8 dereferenceable(10128) %21, ptr noundef nonnull align 8 dereferenceable(32) %22, ptr noundef nonnull align 8 dereferenceable(32) %24, i32 noundef 8)
          to label %260 unwind label %288

260:                                              ; preds = %259
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %24) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %25) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %25) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %24) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %22) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %23) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %23) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %22) #6
  invoke void @_ZN6qtorch16ContractionTools8ContractENS_15ContractionTypeEii(ptr dead_on_unwind nonnull writable sret(%"class.std::shared_ptr.178") align 8 %26, ptr noundef nonnull align 8 dereferenceable(10128) %21, i32 noundef 0, i32 noundef 1, i32 noundef 1)
          to label %261 unwind label %292

261:                                              ; preds = %260
  call void @_ZNSt12__shared_ptrIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %26) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %27) #6
  %262 = call { double, double } @_ZN6qtorch16ContractionTools11GetFinalValEv(ptr noundef nonnull align 8 dereferenceable(10128) %21) #6
  %263 = extractvalue { double, double } %262, 0
  store double %263, ptr %27, align 8
  %264 = getelementptr inbounds i8, ptr %27, i64 8
  %265 = extractvalue { double, double } %262, 1
  store double %265, ptr %264, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %28) #6
  %266 = call noundef double @_ZNKSt7complexIdE4realB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(16) %27)
  %267 = fadd double %266, 0xBFEFD712A0EC7432
  %268 = call noundef double @_ZSt3absd(double noundef %267)
  %269 = fcmp ogt double %268, 1.000000e-05
  br i1 %269, label %.critedge4, label %270

270:                                              ; preds = %261
  %271 = call { double, double } @_ZN6qtorch16ContractionTools11GetFinalValEv(ptr noundef nonnull align 8 dereferenceable(10128) %21) #6
  %272 = extractvalue { double, double } %271, 0
  store double %272, ptr %28, align 8
  %273 = getelementptr inbounds i8, ptr %28, i64 8
  %274 = extractvalue { double, double } %271, 1
  store double %274, ptr %273, align 8
  %275 = call noundef double @_ZNKSt7complexIdE4imagB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(16) %28)
  %276 = call noundef double @_ZSt3absd(double noundef %275)
  %277 = fcmp ogt double %276, 1.000000e-05
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %28) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %27) #6
  br i1 %277, label %278, label %294

.critedge4:                                       ; preds = %261
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %28) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %27) #6
  br label %278

278:                                              ; preds = %.critedge4, %270
  %279 = 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.140)
          to label %280 unwind label %292

280:                                              ; preds = %278
  %281 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %279, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %282 unwind label %292

282:                                              ; preds = %280
  %283 = add nuw nsw i32 %.1173, 1
  br label %294

284:                                              ; preds = %257
  %285 = landingpad { ptr, i32 }
          cleanup
  br label %291

286:                                              ; preds = %258
  %287 = landingpad { ptr, i32 }
          cleanup
  br label %290

288:                                              ; preds = %259
  %289 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %24) #6
  br label %290

290:                                              ; preds = %288, %286
  %.pn195 = phi { ptr, i32 } [ %289, %288 ], [ %287, %286 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %25) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %25) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %24) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %22) #6
  br label %291

291:                                              ; preds = %290, %284
  %.pn195.pn = phi { ptr, i32 } [ %.pn195, %290 ], [ %285, %284 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %23) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %23) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %22) #6
  br label %1014

292:                                              ; preds = %307, %305, %304, %303, %301, %299, %297, %295, %294, %280, %278, %260
  %293 = landingpad { ptr, i32 }
          cleanup
  br label %1013

294:                                              ; preds = %282, %270
  %.2174 = phi i32 [ %283, %282 ], [ %.1173, %270 ]
  %.2156 = phi i1 [ false, %282 ], [ %.1155, %270 ]
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE4openEPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248) %2, ptr noundef nonnull @.str.118, i32 noundef 16)
          to label %295 unwind label %292

295:                                              ; preds = %294
  %296 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull @.str.119)
          to label %297 unwind label %292

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

299:                                              ; preds = %297
  %300 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull @.str.141)
          to label %301 unwind label %292

301:                                              ; preds = %299
  %302 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %300, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %303 unwind label %292

303:                                              ; preds = %301
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE5closeEv(ptr noundef nonnull align 8 dereferenceable(248) %2)
          to label %304 unwind label %292

304:                                              ; preds = %303
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE4openEPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248) %3, ptr noundef nonnull @.str.106, i32 noundef 16)
          to label %305 unwind label %292

305:                                              ; preds = %304
  %306 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull @.str.21)
          to label %307 unwind label %292

307:                                              ; preds = %305
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE5closeEv(ptr noundef nonnull align 8 dereferenceable(248) %3)
          to label %308 unwind label %292

308:                                              ; preds = %307
  call void @llvm.lifetime.start.p0(i64 10128, ptr nonnull %29) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %30) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %31) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %31) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %30, ptr noundef nonnull @.str.118, ptr noundef nonnull align 1 dereferenceable(1) %31)
          to label %309 unwind label %335

309:                                              ; preds = %308
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %32) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %33) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %33) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %32, ptr noundef nonnull @.str.106, ptr noundef nonnull align 1 dereferenceable(1) %33)
          to label %310 unwind label %337

310:                                              ; preds = %309
  invoke void @_ZN6qtorch16ContractionToolsC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_i(ptr noundef nonnull align 8 dereferenceable(10128) %29, ptr noundef nonnull align 8 dereferenceable(32) %30, ptr noundef nonnull align 8 dereferenceable(32) %32, i32 noundef 8)
          to label %311 unwind label %339

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

312:                                              ; preds = %311
  call void @_ZNSt12__shared_ptrIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %34) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %35) #6
  %313 = call { double, double } @_ZN6qtorch16ContractionTools11GetFinalValEv(ptr noundef nonnull align 8 dereferenceable(10128) %29) #6
  %314 = extractvalue { double, double } %313, 0
  store double %314, ptr %35, align 8
  %315 = getelementptr inbounds i8, ptr %35, i64 8
  %316 = extractvalue { double, double } %313, 1
  store double %316, ptr %315, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %36) #6
  %317 = call noundef double @_ZNKSt7complexIdE4realB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(16) %35)
  %318 = fadd double %317, 0x3FB98EAECB8BC33F
  %319 = call noundef double @_ZSt3absd(double noundef %318)
  %320 = fcmp ogt double %319, 1.000000e-05
  br i1 %320, label %.critedge6, label %321

321:                                              ; preds = %312
  %322 = call { double, double } @_ZN6qtorch16ContractionTools11GetFinalValEv(ptr noundef nonnull align 8 dereferenceable(10128) %29) #6
  %323 = extractvalue { double, double } %322, 0
  store double %323, ptr %36, align 8
  %324 = getelementptr inbounds i8, ptr %36, i64 8
  %325 = extractvalue { double, double } %322, 1
  store double %325, ptr %324, align 8
  %326 = call noundef double @_ZNKSt7complexIdE4imagB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(16) %36)
  %327 = call noundef double @_ZSt3absd(double noundef %326)
  %328 = fcmp ogt double %327, 1.000000e-05
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %36) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %35) #6
  br i1 %328, label %329, label %345

.critedge6:                                       ; preds = %312
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %36) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %35) #6
  br label %329

329:                                              ; preds = %.critedge6, %321
  %330 = 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.142)
          to label %331 unwind label %343

331:                                              ; preds = %329
  %332 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %330, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %333 unwind label %343

333:                                              ; preds = %331
  %334 = add nuw nsw i32 %.2174, 1
  br label %345

335:                                              ; preds = %308
  %336 = landingpad { ptr, i32 }
          cleanup
  br label %342

337:                                              ; preds = %309
  %338 = landingpad { ptr, i32 }
          cleanup
  br label %341

339:                                              ; preds = %310
  %340 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %32) #6
  br label %341

341:                                              ; preds = %339, %337
  %.pn198 = phi { ptr, i32 } [ %340, %339 ], [ %338, %337 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %33) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %33) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %32) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %30) #6
  br label %342

342:                                              ; preds = %341, %335
  %.pn198.pn = phi { ptr, i32 } [ %.pn198, %341 ], [ %336, %335 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %31) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %31) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %30) #6
  br label %1012

343:                                              ; preds = %348, %346, %345, %331, %329, %311
  %344 = landingpad { ptr, i32 }
          cleanup
  br label %1011

345:                                              ; preds = %333, %321
  %.3175 = phi i32 [ %334, %333 ], [ %.2174, %321 ]
  %.3157 = phi i1 [ false, %333 ], [ %.2156, %321 ]
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE4openEPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248) %3, ptr noundef nonnull @.str.106, i32 noundef 16)
          to label %346 unwind label %343

346:                                              ; preds = %345
  %347 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull @.str.22)
          to label %348 unwind label %343

348:                                              ; preds = %346
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE5closeEv(ptr noundef nonnull align 8 dereferenceable(248) %3)
          to label %349 unwind label %343

349:                                              ; preds = %348
  call void @llvm.lifetime.start.p0(i64 10128, ptr nonnull %37) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %38) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %39) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %39) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %38, ptr noundef nonnull @.str.118, ptr noundef nonnull align 1 dereferenceable(1) %39)
          to label %350 unwind label %375

350:                                              ; preds = %349
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %40) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %41) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %41) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %40, ptr noundef nonnull @.str.106, ptr noundef nonnull align 1 dereferenceable(1) %41)
          to label %351 unwind label %377

351:                                              ; preds = %350
  invoke void @_ZN6qtorch16ContractionToolsC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_i(ptr noundef nonnull align 8 dereferenceable(10128) %37, ptr noundef nonnull align 8 dereferenceable(32) %38, ptr noundef nonnull align 8 dereferenceable(32) %40, i32 noundef 8)
          to label %352 unwind label %379

352:                                              ; preds = %351
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %40) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %41) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %41) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %40) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %38) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %39) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %39) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %38) #6
  invoke void @_ZN6qtorch16ContractionTools8ContractENS_15ContractionTypeEii(ptr dead_on_unwind nonnull writable sret(%"class.std::shared_ptr.178") align 8 %42, ptr noundef nonnull align 8 dereferenceable(10128) %37, i32 noundef 0, i32 noundef 1, i32 noundef 1)
          to label %353 unwind label %383

353:                                              ; preds = %352
  call void @_ZNSt12__shared_ptrIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %42) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %43) #6
  %354 = call { double, double } @_ZN6qtorch16ContractionTools11GetFinalValEv(ptr noundef nonnull align 8 dereferenceable(10128) %37) #6
  %355 = extractvalue { double, double } %354, 0
  store double %355, ptr %43, align 8
  %356 = getelementptr inbounds i8, ptr %43, i64 8
  %357 = extractvalue { double, double } %354, 1
  store double %357, ptr %356, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %44) #6
  %358 = call noundef double @_ZNKSt7complexIdE4realB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(16) %43)
  %359 = call noundef double @_ZSt3absd(double noundef %358)
  %360 = fcmp ogt double %359, 1.000000e-05
  br i1 %360, label %.critedge8, label %361

361:                                              ; preds = %353
  %362 = call { double, double } @_ZN6qtorch16ContractionTools11GetFinalValEv(ptr noundef nonnull align 8 dereferenceable(10128) %37) #6
  %363 = extractvalue { double, double } %362, 0
  store double %363, ptr %44, align 8
  %364 = getelementptr inbounds i8, ptr %44, i64 8
  %365 = extractvalue { double, double } %362, 1
  store double %365, ptr %364, align 8
  %366 = call noundef double @_ZNKSt7complexIdE4imagB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(16) %44)
  %367 = call noundef double @_ZSt3absd(double noundef %366)
  %368 = fcmp ogt double %367, 1.000000e-05
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %44) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %43) #6
  br i1 %368, label %369, label %385

.critedge8:                                       ; preds = %353
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %44) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %43) #6
  br label %369

369:                                              ; preds = %.critedge8, %361
  %370 = 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.143)
          to label %371 unwind label %383

371:                                              ; preds = %369
  %372 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %370, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %373 unwind label %383

373:                                              ; preds = %371
  %374 = add nuw nsw i32 %.3175, 1
  br label %385

375:                                              ; preds = %349
  %376 = landingpad { ptr, i32 }
          cleanup
  br label %382

377:                                              ; preds = %350
  %378 = landingpad { ptr, i32 }
          cleanup
  br label %381

379:                                              ; preds = %351
  %380 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %40) #6
  br label %381

381:                                              ; preds = %379, %377
  %.pn201 = phi { ptr, i32 } [ %380, %379 ], [ %378, %377 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %41) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %41) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %40) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %38) #6
  br label %382

382:                                              ; preds = %381, %375
  %.pn201.pn = phi { ptr, i32 } [ %.pn201, %381 ], [ %376, %375 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %39) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %39) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %38) #6
  br label %1010

383:                                              ; preds = %388, %386, %385, %371, %369, %352
  %384 = landingpad { ptr, i32 }
          cleanup
  br label %1009

385:                                              ; preds = %373, %361
  %.4176 = phi i32 [ %374, %373 ], [ %.3175, %361 ]
  %.4158 = phi i1 [ false, %373 ], [ %.3157, %361 ]
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE4openEPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248) %3, ptr noundef nonnull @.str.106, i32 noundef 16)
          to label %386 unwind label %383

386:                                              ; preds = %385
  %387 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull @.str.23)
          to label %388 unwind label %383

388:                                              ; preds = %386
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE5closeEv(ptr noundef nonnull align 8 dereferenceable(248) %3)
          to label %389 unwind label %383

389:                                              ; preds = %388
  call void @llvm.lifetime.start.p0(i64 10128, ptr nonnull %45) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %46) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %47) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %47) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %46, ptr noundef nonnull @.str.118, ptr noundef nonnull align 1 dereferenceable(1) %47)
          to label %390 unwind label %416

390:                                              ; preds = %389
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %48) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %49) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %49) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %48, ptr noundef nonnull @.str.106, ptr noundef nonnull align 1 dereferenceable(1) %49)
          to label %391 unwind label %418

391:                                              ; preds = %390
  invoke void @_ZN6qtorch16ContractionToolsC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_i(ptr noundef nonnull align 8 dereferenceable(10128) %45, ptr noundef nonnull align 8 dereferenceable(32) %46, ptr noundef nonnull align 8 dereferenceable(32) %48, i32 noundef 8)
          to label %392 unwind label %420

392:                                              ; preds = %391
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %48) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %49) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %49) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %48) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %46) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %47) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %47) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %46) #6
  invoke void @_ZN6qtorch16ContractionTools8ContractENS_15ContractionTypeEii(ptr dead_on_unwind nonnull writable sret(%"class.std::shared_ptr.178") align 8 %50, ptr noundef nonnull align 8 dereferenceable(10128) %45, i32 noundef 0, i32 noundef 1, i32 noundef 1)
          to label %393 unwind label %424

393:                                              ; preds = %392
  call void @_ZNSt12__shared_ptrIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %50) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %51) #6
  %394 = call { double, double } @_ZN6qtorch16ContractionTools11GetFinalValEv(ptr noundef nonnull align 8 dereferenceable(10128) %45) #6
  %395 = extractvalue { double, double } %394, 0
  store double %395, ptr %51, align 8
  %396 = getelementptr inbounds i8, ptr %51, i64 8
  %397 = extractvalue { double, double } %394, 1
  store double %397, ptr %396, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %52) #6
  %398 = call noundef double @_ZNKSt7complexIdE4realB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(16) %51)
  %399 = fadd double %398, 0xBFEFD712F9A816D8
  %400 = call noundef double @_ZSt3absd(double noundef %399)
  %401 = fcmp ogt double %400, 1.000000e-05
  br i1 %401, label %.critedge10, label %402

402:                                              ; preds = %393
  %403 = call { double, double } @_ZN6qtorch16ContractionTools11GetFinalValEv(ptr noundef nonnull align 8 dereferenceable(10128) %45) #6
  %404 = extractvalue { double, double } %403, 0
  store double %404, ptr %52, align 8
  %405 = getelementptr inbounds i8, ptr %52, i64 8
  %406 = extractvalue { double, double } %403, 1
  store double %406, ptr %405, align 8
  %407 = call noundef double @_ZNKSt7complexIdE4imagB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(16) %52)
  %408 = call noundef double @_ZSt3absd(double noundef %407)
  %409 = fcmp ogt double %408, 1.000000e-05
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %52) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %51) #6
  br i1 %409, label %410, label %426

.critedge10:                                      ; preds = %393
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %52) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %51) #6
  br label %410

410:                                              ; preds = %.critedge10, %402
  %411 = 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.144)
          to label %412 unwind label %424

412:                                              ; preds = %410
  %413 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %411, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %414 unwind label %424

414:                                              ; preds = %412
  %415 = add nuw nsw i32 %.4176, 1
  br label %426

416:                                              ; preds = %389
  %417 = landingpad { ptr, i32 }
          cleanup
  br label %423

418:                                              ; preds = %390
  %419 = landingpad { ptr, i32 }
          cleanup
  br label %422

420:                                              ; preds = %391
  %421 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %48) #6
  br label %422

422:                                              ; preds = %420, %418
  %.pn204 = phi { ptr, i32 } [ %421, %420 ], [ %419, %418 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %49) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %49) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %48) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %46) #6
  br label %423

423:                                              ; preds = %422, %416
  %.pn204.pn = phi { ptr, i32 } [ %.pn204, %422 ], [ %417, %416 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %47) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %47) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %46) #6
  br label %1008

424:                                              ; preds = %443, %441, %440, %439, %437, %435, %433, %431, %429, %427, %426, %412, %410, %392
  %425 = landingpad { ptr, i32 }
          cleanup
  br label %1007

426:                                              ; preds = %414, %402
  %.5177 = phi i32 [ %415, %414 ], [ %.4176, %402 ]
  %.5159 = phi i1 [ false, %414 ], [ %.4158, %402 ]
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE4openEPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248) %2, ptr noundef nonnull @.str.118, i32 noundef 16)
          to label %427 unwind label %424

427:                                              ; preds = %426
  %428 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull @.str.119)
          to label %429 unwind label %424

429:                                              ; preds = %427
  %430 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %428, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %431 unwind label %424

431:                                              ; preds = %429
  %432 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull @.str.145)
          to label %433 unwind label %424

433:                                              ; preds = %431
  %434 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %432, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %435 unwind label %424

435:                                              ; preds = %433
  %436 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull @.str.146)
          to label %437 unwind label %424

437:                                              ; preds = %435
  %438 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %436, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %439 unwind label %424

439:                                              ; preds = %437
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE5closeEv(ptr noundef nonnull align 8 dereferenceable(248) %2)
          to label %440 unwind label %424

440:                                              ; preds = %439
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE4openEPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248) %3, ptr noundef nonnull @.str.106, i32 noundef 16)
          to label %441 unwind label %424

441:                                              ; preds = %440
  %442 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull @.str.21)
          to label %443 unwind label %424

443:                                              ; preds = %441
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE5closeEv(ptr noundef nonnull align 8 dereferenceable(248) %3)
          to label %444 unwind label %424

444:                                              ; preds = %443
  call void @llvm.lifetime.start.p0(i64 10128, ptr nonnull %53) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %54) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %55) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %55) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %54, ptr noundef nonnull @.str.118, ptr noundef nonnull align 1 dereferenceable(1) %55)
          to label %445 unwind label %471

445:                                              ; preds = %444
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %56) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %57) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %57) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %56, ptr noundef nonnull @.str.106, ptr noundef nonnull align 1 dereferenceable(1) %57)
          to label %446 unwind label %473

446:                                              ; preds = %445
  invoke void @_ZN6qtorch16ContractionToolsC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_i(ptr noundef nonnull align 8 dereferenceable(10128) %53, ptr noundef nonnull align 8 dereferenceable(32) %54, ptr noundef nonnull align 8 dereferenceable(32) %56, i32 noundef 8)
          to label %447 unwind label %475

447:                                              ; preds = %446
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %56) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %57) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %57) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %56) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %54) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %55) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %55) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %54) #6
  invoke void @_ZN6qtorch16ContractionTools8ContractENS_15ContractionTypeEii(ptr dead_on_unwind nonnull writable sret(%"class.std::shared_ptr.178") align 8 %58, ptr noundef nonnull align 8 dereferenceable(10128) %53, i32 noundef 0, i32 noundef 1, i32 noundef 1)
          to label %448 unwind label %479

448:                                              ; preds = %447
  call void @_ZNSt12__shared_ptrIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %58) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %59) #6
  %449 = call { double, double } @_ZN6qtorch16ContractionTools11GetFinalValEv(ptr noundef nonnull align 8 dereferenceable(10128) %53) #6
  %450 = extractvalue { double, double } %449, 0
  store double %450, ptr %59, align 8
  %451 = getelementptr inbounds i8, ptr %59, i64 8
  %452 = extractvalue { double, double } %449, 1
  store double %452, ptr %451, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %60) #6
  %453 = call noundef double @_ZNKSt7complexIdE4realB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(16) %59)
  %454 = fadd double %453, 0xBFEFD712F9A816D8
  %455 = call noundef double @_ZSt3absd(double noundef %454)
  %456 = fcmp ogt double %455, 1.000000e-05
  br i1 %456, label %.critedge12, label %457

457:                                              ; preds = %448
  %458 = call { double, double } @_ZN6qtorch16ContractionTools11GetFinalValEv(ptr noundef nonnull align 8 dereferenceable(10128) %53) #6
  %459 = extractvalue { double, double } %458, 0
  store double %459, ptr %60, align 8
  %460 = getelementptr inbounds i8, ptr %60, i64 8
  %461 = extractvalue { double, double } %458, 1
  store double %461, ptr %460, align 8
  %462 = call noundef double @_ZNKSt7complexIdE4imagB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(16) %60)
  %463 = call noundef double @_ZSt3absd(double noundef %462)
  %464 = fcmp ogt double %463, 1.000000e-05
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %60) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %59) #6
  br i1 %464, label %465, label %481

.critedge12:                                      ; preds = %448
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %60) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %59) #6
  br label %465

465:                                              ; preds = %.critedge12, %457
  %466 = 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.147)
          to label %467 unwind label %479

467:                                              ; preds = %465
  %468 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %466, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %469 unwind label %479

469:                                              ; preds = %467
  %470 = add nuw nsw i32 %.5177, 1
  br label %481

471:                                              ; preds = %444
  %472 = landingpad { ptr, i32 }
          cleanup
  br label %478

473:                                              ; preds = %445
  %474 = landingpad { ptr, i32 }
          cleanup
  br label %477

475:                                              ; preds = %446
  %476 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %56) #6
  br label %477

477:                                              ; preds = %475, %473
  %.pn207 = phi { ptr, i32 } [ %476, %475 ], [ %474, %473 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %57) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %57) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %56) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %54) #6
  br label %478

478:                                              ; preds = %477, %471
  %.pn207.pn = phi { ptr, i32 } [ %.pn207, %477 ], [ %472, %471 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %55) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %55) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %54) #6
  br label %1006

479:                                              ; preds = %484, %482, %481, %467, %465, %447
  %480 = landingpad { ptr, i32 }
          cleanup
  br label %1005

481:                                              ; preds = %469, %457
  %.6178 = phi i32 [ %470, %469 ], [ %.5177, %457 ]
  %.6160 = phi i1 [ false, %469 ], [ %.5159, %457 ]
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE4openEPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248) %3, ptr noundef nonnull @.str.106, i32 noundef 16)
          to label %482 unwind label %479

482:                                              ; preds = %481
  %483 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull @.str.22)
          to label %484 unwind label %479

484:                                              ; preds = %482
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE5closeEv(ptr noundef nonnull align 8 dereferenceable(248) %3)
          to label %485 unwind label %479

485:                                              ; preds = %484
  call void @llvm.lifetime.start.p0(i64 10128, ptr nonnull %61) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %62) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %63) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %63) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %62, ptr noundef nonnull @.str.118, ptr noundef nonnull align 1 dereferenceable(1) %63)
          to label %486 unwind label %512

486:                                              ; preds = %485
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %64) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %65) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %65) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %64, ptr noundef nonnull @.str.106, ptr noundef nonnull align 1 dereferenceable(1) %65)
          to label %487 unwind label %514

487:                                              ; preds = %486
  invoke void @_ZN6qtorch16ContractionToolsC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_i(ptr noundef nonnull align 8 dereferenceable(10128) %61, ptr noundef nonnull align 8 dereferenceable(32) %62, ptr noundef nonnull align 8 dereferenceable(32) %64, i32 noundef 8)
          to label %488 unwind label %516

488:                                              ; preds = %487
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %64) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %65) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %65) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %64) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %62) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %63) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %63) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %62) #6
  invoke void @_ZN6qtorch16ContractionTools8ContractENS_15ContractionTypeEii(ptr dead_on_unwind nonnull writable sret(%"class.std::shared_ptr.178") align 8 %66, ptr noundef nonnull align 8 dereferenceable(10128) %61, i32 noundef 0, i32 noundef 1, i32 noundef 1)
          to label %489 unwind label %520

489:                                              ; preds = %488
  call void @_ZNSt12__shared_ptrIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %66) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %67) #6
  %490 = call { double, double } @_ZN6qtorch16ContractionTools11GetFinalValEv(ptr noundef nonnull align 8 dereferenceable(10128) %61) #6
  %491 = extractvalue { double, double } %490, 0
  store double %491, ptr %67, align 8
  %492 = getelementptr inbounds i8, ptr %67, i64 8
  %493 = extractvalue { double, double } %490, 1
  store double %493, ptr %492, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %68) #6
  %494 = call noundef double @_ZNKSt7complexIdE4realB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(16) %67)
  %495 = fadd double %494, 0xBFB98EAECB8BC33F
  %496 = call noundef double @_ZSt3absd(double noundef %495)
  %497 = fcmp ogt double %496, 1.000000e-05
  br i1 %497, label %.critedge14, label %498

498:                                              ; preds = %489
  %499 = call { double, double } @_ZN6qtorch16ContractionTools11GetFinalValEv(ptr noundef nonnull align 8 dereferenceable(10128) %61) #6
  %500 = extractvalue { double, double } %499, 0
  store double %500, ptr %68, align 8
  %501 = getelementptr inbounds i8, ptr %68, i64 8
  %502 = extractvalue { double, double } %499, 1
  store double %502, ptr %501, align 8
  %503 = call noundef double @_ZNKSt7complexIdE4imagB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(16) %68)
  %504 = call noundef double @_ZSt3absd(double noundef %503)
  %505 = fcmp ogt double %504, 1.000000e-05
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %68) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %67) #6
  br i1 %505, label %506, label %522

.critedge14:                                      ; preds = %489
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %68) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %67) #6
  br label %506

506:                                              ; preds = %.critedge14, %498
  %507 = 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.148)
          to label %508 unwind label %520

508:                                              ; preds = %506
  %509 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %507, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %510 unwind label %520

510:                                              ; preds = %508
  %511 = add nuw nsw i32 %.6178, 1
  br label %522

512:                                              ; preds = %485
  %513 = landingpad { ptr, i32 }
          cleanup
  br label %519

514:                                              ; preds = %486
  %515 = landingpad { ptr, i32 }
          cleanup
  br label %518

516:                                              ; preds = %487
  %517 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %64) #6
  br label %518

518:                                              ; preds = %516, %514
  %.pn210 = phi { ptr, i32 } [ %517, %516 ], [ %515, %514 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %65) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %65) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %64) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %62) #6
  br label %519

519:                                              ; preds = %518, %512
  %.pn210.pn = phi { ptr, i32 } [ %.pn210, %518 ], [ %513, %512 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %63) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %63) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %62) #6
  br label %1004

520:                                              ; preds = %525, %523, %522, %508, %506, %488
  %521 = landingpad { ptr, i32 }
          cleanup
  br label %1003

522:                                              ; preds = %510, %498
  %.7179 = phi i32 [ %511, %510 ], [ %.6178, %498 ]
  %.7161 = phi i1 [ false, %510 ], [ %.6160, %498 ]
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE4openEPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248) %3, ptr noundef nonnull @.str.106, i32 noundef 16)
          to label %523 unwind label %520

523:                                              ; preds = %522
  %524 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull @.str.23)
          to label %525 unwind label %520

525:                                              ; preds = %523
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE5closeEv(ptr noundef nonnull align 8 dereferenceable(248) %3)
          to label %526 unwind label %520

526:                                              ; preds = %525
  call void @llvm.lifetime.start.p0(i64 10128, ptr nonnull %69) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %70) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %71) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %71) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %70, ptr noundef nonnull @.str.118, ptr noundef nonnull align 1 dereferenceable(1) %71)
          to label %527 unwind label %552

527:                                              ; preds = %526
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %72) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %73) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %73) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %72, ptr noundef nonnull @.str.106, ptr noundef nonnull align 1 dereferenceable(1) %73)
          to label %528 unwind label %554

528:                                              ; preds = %527
  invoke void @_ZN6qtorch16ContractionToolsC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_i(ptr noundef nonnull align 8 dereferenceable(10128) %69, ptr noundef nonnull align 8 dereferenceable(32) %70, ptr noundef nonnull align 8 dereferenceable(32) %72, i32 noundef 8)
          to label %529 unwind label %556

529:                                              ; preds = %528
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %72) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %73) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %73) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %72) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %70) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %71) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %71) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %70) #6
  invoke void @_ZN6qtorch16ContractionTools8ContractENS_15ContractionTypeEii(ptr dead_on_unwind nonnull writable sret(%"class.std::shared_ptr.178") align 8 %74, ptr noundef nonnull align 8 dereferenceable(10128) %69, i32 noundef 0, i32 noundef 1, i32 noundef 1)
          to label %530 unwind label %560

530:                                              ; preds = %529
  call void @_ZNSt12__shared_ptrIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %74) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %75) #6
  %531 = call { double, double } @_ZN6qtorch16ContractionTools11GetFinalValEv(ptr noundef nonnull align 8 dereferenceable(10128) %69) #6
  %532 = extractvalue { double, double } %531, 0
  store double %532, ptr %75, align 8
  %533 = getelementptr inbounds i8, ptr %75, i64 8
  %534 = extractvalue { double, double } %531, 1
  store double %534, ptr %533, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %76) #6
  %535 = call noundef double @_ZNKSt7complexIdE4realB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(16) %75)
  %536 = call noundef double @_ZSt3absd(double noundef %535)
  %537 = fcmp ogt double %536, 1.000000e-05
  br i1 %537, label %.critedge16, label %538

538:                                              ; preds = %530
  %539 = call { double, double } @_ZN6qtorch16ContractionTools11GetFinalValEv(ptr noundef nonnull align 8 dereferenceable(10128) %69) #6
  %540 = extractvalue { double, double } %539, 0
  store double %540, ptr %76, align 8
  %541 = getelementptr inbounds i8, ptr %76, i64 8
  %542 = extractvalue { double, double } %539, 1
  store double %542, ptr %541, align 8
  %543 = call noundef double @_ZNKSt7complexIdE4imagB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(16) %76)
  %544 = call noundef double @_ZSt3absd(double noundef %543)
  %545 = fcmp ogt double %544, 1.000000e-05
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %76) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %75) #6
  br i1 %545, label %546, label %562

.critedge16:                                      ; preds = %530
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %76) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %75) #6
  br label %546

546:                                              ; preds = %.critedge16, %538
  %547 = 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.149)
          to label %548 unwind label %560

548:                                              ; preds = %546
  %549 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %547, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %550 unwind label %560

550:                                              ; preds = %548
  %551 = add nuw nsw i32 %.7179, 1
  br label %562

552:                                              ; preds = %526
  %553 = landingpad { ptr, i32 }
          cleanup
  br label %559

554:                                              ; preds = %527
  %555 = landingpad { ptr, i32 }
          cleanup
  br label %558

556:                                              ; preds = %528
  %557 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %72) #6
  br label %558

558:                                              ; preds = %556, %554
  %.pn213 = phi { ptr, i32 } [ %557, %556 ], [ %555, %554 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %73) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %73) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %72) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %70) #6
  br label %559

559:                                              ; preds = %558, %552
  %.pn213.pn = phi { ptr, i32 } [ %.pn213, %558 ], [ %553, %552 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %71) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %71) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %70) #6
  br label %1002

560:                                              ; preds = %579, %577, %576, %575, %573, %571, %569, %567, %565, %563, %562, %548, %546, %529
  %561 = landingpad { ptr, i32 }
          cleanup
  br label %1001

562:                                              ; preds = %550, %538
  %.8180 = phi i32 [ %551, %550 ], [ %.7179, %538 ]
  %.8162 = phi i1 [ false, %550 ], [ %.7161, %538 ]
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE4openEPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248) %2, ptr noundef nonnull @.str.118, i32 noundef 16)
          to label %563 unwind label %560

563:                                              ; preds = %562
  %564 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull @.str.119)
          to label %565 unwind label %560

565:                                              ; preds = %563
  %566 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %564, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %567 unwind label %560

567:                                              ; preds = %565
  %568 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull @.str.145)
          to label %569 unwind label %560

569:                                              ; preds = %567
  %570 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %568, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %571 unwind label %560

571:                                              ; preds = %569
  %572 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull @.str.150)
          to label %573 unwind label %560

573:                                              ; preds = %571
  %574 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %572, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %575 unwind label %560

575:                                              ; preds = %573
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE5closeEv(ptr noundef nonnull align 8 dereferenceable(248) %2)
          to label %576 unwind label %560

576:                                              ; preds = %575
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE4openEPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248) %3, ptr noundef nonnull @.str.106, i32 noundef 16)
          to label %577 unwind label %560

577:                                              ; preds = %576
  %578 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull @.str.21)
          to label %579 unwind label %560

579:                                              ; preds = %577
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE5closeEv(ptr noundef nonnull align 8 dereferenceable(248) %3)
          to label %580 unwind label %560

580:                                              ; preds = %579
  call void @llvm.lifetime.start.p0(i64 10128, ptr nonnull %77) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %78) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %79) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %79) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %78, ptr noundef nonnull @.str.118, ptr noundef nonnull align 1 dereferenceable(1) %79)
          to label %581 unwind label %607

581:                                              ; preds = %580
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %80) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %81) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %81) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %80, ptr noundef nonnull @.str.106, ptr noundef nonnull align 1 dereferenceable(1) %81)
          to label %582 unwind label %609

582:                                              ; preds = %581
  invoke void @_ZN6qtorch16ContractionToolsC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_i(ptr noundef nonnull align 8 dereferenceable(10128) %77, ptr noundef nonnull align 8 dereferenceable(32) %78, ptr noundef nonnull align 8 dereferenceable(32) %80, i32 noundef 8)
          to label %583 unwind label %611

583:                                              ; preds = %582
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %80) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %81) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %81) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %80) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %78) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %79) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %79) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %78) #6
  invoke void @_ZN6qtorch16ContractionTools8ContractENS_15ContractionTypeEii(ptr dead_on_unwind nonnull writable sret(%"class.std::shared_ptr.178") align 8 %82, ptr noundef nonnull align 8 dereferenceable(10128) %77, i32 noundef 0, i32 noundef 1, i32 noundef 1)
          to label %584 unwind label %615

584:                                              ; preds = %583
  call void @_ZNSt12__shared_ptrIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %82) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %83) #6
  %585 = call { double, double } @_ZN6qtorch16ContractionTools11GetFinalValEv(ptr noundef nonnull align 8 dereferenceable(10128) %77) #6
  %586 = extractvalue { double, double } %585, 0
  store double %586, ptr %83, align 8
  %587 = getelementptr inbounds i8, ptr %83, i64 8
  %588 = extractvalue { double, double } %585, 1
  store double %588, ptr %587, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %84) #6
  %589 = call noundef double @_ZNKSt7complexIdE4realB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(16) %83)
  %590 = fadd double %589, 0xBFEFD712F9A816D8
  %591 = call noundef double @_ZSt3absd(double noundef %590)
  %592 = fcmp ogt double %591, 1.000000e-05
  br i1 %592, label %.critedge18, label %593

593:                                              ; preds = %584
  %594 = call { double, double } @_ZN6qtorch16ContractionTools11GetFinalValEv(ptr noundef nonnull align 8 dereferenceable(10128) %77) #6
  %595 = extractvalue { double, double } %594, 0
  store double %595, ptr %84, align 8
  %596 = getelementptr inbounds i8, ptr %84, i64 8
  %597 = extractvalue { double, double } %594, 1
  store double %597, ptr %596, align 8
  %598 = call noundef double @_ZNKSt7complexIdE4imagB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(16) %84)
  %599 = call noundef double @_ZSt3absd(double noundef %598)
  %600 = fcmp ogt double %599, 1.000000e-05
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %84) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %83) #6
  br i1 %600, label %601, label %617

.critedge18:                                      ; preds = %584
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %84) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %83) #6
  br label %601

601:                                              ; preds = %.critedge18, %593
  %602 = 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.151)
          to label %603 unwind label %615

603:                                              ; preds = %601
  %604 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %602, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %605 unwind label %615

605:                                              ; preds = %603
  %606 = add nuw nsw i32 %.8180, 1
  br label %617

607:                                              ; preds = %580
  %608 = landingpad { ptr, i32 }
          cleanup
  br label %614

609:                                              ; preds = %581
  %610 = landingpad { ptr, i32 }
          cleanup
  br label %613

611:                                              ; preds = %582
  %612 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %80) #6
  br label %613

613:                                              ; preds = %611, %609
  %.pn216 = phi { ptr, i32 } [ %612, %611 ], [ %610, %609 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %81) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %81) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %80) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %78) #6
  br label %614

614:                                              ; preds = %613, %607
  %.pn216.pn = phi { ptr, i32 } [ %.pn216, %613 ], [ %608, %607 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %79) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %79) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %78) #6
  br label %1000

615:                                              ; preds = %620, %618, %617, %603, %601, %583
  %616 = landingpad { ptr, i32 }
          cleanup
  br label %999

617:                                              ; preds = %605, %593
  %.9181 = phi i32 [ %606, %605 ], [ %.8180, %593 ]
  %.9163 = phi i1 [ false, %605 ], [ %.8162, %593 ]
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE4openEPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248) %3, ptr noundef nonnull @.str.106, i32 noundef 16)
          to label %618 unwind label %615

618:                                              ; preds = %617
  %619 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull @.str.22)
          to label %620 unwind label %615

620:                                              ; preds = %618
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE5closeEv(ptr noundef nonnull align 8 dereferenceable(248) %3)
          to label %621 unwind label %615

621:                                              ; preds = %620
  call void @llvm.lifetime.start.p0(i64 10128, ptr nonnull %85) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %86) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %87) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %87) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %86, ptr noundef nonnull @.str.118, ptr noundef nonnull align 1 dereferenceable(1) %87)
          to label %622 unwind label %648

622:                                              ; preds = %621
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %88) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %89) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %89) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %88, ptr noundef nonnull @.str.106, ptr noundef nonnull align 1 dereferenceable(1) %89)
          to label %623 unwind label %650

623:                                              ; preds = %622
  invoke void @_ZN6qtorch16ContractionToolsC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_i(ptr noundef nonnull align 8 dereferenceable(10128) %85, ptr noundef nonnull align 8 dereferenceable(32) %86, ptr noundef nonnull align 8 dereferenceable(32) %88, i32 noundef 8)
          to label %624 unwind label %652

624:                                              ; preds = %623
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %88) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %89) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %89) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %88) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %86) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %87) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %87) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %86) #6
  invoke void @_ZN6qtorch16ContractionTools8ContractENS_15ContractionTypeEii(ptr dead_on_unwind nonnull writable sret(%"class.std::shared_ptr.178") align 8 %90, ptr noundef nonnull align 8 dereferenceable(10128) %85, i32 noundef 0, i32 noundef 1, i32 noundef 1)
          to label %625 unwind label %656

625:                                              ; preds = %624
  call void @_ZNSt12__shared_ptrIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %90) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %91) #6
  %626 = call { double, double } @_ZN6qtorch16ContractionTools11GetFinalValEv(ptr noundef nonnull align 8 dereferenceable(10128) %85) #6
  %627 = extractvalue { double, double } %626, 0
  store double %627, ptr %91, align 8
  %628 = getelementptr inbounds i8, ptr %91, i64 8
  %629 = extractvalue { double, double } %626, 1
  store double %629, ptr %628, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %92) #6
  %630 = call noundef double @_ZNKSt7complexIdE4realB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(16) %91)
  %631 = fadd double %630, 0x3FB98EAECB8BC33F
  %632 = call noundef double @_ZSt3absd(double noundef %631)
  %633 = fcmp ogt double %632, 1.000000e-05
  br i1 %633, label %.critedge20, label %634

634:                                              ; preds = %625
  %635 = call { double, double } @_ZN6qtorch16ContractionTools11GetFinalValEv(ptr noundef nonnull align 8 dereferenceable(10128) %85) #6
  %636 = extractvalue { double, double } %635, 0
  store double %636, ptr %92, align 8
  %637 = getelementptr inbounds i8, ptr %92, i64 8
  %638 = extractvalue { double, double } %635, 1
  store double %638, ptr %637, align 8
  %639 = call noundef double @_ZNKSt7complexIdE4imagB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(16) %92)
  %640 = call noundef double @_ZSt3absd(double noundef %639)
  %641 = fcmp ogt double %640, 1.000000e-05
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %92) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %91) #6
  br i1 %641, label %642, label %658

.critedge20:                                      ; preds = %625
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %92) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %91) #6
  br label %642

642:                                              ; preds = %.critedge20, %634
  %643 = 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.152)
          to label %644 unwind label %656

644:                                              ; preds = %642
  %645 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %643, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %646 unwind label %656

646:                                              ; preds = %644
  %647 = add nuw nsw i32 %.9181, 1
  br label %658

648:                                              ; preds = %621
  %649 = landingpad { ptr, i32 }
          cleanup
  br label %655

650:                                              ; preds = %622
  %651 = landingpad { ptr, i32 }
          cleanup
  br label %654

652:                                              ; preds = %623
  %653 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %88) #6
  br label %654

654:                                              ; preds = %652, %650
  %.pn219 = phi { ptr, i32 } [ %653, %652 ], [ %651, %650 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %89) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %89) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %88) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %86) #6
  br label %655

655:                                              ; preds = %654, %648
  %.pn219.pn = phi { ptr, i32 } [ %.pn219, %654 ], [ %649, %648 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %87) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %87) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %86) #6
  br label %998

656:                                              ; preds = %661, %659, %658, %644, %642, %624
  %657 = landingpad { ptr, i32 }
          cleanup
  br label %997

658:                                              ; preds = %646, %634
  %.10182 = phi i32 [ %647, %646 ], [ %.9181, %634 ]
  %.10164 = phi i1 [ false, %646 ], [ %.9163, %634 ]
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE4openEPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248) %3, ptr noundef nonnull @.str.106, i32 noundef 16)
          to label %659 unwind label %656

659:                                              ; preds = %658
  %660 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull @.str.23)
          to label %661 unwind label %656

661:                                              ; preds = %659
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE5closeEv(ptr noundef nonnull align 8 dereferenceable(248) %3)
          to label %662 unwind label %656

662:                                              ; preds = %661
  call void @llvm.lifetime.start.p0(i64 10128, ptr nonnull %93) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %94) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %95) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %95) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %94, ptr noundef nonnull @.str.118, ptr noundef nonnull align 1 dereferenceable(1) %95)
          to label %663 unwind label %688

663:                                              ; preds = %662
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %96) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %97) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %97) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %96, ptr noundef nonnull @.str.106, ptr noundef nonnull align 1 dereferenceable(1) %97)
          to label %664 unwind label %690

664:                                              ; preds = %663
  invoke void @_ZN6qtorch16ContractionToolsC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_i(ptr noundef nonnull align 8 dereferenceable(10128) %93, ptr noundef nonnull align 8 dereferenceable(32) %94, ptr noundef nonnull align 8 dereferenceable(32) %96, i32 noundef 8)
          to label %665 unwind label %692

665:                                              ; preds = %664
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %96) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %97) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %97) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %96) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %94) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %95) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %95) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %94) #6
  invoke void @_ZN6qtorch16ContractionTools8ContractENS_15ContractionTypeEii(ptr dead_on_unwind nonnull writable sret(%"class.std::shared_ptr.178") align 8 %98, ptr noundef nonnull align 8 dereferenceable(10128) %93, i32 noundef 0, i32 noundef 1, i32 noundef 1)
          to label %666 unwind label %696

666:                                              ; preds = %665
  call void @_ZNSt12__shared_ptrIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %98) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %99) #6
  %667 = call { double, double } @_ZN6qtorch16ContractionTools11GetFinalValEv(ptr noundef nonnull align 8 dereferenceable(10128) %93) #6
  %668 = extractvalue { double, double } %667, 0
  store double %668, ptr %99, align 8
  %669 = getelementptr inbounds i8, ptr %99, i64 8
  %670 = extractvalue { double, double } %667, 1
  store double %670, ptr %669, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %100) #6
  %671 = call noundef double @_ZNKSt7complexIdE4realB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(16) %99)
  %672 = call noundef double @_ZSt3absd(double noundef %671)
  %673 = fcmp ogt double %672, 1.000000e-05
  br i1 %673, label %.critedge22, label %674

674:                                              ; preds = %666
  %675 = call { double, double } @_ZN6qtorch16ContractionTools11GetFinalValEv(ptr noundef nonnull align 8 dereferenceable(10128) %93) #6
  %676 = extractvalue { double, double } %675, 0
  store double %676, ptr %100, align 8
  %677 = getelementptr inbounds i8, ptr %100, i64 8
  %678 = extractvalue { double, double } %675, 1
  store double %678, ptr %677, align 8
  %679 = call noundef double @_ZNKSt7complexIdE4imagB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(16) %100)
  %680 = call noundef double @_ZSt3absd(double noundef %679)
  %681 = fcmp ogt double %680, 1.000000e-05
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %100) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %99) #6
  br i1 %681, label %682, label %698

.critedge22:                                      ; preds = %666
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %100) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %99) #6
  br label %682

682:                                              ; preds = %.critedge22, %674
  %683 = 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.153)
          to label %684 unwind label %696

684:                                              ; preds = %682
  %685 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %683, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %686 unwind label %696

686:                                              ; preds = %684
  %687 = add nuw nsw i32 %.10182, 1
  br label %698

688:                                              ; preds = %662
  %689 = landingpad { ptr, i32 }
          cleanup
  br label %695

690:                                              ; preds = %663
  %691 = landingpad { ptr, i32 }
          cleanup
  br label %694

692:                                              ; preds = %664
  %693 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %96) #6
  br label %694

694:                                              ; preds = %692, %690
  %.pn222 = phi { ptr, i32 } [ %693, %692 ], [ %691, %690 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %97) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %97) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %96) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %94) #6
  br label %695

695:                                              ; preds = %694, %688
  %.pn222.pn = phi { ptr, i32 } [ %.pn222, %694 ], [ %689, %688 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %95) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %95) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %94) #6
  br label %996

696:                                              ; preds = %711, %709, %708, %707, %705, %703, %701, %699, %698, %684, %682, %665
  %697 = landingpad { ptr, i32 }
          cleanup
  br label %995

698:                                              ; preds = %686, %674
  %.11183 = phi i32 [ %687, %686 ], [ %.10182, %674 ]
  %.11165 = phi i1 [ false, %686 ], [ %.10164, %674 ]
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE4openEPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248) %2, ptr noundef nonnull @.str.118, i32 noundef 16)
          to label %699 unwind label %696

699:                                              ; preds = %698
  %700 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull @.str.119)
          to label %701 unwind label %696

701:                                              ; preds = %699
  %702 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %700, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %703 unwind label %696

703:                                              ; preds = %701
  %704 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull @.str.154)
          to label %705 unwind label %696

705:                                              ; preds = %703
  %706 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %704, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %707 unwind label %696

707:                                              ; preds = %705
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE5closeEv(ptr noundef nonnull align 8 dereferenceable(248) %2)
          to label %708 unwind label %696

708:                                              ; preds = %707
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE4openEPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248) %3, ptr noundef nonnull @.str.106, i32 noundef 16)
          to label %709 unwind label %696

709:                                              ; preds = %708
  %710 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull @.str.21)
          to label %711 unwind label %696

711:                                              ; preds = %709
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE5closeEv(ptr noundef nonnull align 8 dereferenceable(248) %3)
          to label %712 unwind label %696

712:                                              ; preds = %711
  call void @llvm.lifetime.start.p0(i64 10128, ptr nonnull %101) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %102) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %103) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %103) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %102, ptr noundef nonnull @.str.118, ptr noundef nonnull align 1 dereferenceable(1) %103)
          to label %713 unwind label %738

713:                                              ; preds = %712
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %104) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %105) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %105) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %104, ptr noundef nonnull @.str.106, ptr noundef nonnull align 1 dereferenceable(1) %105)
          to label %714 unwind label %740

714:                                              ; preds = %713
  invoke void @_ZN6qtorch16ContractionToolsC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_i(ptr noundef nonnull align 8 dereferenceable(10128) %101, ptr noundef nonnull align 8 dereferenceable(32) %102, ptr noundef nonnull align 8 dereferenceable(32) %104, i32 noundef 8)
          to label %715 unwind label %742

715:                                              ; preds = %714
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %104) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %105) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %105) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %104) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %102) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %103) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %103) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %102) #6
  invoke void @_ZN6qtorch16ContractionTools8ContractENS_15ContractionTypeEii(ptr dead_on_unwind nonnull writable sret(%"class.std::shared_ptr.178") align 8 %106, ptr noundef nonnull align 8 dereferenceable(10128) %101, i32 noundef 0, i32 noundef 1, i32 noundef 1)
          to label %716 unwind label %746

716:                                              ; preds = %715
  call void @_ZNSt12__shared_ptrIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %106) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %107) #6
  %717 = call { double, double } @_ZN6qtorch16ContractionTools11GetFinalValEv(ptr noundef nonnull align 8 dereferenceable(10128) %101) #6
  %718 = extractvalue { double, double } %717, 0
  store double %718, ptr %107, align 8
  %719 = getelementptr inbounds i8, ptr %107, i64 8
  %720 = extractvalue { double, double } %717, 1
  store double %720, ptr %719, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %108) #6
  %721 = call noundef double @_ZNKSt7complexIdE4realB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(16) %107)
  %722 = call noundef double @_ZSt3absd(double noundef %721)
  %723 = fcmp ogt double %722, 1.000000e-05
  br i1 %723, label %.critedge24, label %724

724:                                              ; preds = %716
  %725 = call { double, double } @_ZN6qtorch16ContractionTools11GetFinalValEv(ptr noundef nonnull align 8 dereferenceable(10128) %101) #6
  %726 = extractvalue { double, double } %725, 0
  store double %726, ptr %108, align 8
  %727 = getelementptr inbounds i8, ptr %108, i64 8
  %728 = extractvalue { double, double } %725, 1
  store double %728, ptr %727, align 8
  %729 = call noundef double @_ZNKSt7complexIdE4imagB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(16) %108)
  %730 = call noundef double @_ZSt3absd(double noundef %729)
  %731 = fcmp ogt double %730, 1.000000e-05
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %108) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %107) #6
  br i1 %731, label %732, label %748

.critedge24:                                      ; preds = %716
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %108) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %107) #6
  br label %732

732:                                              ; preds = %.critedge24, %724
  %733 = 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.155)
          to label %734 unwind label %746

734:                                              ; preds = %732
  %735 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %733, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %736 unwind label %746

736:                                              ; preds = %734
  %737 = add nuw nsw i32 %.11183, 1
  br label %748

738:                                              ; preds = %712
  %739 = landingpad { ptr, i32 }
          cleanup
  br label %745

740:                                              ; preds = %713
  %741 = landingpad { ptr, i32 }
          cleanup
  br label %744

742:                                              ; preds = %714
  %743 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %104) #6
  br label %744

744:                                              ; preds = %742, %740
  %.pn225 = phi { ptr, i32 } [ %743, %742 ], [ %741, %740 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %105) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %105) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %104) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %102) #6
  br label %745

745:                                              ; preds = %744, %738
  %.pn225.pn = phi { ptr, i32 } [ %.pn225, %744 ], [ %739, %738 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %103) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %103) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %102) #6
  br label %994

746:                                              ; preds = %751, %749, %748, %734, %732, %715
  %747 = landingpad { ptr, i32 }
          cleanup
  br label %993

748:                                              ; preds = %736, %724
  %.12184 = phi i32 [ %737, %736 ], [ %.11183, %724 ]
  %.12166 = phi i1 [ false, %736 ], [ %.11165, %724 ]
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE4openEPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248) %3, ptr noundef nonnull @.str.106, i32 noundef 16)
          to label %749 unwind label %746

749:                                              ; preds = %748
  %750 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull @.str.22)
          to label %751 unwind label %746

751:                                              ; preds = %749
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE5closeEv(ptr noundef nonnull align 8 dereferenceable(248) %3)
          to label %752 unwind label %746

752:                                              ; preds = %751
  call void @llvm.lifetime.start.p0(i64 10128, ptr nonnull %109) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %110) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %111) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %111) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %110, ptr noundef nonnull @.str.118, ptr noundef nonnull align 1 dereferenceable(1) %111)
          to label %753 unwind label %779

753:                                              ; preds = %752
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %112) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %113) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %113) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %112, ptr noundef nonnull @.str.106, ptr noundef nonnull align 1 dereferenceable(1) %113)
          to label %754 unwind label %781

754:                                              ; preds = %753
  invoke void @_ZN6qtorch16ContractionToolsC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_i(ptr noundef nonnull align 8 dereferenceable(10128) %109, ptr noundef nonnull align 8 dereferenceable(32) %110, ptr noundef nonnull align 8 dereferenceable(32) %112, i32 noundef 8)
          to label %755 unwind label %783

755:                                              ; preds = %754
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %112) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %113) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %113) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %112) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %110) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %111) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %111) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %110) #6
  invoke void @_ZN6qtorch16ContractionTools8ContractENS_15ContractionTypeEii(ptr dead_on_unwind nonnull writable sret(%"class.std::shared_ptr.178") align 8 %114, ptr noundef nonnull align 8 dereferenceable(10128) %109, i32 noundef 0, i32 noundef 1, i32 noundef 1)
          to label %756 unwind label %787

756:                                              ; preds = %755
  call void @_ZNSt12__shared_ptrIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %114) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %115) #6
  %757 = call { double, double } @_ZN6qtorch16ContractionTools11GetFinalValEv(ptr noundef nonnull align 8 dereferenceable(10128) %109) #6
  %758 = extractvalue { double, double } %757, 0
  store double %758, ptr %115, align 8
  %759 = getelementptr inbounds i8, ptr %115, i64 8
  %760 = extractvalue { double, double } %757, 1
  store double %760, ptr %759, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %116) #6
  %761 = call noundef double @_ZNKSt7complexIdE4realB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(16) %115)
  %762 = fadd double %761, 0x3FB98EAECB8BC33F
  %763 = call noundef double @_ZSt3absd(double noundef %762)
  %764 = fcmp ogt double %763, 1.000000e-05
  br i1 %764, label %.critedge26, label %765

765:                                              ; preds = %756
  %766 = call { double, double } @_ZN6qtorch16ContractionTools11GetFinalValEv(ptr noundef nonnull align 8 dereferenceable(10128) %109) #6
  %767 = extractvalue { double, double } %766, 0
  store double %767, ptr %116, align 8
  %768 = getelementptr inbounds i8, ptr %116, i64 8
  %769 = extractvalue { double, double } %766, 1
  store double %769, ptr %768, align 8
  %770 = call noundef double @_ZNKSt7complexIdE4imagB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(16) %116)
  %771 = call noundef double @_ZSt3absd(double noundef %770)
  %772 = fcmp ogt double %771, 1.000000e-05
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %116) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %115) #6
  br i1 %772, label %773, label %789

.critedge26:                                      ; preds = %756
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %116) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %115) #6
  br label %773

773:                                              ; preds = %.critedge26, %765
  %774 = 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.156)
          to label %775 unwind label %787

775:                                              ; preds = %773
  %776 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %774, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %777 unwind label %787

777:                                              ; preds = %775
  %778 = add nuw nsw i32 %.12184, 1
  br label %789

779:                                              ; preds = %752
  %780 = landingpad { ptr, i32 }
          cleanup
  br label %786

781:                                              ; preds = %753
  %782 = landingpad { ptr, i32 }
          cleanup
  br label %785

783:                                              ; preds = %754
  %784 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %112) #6
  br label %785

785:                                              ; preds = %783, %781
  %.pn228 = phi { ptr, i32 } [ %784, %783 ], [ %782, %781 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %113) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %113) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %112) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %110) #6
  br label %786

786:                                              ; preds = %785, %779
  %.pn228.pn = phi { ptr, i32 } [ %.pn228, %785 ], [ %780, %779 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %111) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %111) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %110) #6
  br label %992

787:                                              ; preds = %792, %790, %789, %775, %773, %755
  %788 = landingpad { ptr, i32 }
          cleanup
  br label %991

789:                                              ; preds = %777, %765
  %.13185 = phi i32 [ %778, %777 ], [ %.12184, %765 ]
  %.13167 = phi i1 [ false, %777 ], [ %.12166, %765 ]
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE4openEPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248) %3, ptr noundef nonnull @.str.106, i32 noundef 16)
          to label %790 unwind label %787

790:                                              ; preds = %789
  %791 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull @.str.23)
          to label %792 unwind label %787

792:                                              ; preds = %790
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE5closeEv(ptr noundef nonnull align 8 dereferenceable(248) %3)
          to label %793 unwind label %787

793:                                              ; preds = %792
  call void @llvm.lifetime.start.p0(i64 10128, ptr nonnull %117) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %118) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %119) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %119) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %118, ptr noundef nonnull @.str.118, ptr noundef nonnull align 1 dereferenceable(1) %119)
          to label %794 unwind label %820

794:                                              ; preds = %793
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %120) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %121) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %121) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %120, ptr noundef nonnull @.str.106, ptr noundef nonnull align 1 dereferenceable(1) %121)
          to label %795 unwind label %822

795:                                              ; preds = %794
  invoke void @_ZN6qtorch16ContractionToolsC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_i(ptr noundef nonnull align 8 dereferenceable(10128) %117, ptr noundef nonnull align 8 dereferenceable(32) %118, ptr noundef nonnull align 8 dereferenceable(32) %120, i32 noundef 8)
          to label %796 unwind label %824

796:                                              ; preds = %795
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %120) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %121) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %121) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %120) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %118) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %119) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %119) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %118) #6
  invoke void @_ZN6qtorch16ContractionTools8ContractENS_15ContractionTypeEii(ptr dead_on_unwind nonnull writable sret(%"class.std::shared_ptr.178") align 8 %122, ptr noundef nonnull align 8 dereferenceable(10128) %117, i32 noundef 0, i32 noundef 1, i32 noundef 1)
          to label %797 unwind label %828

797:                                              ; preds = %796
  call void @_ZNSt12__shared_ptrIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %122) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %123) #6
  %798 = call { double, double } @_ZN6qtorch16ContractionTools11GetFinalValEv(ptr noundef nonnull align 8 dereferenceable(10128) %117) #6
  %799 = extractvalue { double, double } %798, 0
  store double %799, ptr %123, align 8
  %800 = getelementptr inbounds i8, ptr %123, i64 8
  %801 = extractvalue { double, double } %798, 1
  store double %801, ptr %800, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %124) #6
  %802 = call noundef double @_ZNKSt7complexIdE4realB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(16) %123)
  %803 = fadd double %802, 0xBFEFD712F9A816D8
  %804 = call noundef double @_ZSt3absd(double noundef %803)
  %805 = fcmp ogt double %804, 1.000000e-05
  br i1 %805, label %.critedge28, label %806

806:                                              ; preds = %797
  %807 = call { double, double } @_ZN6qtorch16ContractionTools11GetFinalValEv(ptr noundef nonnull align 8 dereferenceable(10128) %117) #6
  %808 = extractvalue { double, double } %807, 0
  store double %808, ptr %124, align 8
  %809 = getelementptr inbounds i8, ptr %124, i64 8
  %810 = extractvalue { double, double } %807, 1
  store double %810, ptr %809, align 8
  %811 = call noundef double @_ZNKSt7complexIdE4imagB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(16) %124)
  %812 = call noundef double @_ZSt3absd(double noundef %811)
  %813 = fcmp ogt double %812, 1.000000e-05
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %124) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %123) #6
  br i1 %813, label %814, label %830

.critedge28:                                      ; preds = %797
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %124) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %123) #6
  br label %814

814:                                              ; preds = %.critedge28, %806
  %815 = 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.157)
          to label %816 unwind label %828

816:                                              ; preds = %814
  %817 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %815, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %818 unwind label %828

818:                                              ; preds = %816
  %819 = add nuw nsw i32 %.13185, 1
  br label %830

820:                                              ; preds = %793
  %821 = landingpad { ptr, i32 }
          cleanup
  br label %827

822:                                              ; preds = %794
  %823 = landingpad { ptr, i32 }
          cleanup
  br label %826

824:                                              ; preds = %795
  %825 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %120) #6
  br label %826

826:                                              ; preds = %824, %822
  %.pn231 = phi { ptr, i32 } [ %825, %824 ], [ %823, %822 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %121) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %121) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %120) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %118) #6
  br label %827

827:                                              ; preds = %826, %820
  %.pn231.pn = phi { ptr, i32 } [ %.pn231, %826 ], [ %821, %820 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %119) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %119) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %118) #6
  br label %990

828:                                              ; preds = %843, %841, %840, %839, %837, %835, %833, %831, %830, %816, %814, %796
  %829 = landingpad { ptr, i32 }
          cleanup
  br label %989

830:                                              ; preds = %818, %806
  %.14186 = phi i32 [ %819, %818 ], [ %.13185, %806 ]
  %.14168 = phi i1 [ false, %818 ], [ %.13167, %806 ]
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE4openEPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248) %2, ptr noundef nonnull @.str.118, i32 noundef 16)
          to label %831 unwind label %828

831:                                              ; preds = %830
  %832 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull @.str.119)
          to label %833 unwind label %828

833:                                              ; preds = %831
  %834 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %832, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %835 unwind label %828

835:                                              ; preds = %833
  %836 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull @.str.158)
          to label %837 unwind label %828

837:                                              ; preds = %835
  %838 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %836, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %839 unwind label %828

839:                                              ; preds = %837
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE5closeEv(ptr noundef nonnull align 8 dereferenceable(248) %2)
          to label %840 unwind label %828

840:                                              ; preds = %839
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE4openEPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248) %3, ptr noundef nonnull @.str.106, i32 noundef 16)
          to label %841 unwind label %828

841:                                              ; preds = %840
  %842 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull @.str.21)
          to label %843 unwind label %828

843:                                              ; preds = %841
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE5closeEv(ptr noundef nonnull align 8 dereferenceable(248) %3)
          to label %844 unwind label %828

844:                                              ; preds = %843
  call void @llvm.lifetime.start.p0(i64 10128, ptr nonnull %125) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %126) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %127) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %127) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %126, ptr noundef nonnull @.str.118, ptr noundef nonnull align 1 dereferenceable(1) %127)
          to label %845 unwind label %870

845:                                              ; preds = %844
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %128) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %129) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %129) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %128, ptr noundef nonnull @.str.106, ptr noundef nonnull align 1 dereferenceable(1) %129)
          to label %846 unwind label %872

846:                                              ; preds = %845
  invoke void @_ZN6qtorch16ContractionToolsC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_i(ptr noundef nonnull align 8 dereferenceable(10128) %125, ptr noundef nonnull align 8 dereferenceable(32) %126, ptr noundef nonnull align 8 dereferenceable(32) %128, i32 noundef 8)
          to label %847 unwind label %874

847:                                              ; preds = %846
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %128) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %129) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %129) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %128) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %126) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %127) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %127) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %126) #6
  invoke void @_ZN6qtorch16ContractionTools8ContractENS_15ContractionTypeEii(ptr dead_on_unwind nonnull writable sret(%"class.std::shared_ptr.178") align 8 %130, ptr noundef nonnull align 8 dereferenceable(10128) %125, i32 noundef 0, i32 noundef 1, i32 noundef 1)
          to label %848 unwind label %878

848:                                              ; preds = %847
  call void @_ZNSt12__shared_ptrIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %130) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %131) #6
  %849 = call { double, double } @_ZN6qtorch16ContractionTools11GetFinalValEv(ptr noundef nonnull align 8 dereferenceable(10128) %125) #6
  %850 = extractvalue { double, double } %849, 0
  store double %850, ptr %131, align 8
  %851 = getelementptr inbounds i8, ptr %131, i64 8
  %852 = extractvalue { double, double } %849, 1
  store double %852, ptr %851, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %132) #6
  %853 = call noundef double @_ZNKSt7complexIdE4realB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(16) %131)
  %854 = call noundef double @_ZSt3absd(double noundef %853)
  %855 = fcmp ogt double %854, 1.000000e-05
  br i1 %855, label %.critedge30, label %856

856:                                              ; preds = %848
  %857 = call { double, double } @_ZN6qtorch16ContractionTools11GetFinalValEv(ptr noundef nonnull align 8 dereferenceable(10128) %125) #6
  %858 = extractvalue { double, double } %857, 0
  store double %858, ptr %132, align 8
  %859 = getelementptr inbounds i8, ptr %132, i64 8
  %860 = extractvalue { double, double } %857, 1
  store double %860, ptr %859, align 8
  %861 = call noundef double @_ZNKSt7complexIdE4imagB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(16) %132)
  %862 = call noundef double @_ZSt3absd(double noundef %861)
  %863 = fcmp ogt double %862, 1.000000e-05
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %132) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %131) #6
  br i1 %863, label %864, label %880

.critedge30:                                      ; preds = %848
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %132) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %131) #6
  br label %864

864:                                              ; preds = %.critedge30, %856
  %865 = 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.159)
          to label %866 unwind label %878

866:                                              ; preds = %864
  %867 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %865, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %868 unwind label %878

868:                                              ; preds = %866
  %869 = add nuw nsw i32 %.14186, 1
  br label %880

870:                                              ; preds = %844
  %871 = landingpad { ptr, i32 }
          cleanup
  br label %877

872:                                              ; preds = %845
  %873 = landingpad { ptr, i32 }
          cleanup
  br label %876

874:                                              ; preds = %846
  %875 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %128) #6
  br label %876

876:                                              ; preds = %874, %872
  %.pn234 = phi { ptr, i32 } [ %875, %874 ], [ %873, %872 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %129) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %129) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %128) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %126) #6
  br label %877

877:                                              ; preds = %876, %870
  %.pn234.pn = phi { ptr, i32 } [ %.pn234, %876 ], [ %871, %870 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %127) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %127) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %126) #6
  br label %988

878:                                              ; preds = %883, %881, %880, %866, %864, %847
  %879 = landingpad { ptr, i32 }
          cleanup
  br label %987

880:                                              ; preds = %868, %856
  %.15187 = phi i32 [ %869, %868 ], [ %.14186, %856 ]
  %.15169 = phi i1 [ false, %868 ], [ %.14168, %856 ]
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE4openEPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248) %3, ptr noundef nonnull @.str.106, i32 noundef 16)
          to label %881 unwind label %878

881:                                              ; preds = %880
  %882 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull @.str.22)
          to label %883 unwind label %878

883:                                              ; preds = %881
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE5closeEv(ptr noundef nonnull align 8 dereferenceable(248) %3)
          to label %884 unwind label %878

884:                                              ; preds = %883
  call void @llvm.lifetime.start.p0(i64 10128, ptr nonnull %133) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %134) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %135) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %135) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %134, ptr noundef nonnull @.str.118, ptr noundef nonnull align 1 dereferenceable(1) %135)
          to label %885 unwind label %911

885:                                              ; preds = %884
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %136) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %137) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %137) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %136, ptr noundef nonnull @.str.106, ptr noundef nonnull align 1 dereferenceable(1) %137)
          to label %886 unwind label %913

886:                                              ; preds = %885
  invoke void @_ZN6qtorch16ContractionToolsC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_i(ptr noundef nonnull align 8 dereferenceable(10128) %133, ptr noundef nonnull align 8 dereferenceable(32) %134, ptr noundef nonnull align 8 dereferenceable(32) %136, i32 noundef 8)
          to label %887 unwind label %915

887:                                              ; preds = %886
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %136) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %137) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %137) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %136) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %134) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %135) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %135) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %134) #6
  invoke void @_ZN6qtorch16ContractionTools8ContractENS_15ContractionTypeEii(ptr dead_on_unwind nonnull writable sret(%"class.std::shared_ptr.178") align 8 %138, ptr noundef nonnull align 8 dereferenceable(10128) %133, i32 noundef 0, i32 noundef 1, i32 noundef 1)
          to label %888 unwind label %919

888:                                              ; preds = %887
  call void @_ZNSt12__shared_ptrIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %138) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %139) #6
  %889 = call { double, double } @_ZN6qtorch16ContractionTools11GetFinalValEv(ptr noundef nonnull align 8 dereferenceable(10128) %133) #6
  %890 = extractvalue { double, double } %889, 0
  store double %890, ptr %139, align 8
  %891 = getelementptr inbounds i8, ptr %139, i64 8
  %892 = extractvalue { double, double } %889, 1
  store double %892, ptr %891, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %140) #6
  %893 = call noundef double @_ZNKSt7complexIdE4realB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(16) %139)
  %894 = fadd double %893, 0xBFB98EAECB8BC33F
  %895 = call noundef double @_ZSt3absd(double noundef %894)
  %896 = fcmp ogt double %895, 1.000000e-05
  br i1 %896, label %.critedge32, label %897

897:                                              ; preds = %888
  %898 = call { double, double } @_ZN6qtorch16ContractionTools11GetFinalValEv(ptr noundef nonnull align 8 dereferenceable(10128) %133) #6
  %899 = extractvalue { double, double } %898, 0
  store double %899, ptr %140, align 8
  %900 = getelementptr inbounds i8, ptr %140, i64 8
  %901 = extractvalue { double, double } %898, 1
  store double %901, ptr %900, align 8
  %902 = call noundef double @_ZNKSt7complexIdE4imagB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(16) %140)
  %903 = call noundef double @_ZSt3absd(double noundef %902)
  %904 = fcmp ogt double %903, 1.000000e-05
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %140) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %139) #6
  br i1 %904, label %905, label %921

.critedge32:                                      ; preds = %888
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %140) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %139) #6
  br label %905

905:                                              ; preds = %.critedge32, %897
  %906 = 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.160)
          to label %907 unwind label %919

907:                                              ; preds = %905
  %908 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %906, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %909 unwind label %919

909:                                              ; preds = %907
  %910 = add nuw nsw i32 %.15187, 1
  br label %921

911:                                              ; preds = %884
  %912 = landingpad { ptr, i32 }
          cleanup
  br label %918

913:                                              ; preds = %885
  %914 = landingpad { ptr, i32 }
          cleanup
  br label %917

915:                                              ; preds = %886
  %916 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %136) #6
  br label %917

917:                                              ; preds = %915, %913
  %.pn237 = phi { ptr, i32 } [ %916, %915 ], [ %914, %913 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %137) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %137) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %136) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %134) #6
  br label %918

918:                                              ; preds = %917, %911
  %.pn237.pn = phi { ptr, i32 } [ %.pn237, %917 ], [ %912, %911 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %135) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %135) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %134) #6
  br label %986

919:                                              ; preds = %924, %922, %921, %907, %905, %887
  %920 = landingpad { ptr, i32 }
          cleanup
  br label %985

921:                                              ; preds = %909, %897
  %.16188 = phi i32 [ %910, %909 ], [ %.15187, %897 ]
  %.16170 = phi i1 [ false, %909 ], [ %.15169, %897 ]
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE4openEPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248) %3, ptr noundef nonnull @.str.106, i32 noundef 16)
          to label %922 unwind label %919

922:                                              ; preds = %921
  %923 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull @.str.23)
          to label %924 unwind label %919

924:                                              ; preds = %922
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE5closeEv(ptr noundef nonnull align 8 dereferenceable(248) %3)
          to label %925 unwind label %919

925:                                              ; preds = %924
  call void @llvm.lifetime.start.p0(i64 10128, ptr nonnull %141) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %142) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %143) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %143) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %142, ptr noundef nonnull @.str.118, ptr noundef nonnull align 1 dereferenceable(1) %143)
          to label %926 unwind label %952

926:                                              ; preds = %925
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %144) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %145) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %145) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %144, ptr noundef nonnull @.str.106, ptr noundef nonnull align 1 dereferenceable(1) %145)
          to label %927 unwind label %954

927:                                              ; preds = %926
  invoke void @_ZN6qtorch16ContractionToolsC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_i(ptr noundef nonnull align 8 dereferenceable(10128) %141, ptr noundef nonnull align 8 dereferenceable(32) %142, ptr noundef nonnull align 8 dereferenceable(32) %144, i32 noundef 8)
          to label %928 unwind label %956

928:                                              ; preds = %927
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %144) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %145) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %145) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %144) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %142) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %143) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %143) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %142) #6
  invoke void @_ZN6qtorch16ContractionTools8ContractENS_15ContractionTypeEii(ptr dead_on_unwind nonnull writable sret(%"class.std::shared_ptr.178") align 8 %146, ptr noundef nonnull align 8 dereferenceable(10128) %141, i32 noundef 0, i32 noundef 1, i32 noundef 1)
          to label %929 unwind label %960

929:                                              ; preds = %928
  call void @_ZNSt12__shared_ptrIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %146) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %147) #6
  %930 = call { double, double } @_ZN6qtorch16ContractionTools11GetFinalValEv(ptr noundef nonnull align 8 dereferenceable(10128) %141) #6
  %931 = extractvalue { double, double } %930, 0
  store double %931, ptr %147, align 8
  %932 = getelementptr inbounds i8, ptr %147, i64 8
  %933 = extractvalue { double, double } %930, 1
  store double %933, ptr %932, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %148) #6
  %934 = call noundef double @_ZNKSt7complexIdE4realB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(16) %147)
  %935 = fadd double %934, 0xBFEFD712F9A816D8
  %936 = call noundef double @_ZSt3absd(double noundef %935)
  %937 = fcmp ogt double %936, 1.000000e-05
  br i1 %937, label %.critedge34, label %938

938:                                              ; preds = %929
  %939 = call { double, double } @_ZN6qtorch16ContractionTools11GetFinalValEv(ptr noundef nonnull align 8 dereferenceable(10128) %141) #6
  %940 = extractvalue { double, double } %939, 0
  store double %940, ptr %148, align 8
  %941 = getelementptr inbounds i8, ptr %148, i64 8
  %942 = extractvalue { double, double } %939, 1
  store double %942, ptr %941, align 8
  %943 = call noundef double @_ZNKSt7complexIdE4imagB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(16) %148)
  %944 = call noundef double @_ZSt3absd(double noundef %943)
  %945 = fcmp ogt double %944, 1.000000e-05
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %148) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %147) #6
  br i1 %945, label %946, label %962

.critedge34:                                      ; preds = %929
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %148) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %147) #6
  br label %946

946:                                              ; preds = %.critedge34, %938
  %947 = 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.161)
          to label %948 unwind label %960

948:                                              ; preds = %946
  %949 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %947, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %950 unwind label %960

950:                                              ; preds = %948
  %951 = add nuw nsw i32 %.16188, 1
  br label %962

952:                                              ; preds = %925
  %953 = landingpad { ptr, i32 }
          cleanup
  br label %959

954:                                              ; preds = %926
  %955 = landingpad { ptr, i32 }
          cleanup
  br label %958

956:                                              ; preds = %927
  %957 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %144) #6
  br label %958

958:                                              ; preds = %956, %954
  %.pn240 = phi { ptr, i32 } [ %957, %956 ], [ %955, %954 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %145) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %145) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %144) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %142) #6
  br label %959

959:                                              ; preds = %958, %952
  %.pn240.pn = phi { ptr, i32 } [ %.pn240, %958 ], [ %953, %952 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %143) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %143) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %142) #6
  br label %984

960:                                              ; preds = %966, %964, %962, %948, %946, %928
  %961 = landingpad { ptr, i32 }
          cleanup
  br label %983

962:                                              ; preds = %950, %938
  %.17189 = phi i32 [ %951, %950 ], [ %.16188, %938 ]
  %.17171 = phi i1 [ false, %950 ], [ %.16170, %938 ]
  %963 = 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.116)
          to label %964 unwind label %960

964:                                              ; preds = %962
  %965 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %963, i32 noundef %.17189)
          to label %966 unwind label %960

966:                                              ; preds = %964
  %967 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %965, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %968 unwind label %960

968:                                              ; preds = %966
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %149) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %150) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %150) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %149, ptr noundef nonnull @.str.106, ptr noundef nonnull align 1 dereferenceable(1) %150)
          to label %969 unwind label %973

969:                                              ; preds = %968
  invoke void @_Z10removeFileRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(32) %149)
          to label %970 unwind label %975

970:                                              ; preds = %969
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %149) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %150) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %150) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %149) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %151) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %152) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %152) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %151, ptr noundef nonnull @.str.118, ptr noundef nonnull align 1 dereferenceable(1) %152)
          to label %971 unwind label %978

971:                                              ; preds = %970
  invoke void @_Z10removeFileRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(32) %151)
          to label %972 unwind label %980

972:                                              ; preds = %971
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %151) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %152) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %152) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %151) #6
  call void @_ZN6qtorch16ContractionToolsD2Ev(ptr noundef nonnull align 8 dereferenceable(10128) %141) #6
  call void @llvm.lifetime.end.p0(i64 10128, ptr nonnull %141) #6
  call void @_ZN6qtorch16ContractionToolsD2Ev(ptr noundef nonnull align 8 dereferenceable(10128) %133) #6
  call void @llvm.lifetime.end.p0(i64 10128, ptr nonnull %133) #6
  call void @_ZN6qtorch16ContractionToolsD2Ev(ptr noundef nonnull align 8 dereferenceable(10128) %125) #6
  call void @llvm.lifetime.end.p0(i64 10128, ptr nonnull %125) #6
  call void @_ZN6qtorch16ContractionToolsD2Ev(ptr noundef nonnull align 8 dereferenceable(10128) %117) #6
  call void @llvm.lifetime.end.p0(i64 10128, ptr nonnull %117) #6
  call void @_ZN6qtorch16ContractionToolsD2Ev(ptr noundef nonnull align 8 dereferenceable(10128) %109) #6
  call void @llvm.lifetime.end.p0(i64 10128, ptr nonnull %109) #6
  call void @_ZN6qtorch16ContractionToolsD2Ev(ptr noundef nonnull align 8 dereferenceable(10128) %101) #6
  call void @llvm.lifetime.end.p0(i64 10128, ptr nonnull %101) #6
  call void @_ZN6qtorch16ContractionToolsD2Ev(ptr noundef nonnull align 8 dereferenceable(10128) %93) #6
  call void @llvm.lifetime.end.p0(i64 10128, ptr nonnull %93) #6
  call void @_ZN6qtorch16ContractionToolsD2Ev(ptr noundef nonnull align 8 dereferenceable(10128) %85) #6
  call void @llvm.lifetime.end.p0(i64 10128, ptr nonnull %85) #6
  call void @_ZN6qtorch16ContractionToolsD2Ev(ptr noundef nonnull align 8 dereferenceable(10128) %77) #6
  call void @llvm.lifetime.end.p0(i64 10128, ptr nonnull %77) #6
  call void @_ZN6qtorch16ContractionToolsD2Ev(ptr noundef nonnull align 8 dereferenceable(10128) %69) #6
  call void @llvm.lifetime.end.p0(i64 10128, ptr nonnull %69) #6
  call void @_ZN6qtorch16ContractionToolsD2Ev(ptr noundef nonnull align 8 dereferenceable(10128) %61) #6
  call void @llvm.lifetime.end.p0(i64 10128, ptr nonnull %61) #6
  call void @_ZN6qtorch16ContractionToolsD2Ev(ptr noundef nonnull align 8 dereferenceable(10128) %53) #6
  call void @llvm.lifetime.end.p0(i64 10128, ptr nonnull %53) #6
  call void @_ZN6qtorch16ContractionToolsD2Ev(ptr noundef nonnull align 8 dereferenceable(10128) %45) #6
  call void @llvm.lifetime.end.p0(i64 10128, ptr nonnull %45) #6
  call void @_ZN6qtorch16ContractionToolsD2Ev(ptr noundef nonnull align 8 dereferenceable(10128) %37) #6
  call void @llvm.lifetime.end.p0(i64 10128, ptr nonnull %37) #6
  call void @_ZN6qtorch16ContractionToolsD2Ev(ptr noundef nonnull align 8 dereferenceable(10128) %29) #6
  call void @llvm.lifetime.end.p0(i64 10128, ptr nonnull %29) #6
  call void @_ZN6qtorch16ContractionToolsD2Ev(ptr noundef nonnull align 8 dereferenceable(10128) %21) #6
  call void @llvm.lifetime.end.p0(i64 10128, ptr nonnull %21) #6
  call void @_ZN6qtorch16ContractionToolsD2Ev(ptr noundef nonnull align 8 dereferenceable(10128) %13) #6
  call void @llvm.lifetime.end.p0(i64 10128, ptr nonnull %13) #6
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248) %12) #6
  call void @llvm.lifetime.end.p0(i64 512, ptr nonnull %12) #6
  call void @_ZN6qtorch16ContractionToolsD2Ev(ptr noundef nonnull align 8 dereferenceable(10128) %4) #6
  call void @llvm.lifetime.end.p0(i64 10128, ptr nonnull %4) #6
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248) %3) #6
  call void @llvm.lifetime.end.p0(i64 512, ptr nonnull %3) #6
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248) %2) #6
  call void @llvm.lifetime.end.p0(i64 512, ptr nonnull %2) #6
  ret i1 %.17171

973:                                              ; preds = %968
  %974 = landingpad { ptr, i32 }
          cleanup
  br label %977

975:                                              ; preds = %969
  %976 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %149) #6
  br label %977

977:                                              ; preds = %975, %973
  %.pn243 = phi { ptr, i32 } [ %976, %975 ], [ %974, %973 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %150) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %150) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %149) #6
  br label %983

978:                                              ; preds = %970
  %979 = landingpad { ptr, i32 }
          cleanup
  br label %982

980:                                              ; preds = %971
  %981 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %151) #6
  br label %982

982:                                              ; preds = %980, %978
  %.pn245 = phi { ptr, i32 } [ %981, %980 ], [ %979, %978 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %152) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %152) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %151) #6
  br label %983

983:                                              ; preds = %982, %977, %960
  %.pn245.pn = phi { ptr, i32 } [ %.pn245, %982 ], [ %.pn243, %977 ], [ %961, %960 ]
  call void @_ZN6qtorch16ContractionToolsD2Ev(ptr noundef nonnull align 8 dereferenceable(10128) %141) #6
  br label %984

984:                                              ; preds = %983, %959
  %.pn245.pn.pn = phi { ptr, i32 } [ %.pn245.pn, %983 ], [ %.pn240.pn, %959 ]
  call void @llvm.lifetime.end.p0(i64 10128, ptr nonnull %141) #6
  br label %985

985:                                              ; preds = %984, %919
  %.pn245.pn.pn.pn = phi { ptr, i32 } [ %.pn245.pn.pn, %984 ], [ %920, %919 ]
  call void @_ZN6qtorch16ContractionToolsD2Ev(ptr noundef nonnull align 8 dereferenceable(10128) %133) #6
  br label %986

986:                                              ; preds = %985, %918
  %.pn245.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn245.pn.pn.pn, %985 ], [ %.pn237.pn, %918 ]
  call void @llvm.lifetime.end.p0(i64 10128, ptr nonnull %133) #6
  br label %987

987:                                              ; preds = %986, %878
  %.pn245.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn245.pn.pn.pn.pn, %986 ], [ %879, %878 ]
  call void @_ZN6qtorch16ContractionToolsD2Ev(ptr noundef nonnull align 8 dereferenceable(10128) %125) #6
  br label %988

988:                                              ; preds = %987, %877
  %.pn245.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn245.pn.pn.pn.pn.pn, %987 ], [ %.pn234.pn, %877 ]
  call void @llvm.lifetime.end.p0(i64 10128, ptr nonnull %125) #6
  br label %989

989:                                              ; preds = %988, %828
  %.pn245.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn245.pn.pn.pn.pn.pn.pn, %988 ], [ %829, %828 ]
  call void @_ZN6qtorch16ContractionToolsD2Ev(ptr noundef nonnull align 8 dereferenceable(10128) %117) #6
  br label %990

990:                                              ; preds = %989, %827
  %.pn245.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn245.pn.pn.pn.pn.pn.pn.pn, %989 ], [ %.pn231.pn, %827 ]
  call void @llvm.lifetime.end.p0(i64 10128, ptr nonnull %117) #6
  br label %991

991:                                              ; preds = %990, %787
  %.pn245.pn.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn245.pn.pn.pn.pn.pn.pn.pn.pn, %990 ], [ %788, %787 ]
  call void @_ZN6qtorch16ContractionToolsD2Ev(ptr noundef nonnull align 8 dereferenceable(10128) %109) #6
  br label %992

992:                                              ; preds = %991, %786
  %.pn245.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn245.pn.pn.pn.pn.pn.pn.pn.pn.pn, %991 ], [ %.pn228.pn, %786 ]
  call void @llvm.lifetime.end.p0(i64 10128, ptr nonnull %109) #6
  br label %993

993:                                              ; preds = %992, %746
  %.pn245.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn245.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn, %992 ], [ %747, %746 ]
  call void @_ZN6qtorch16ContractionToolsD2Ev(ptr noundef nonnull align 8 dereferenceable(10128) %101) #6
  br label %994

994:                                              ; preds = %993, %745
  %.pn245.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn245.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn, %993 ], [ %.pn225.pn, %745 ]
  call void @llvm.lifetime.end.p0(i64 10128, ptr nonnull %101) #6
  br label %995

995:                                              ; preds = %994, %696
  %.pn245.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn245.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn, %994 ], [ %697, %696 ]
  call void @_ZN6qtorch16ContractionToolsD2Ev(ptr noundef nonnull align 8 dereferenceable(10128) %93) #6
  br label %996

996:                                              ; preds = %995, %695
  %.pn245.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn245.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn, %995 ], [ %.pn222.pn, %695 ]
  call void @llvm.lifetime.end.p0(i64 10128, ptr nonnull %93) #6
  br label %997

997:                                              ; preds = %996, %656
  %.pn245.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn245.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn, %996 ], [ %657, %656 ]
  call void @_ZN6qtorch16ContractionToolsD2Ev(ptr noundef nonnull align 8 dereferenceable(10128) %85) #6
  br label %998

998:                                              ; preds = %997, %655
  %.pn245.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn245.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn, %997 ], [ %.pn219.pn, %655 ]
  call void @llvm.lifetime.end.p0(i64 10128, ptr nonnull %85) #6
  br label %999

999:                                              ; preds = %998, %615
  %.pn245.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn245.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn, %998 ], [ %616, %615 ]
  call void @_ZN6qtorch16ContractionToolsD2Ev(ptr noundef nonnull align 8 dereferenceable(10128) %77) #6
  br label %1000

1000:                                             ; preds = %999, %614
  %.pn245.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn245.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn, %999 ], [ %.pn216.pn, %614 ]
  call void @llvm.lifetime.end.p0(i64 10128, ptr nonnull %77) #6
  br label %1001

1001:                                             ; preds = %1000, %560
  %.pn245.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn245.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn, %1000 ], [ %561, %560 ]
  call void @_ZN6qtorch16ContractionToolsD2Ev(ptr noundef nonnull align 8 dereferenceable(10128) %69) #6
  br label %1002

1002:                                             ; preds = %1001, %559
  %.pn245.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn245.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn, %1001 ], [ %.pn213.pn, %559 ]
  call void @llvm.lifetime.end.p0(i64 10128, ptr nonnull %69) #6
  br label %1003

1003:                                             ; preds = %1002, %520
  %.pn245.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn245.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn, %1002 ], [ %521, %520 ]
  call void @_ZN6qtorch16ContractionToolsD2Ev(ptr noundef nonnull align 8 dereferenceable(10128) %61) #6
  br label %1004

1004:                                             ; preds = %1003, %519
  %.pn245.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn245.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn, %1003 ], [ %.pn210.pn, %519 ]
  call void @llvm.lifetime.end.p0(i64 10128, ptr nonnull %61) #6
  br label %1005

1005:                                             ; preds = %1004, %479
  %.pn245.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn245.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn, %1004 ], [ %480, %479 ]
  call void @_ZN6qtorch16ContractionToolsD2Ev(ptr noundef nonnull align 8 dereferenceable(10128) %53) #6
  br label %1006

1006:                                             ; preds = %1005, %478
  %.pn245.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn245.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn, %1005 ], [ %.pn207.pn, %478 ]
  call void @llvm.lifetime.end.p0(i64 10128, ptr nonnull %53) #6
  br label %1007

1007:                                             ; preds = %1006, %424
  %.pn245.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn245.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn, %1006 ], [ %425, %424 ]
  call void @_ZN6qtorch16ContractionToolsD2Ev(ptr noundef nonnull align 8 dereferenceable(10128) %45) #6
  br label %1008

1008:                                             ; preds = %1007, %423
  %.pn245.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn245.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn, %1007 ], [ %.pn204.pn, %423 ]
  call void @llvm.lifetime.end.p0(i64 10128, ptr nonnull %45) #6
  br label %1009

1009:                                             ; preds = %1008, %383
  %.pn245.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn245.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn, %1008 ], [ %384, %383 ]
  call void @_ZN6qtorch16ContractionToolsD2Ev(ptr noundef nonnull align 8 dereferenceable(10128) %37) #6
  br label %1010

1010:                                             ; preds = %1009, %382
  %.pn245.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn245.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn, %1009 ], [ %.pn201.pn, %382 ]
  call void @llvm.lifetime.end.p0(i64 10128, ptr nonnull %37) #6
  br label %1011

1011:                                             ; preds = %1010, %343
  %.pn245.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn245.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn, %1010 ], [ %344, %343 ]
  call void @_ZN6qtorch16ContractionToolsD2Ev(ptr noundef nonnull align 8 dereferenceable(10128) %29) #6
  br label %1012

1012:                                             ; preds = %1011, %342
  %.pn245.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn245.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn, %1011 ], [ %.pn198.pn, %342 ]
  call void @llvm.lifetime.end.p0(i64 10128, ptr nonnull %29) #6
  br label %1013

1013:                                             ; preds = %1012, %292
  %.pn245.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn245.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn, %1012 ], [ %293, %292 ]
  call void @_ZN6qtorch16ContractionToolsD2Ev(ptr noundef nonnull align 8 dereferenceable(10128) %21) #6
  br label %1014

1014:                                             ; preds = %1013, %291
  %.pn245.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn245.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn, %1013 ], [ %.pn195.pn, %291 ]
  call void @llvm.lifetime.end.p0(i64 10128, ptr nonnull %21) #6
  br label %1015

1015:                                             ; preds = %1014, %251
  %.pn245.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn245.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn, %1014 ], [ %252, %251 ]
  call void @_ZN6qtorch16ContractionToolsD2Ev(ptr noundef nonnull align 8 dereferenceable(10128) %13) #6
  br label %1016

1016:                                             ; preds = %1015, %250
  %.pn245.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn245.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn, %1015 ], [ %.pn192.pn, %250 ]
  call void @llvm.lifetime.end.p0(i64 10128, ptr nonnull %13) #6
  br label %1017

1017:                                             ; preds = %1016, %241
  %.pn245.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn245.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn, %1016 ], [ %242, %241 ]
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248) %12) #6
  br label %1018

1018:                                             ; preds = %1017, %239
  %.pn245.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn245.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn, %1017 ], [ %240, %239 ]
  call void @llvm.lifetime.end.p0(i64 512, ptr nonnull %12) #6
  br label %1019

1019:                                             ; preds = %1018, %207
  %.pn245.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn245.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn, %1018 ], [ %208, %207 ]
  call void @_ZN6qtorch16ContractionToolsD2Ev(ptr noundef nonnull align 8 dereferenceable(10128) %4) #6
  br label %1020

1020:                                             ; preds = %1019, %206
  %.pn245.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn245.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn, %1019 ], [ %.pn.pn, %206 ]
  call void @llvm.lifetime.end.p0(i64 10128, ptr nonnull %4) #6
  br label %1021

1021:                                             ; preds = %1020, %197
  %.pn245.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn245.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn, %1020 ], [ %198, %197 ]
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248) %3) #6
  br label %1022

1022:                                             ; preds = %1021, %195
  %.pn245.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn245.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn, %1021 ], [ %196, %195 ]
  call void @llvm.lifetime.end.p0(i64 512, ptr nonnull %3) #6
  br label %1023

1023:                                             ; preds = %1022, %193
  %.pn245.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn245.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn, %1022 ], [ %194, %193 ]
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248) %2) #6
  call void @llvm.lifetime.end.p0(i64 512, ptr nonnull %2) #6
  resume { ptr, i32 } %.pn245.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn
}

; 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

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 = { 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)"}


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