; LLVM IR from aspuru-guzik-group/qtorch :: src/tests.ll (Z7catTestRSt14basic_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::__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::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::complex" = type { { double, double } }
%"class.std::vector.186" = type { %"struct.std::_Vector_base.187" }
%"struct.std::_Vector_base.187" = type { %"struct.std::_Vector_base<std::shared_ptr<std::vector<std::shared_ptr<qtorch::Node>>>, std::allocator<std::shared_ptr<std::vector<std::shared_ptr<qtorch::Node>>>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::shared_ptr<std::vector<std::shared_ptr<qtorch::Node>>>, std::allocator<std::shared_ptr<std::vector<std::shared_ptr<qtorch::Node>>>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::shared_ptr<std::vector<std::shared_ptr<qtorch::Node>>>, std::allocator<std::shared_ptr<std::vector<std::shared_ptr<qtorch::Node>>>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::shared_ptr<std::vector<std::shared_ptr<qtorch::Node>>>, std::allocator<std::shared_ptr<std::vector<std::shared_ptr<qtorch::Node>>>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::random_device" = type { %union.anon.191 }
%union.anon.191 = type { %"class.std::mersenne_twister_engine" }
%"class.std::mersenne_twister_engine" = type { [624 x i64], i64 }
%"class.std::allocator" = type { i8 }
%"class.std::__cxx11::basic_stringstream" = type { %"class.std::basic_iostream.base", %"class.std::__cxx11::basic_stringbuf", %"class.std::basic_ios" }
%"class.std::basic_iostream.base" = type { %"class.std::basic_istream.base", %"class.std::basic_ostream.base" }
%"class.std::basic_istream.base" = type { ptr, i64 }
%"class.std::__cxx11::basic_stringbuf" = type { %"class.std::basic_streambuf", i32, %"class.std::__cxx11::basic_string" }

@.str.106 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.119 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.124 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.217 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.218 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.219 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.220 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.221 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.222 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.223 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.224 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.225 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.226 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.227 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.228 = external hidden unnamed_addr constant [9 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 dso_local void @_ZNSt7complexIdEC2Edd(ptr noundef nonnull align 8 dereferenceable(16), double noundef, double noundef) unnamed_addr #3 align 2

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare void @_ZNKSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEE3strEv(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(128)) #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 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) #4

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local { double, double } @_ZStmiIdESt7complexIT_ERKS2_S4_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) #1

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_Z7catTestRSt14basic_ofstreamIcSt11char_traitsIcEE(ptr noundef nonnull align 8 dereferenceable(248) %0) #2 personality ptr @__gxx_personality_v0 {
  %2 = alloca i1, align 1
  %3 = alloca ptr, align 8
  %4 = alloca %"class.std::basic_ofstream", align 8
  %5 = alloca %"class.qtorch::ContractionTools", align 8
  %6 = alloca %"class.std::__cxx11::basic_string", align 8
  %7 = alloca %"class.std::allocator", align 1
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca %"class.std::__cxx11::basic_string", align 8
  %11 = alloca %"class.std::allocator", align 1
  %12 = alloca i8, align 1
  %13 = alloca %"class.std::__cxx11::basic_stringstream", align 8
  %14 = alloca i32, align 4
  %15 = alloca %"class.std::shared_ptr.178", align 8
  %16 = alloca %"class.std::__cxx11::basic_string", align 8
  %17 = alloca %"class.std::complex", align 8
  %18 = alloca %"class.std::complex", align 8
  %19 = alloca %"class.std::complex", align 8
  %20 = alloca %"class.std::complex", align 8
  %21 = alloca %"class.std::__cxx11::basic_string", align 8
  %22 = alloca %"class.std::allocator", align 1
  %23 = alloca i32, align 4
  %24 = alloca %"class.std::__cxx11::basic_stringstream", align 8
  %25 = alloca i32, align 4
  %26 = alloca %"class.std::shared_ptr.178", align 8
  %27 = alloca %"class.std::__cxx11::basic_string", align 8
  %28 = alloca %"class.std::complex", align 8
  %29 = alloca %"class.std::complex", align 8
  %30 = alloca %"class.std::complex", align 8
  %31 = alloca %"class.std::complex", align 8
  %32 = alloca %"class.std::__cxx11::basic_string", align 8
  %33 = alloca %"class.std::allocator", align 1
  %34 = alloca %"class.std::__cxx11::basic_string", align 8
  %35 = alloca %"class.std::allocator", align 1
  %36 = alloca %"class.std::__cxx11::basic_string", align 8
  %37 = alloca %"class.std::allocator", align 1
  %38 = alloca i32, align 4
  %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.std::complex", align 8
  %43 = alloca %"class.std::complex", align 8
  %44 = alloca %"class.std::__cxx11::basic_string", align 8
  %45 = alloca %"class.std::allocator", align 1
  %46 = alloca i32, align 4
  %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.std::complex", align 8
  %51 = alloca %"class.std::complex", align 8
  %52 = alloca %"class.std::__cxx11::basic_string", align 8
  %53 = alloca %"class.std::allocator", align 1
  %54 = alloca %"class.std::__cxx11::basic_string", align 8
  %55 = alloca %"class.std::allocator", align 1
  store ptr %0, ptr %3, align 8, !tbaa !5
  %56 = load ptr, ptr %3, align 8, !tbaa !5
  %57 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %56, ptr noundef @.str.217)
  %58 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %57, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %59 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %58, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.start.p0(i64 512, ptr %4) #5
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(248) %4)
  call void @llvm.lifetime.start.p0(i64 10128, ptr %5) #5
  call void @llvm.lifetime.start.p0(i64 32, ptr %6) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr %7) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef @.str.218, ptr noundef nonnull align 1 dereferenceable(1) %7)
          to label %60 unwind label %76

60:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 32, ptr %10) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr %11) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %10, ptr noundef @.str.106, ptr noundef nonnull align 1 dereferenceable(1) %11)
          to label %61 unwind label %80

61:                                               ; preds = %60
  invoke void @_ZN6qtorch16ContractionToolsC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_i(ptr noundef nonnull align 8 dereferenceable(10128) %5, ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef nonnull align 8 dereferenceable(32) %10, i32 noundef 8)
          to label %62 unwind label %84

62:                                               ; preds = %61
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %10) #5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %6) #5
  %63 = load ptr, ptr %3, align 8, !tbaa !5
  %64 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %63, ptr noundef @.str.219)
          to label %65 unwind label %90

65:                                               ; preds = %62
  %66 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %64, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %67 unwind label %90

67:                                               ; preds = %65
  %68 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %66, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %69 unwind label %90

69:                                               ; preds = %67
  call void @_ZN6qtorch16ContractionTools5ResetEv(ptr noundef nonnull align 8 dereferenceable(10128) %5)
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE4openEPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248) %4, ptr noundef @.str.106, i32 noundef 16)
          to label %70 unwind label %90

70:                                               ; preds = %69
  call void @llvm.lifetime.start.p0(i64 1, ptr %12) #5
  store i8 0, ptr %12, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 392, ptr %13) #5
  invoke void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(128) %13)
          to label %71 unwind label %94

71:                                               ; preds = %70
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  store i32 0, ptr %14, align 4, !tbaa !11
  br label %72

72:                                               ; preds = %121, %71
  %73 = load i32, ptr %14, align 4, !tbaa !11
  %74 = icmp slt i32 %73, 8
  br i1 %74, label %98, label %75

75:                                               ; preds = %72
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  br label %128

76:                                               ; preds = %1
  %77 = landingpad { ptr, i32 }
          cleanup
  %78 = extractvalue { ptr, i32 } %77, 0
  store ptr %78, ptr %8, align 8
  %79 = extractvalue { ptr, i32 } %77, 1
  store i32 %79, ptr %9, align 4
  br label %89

80:                                               ; preds = %60
  %81 = landingpad { ptr, i32 }
          cleanup
  %82 = extractvalue { ptr, i32 } %81, 0
  store ptr %82, ptr %8, align 8
  %83 = extractvalue { ptr, i32 } %81, 1
  store i32 %83, ptr %9, align 4
  br label %88

84:                                               ; preds = %61
  %85 = landingpad { ptr, i32 }
          cleanup
  %86 = extractvalue { ptr, i32 } %85, 0
  store ptr %86, ptr %8, align 8
  %87 = extractvalue { ptr, i32 } %85, 1
  store i32 %87, ptr %9, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #5
  br label %88

88:                                               ; preds = %84, %80
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %10) #5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #5
  br label %89

89:                                               ; preds = %88, %76
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %6) #5
  br label %550

90:                                               ; preds = %69, %67, %65, %62
  %91 = landingpad { ptr, i32 }
          cleanup
  %92 = extractvalue { ptr, i32 } %91, 0
  store ptr %92, ptr %8, align 8
  %93 = extractvalue { ptr, i32 } %91, 1
  store i32 %93, ptr %9, align 4
  br label %549

94:                                               ; preds = %70
  %95 = landingpad { ptr, i32 }
          cleanup
  %96 = extractvalue { ptr, i32 } %95, 0
  store ptr %96, ptr %8, align 8
  %97 = extractvalue { ptr, i32 } %95, 1
  store i32 %97, ptr %9, align 4
  br label %548

98:                                               ; preds = %72
  %99 = load i8, ptr %12, align 1, !tbaa !9, !range !13, !noundef !14
  %100 = trunc i8 %99 to i1
  br i1 %100, label %101, label %104

101:                                              ; preds = %98
  %102 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef @.str.220)
          to label %103 unwind label %124

103:                                              ; preds = %101
  br label %107

104:                                              ; preds = %98
  %105 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef @.str.221)
          to label %106 unwind label %124

106:                                              ; preds = %104
  br label %107

107:                                              ; preds = %106, %103
  %108 = phi ptr [ %102, %103 ], [ %105, %106 ]
  %109 = load i8, ptr %12, align 1, !tbaa !9, !range !13, !noundef !14
  %110 = trunc i8 %109 to i1
  br i1 %110, label %111, label %115

111:                                              ; preds = %107
  %112 = getelementptr inbounds i8, ptr %13, i64 16
  %113 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %112, ptr noundef @.str.119)
          to label %114 unwind label %124

114:                                              ; preds = %111
  br label %119

115:                                              ; preds = %107
  %116 = getelementptr inbounds i8, ptr %13, i64 16
  %117 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %116, ptr noundef @.str.124)
          to label %118 unwind label %124

118:                                              ; preds = %115
  br label %119

119:                                              ; preds = %118, %114
  %120 = phi ptr [ %113, %114 ], [ %117, %118 ]
  br label %121

121:                                              ; preds = %119
  %122 = load i32, ptr %14, align 4, !tbaa !11
  %123 = add nsw i32 %122, 1
  store i32 %123, ptr %14, align 4, !tbaa !11
  br label %72, !llvm.loop !15

124:                                              ; preds = %115, %111, %104, %101
  %125 = landingpad { ptr, i32 }
          cleanup
  %126 = extractvalue { ptr, i32 } %125, 0
  store ptr %126, ptr %8, align 8
  %127 = extractvalue { ptr, i32 } %125, 1
  store i32 %127, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  br label %547

128:                                              ; preds = %75
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE5closeEv(ptr noundef nonnull align 8 dereferenceable(248) %4)
          to label %129 unwind label %174

129:                                              ; preds = %128
  invoke void @_ZN6qtorch16ContractionTools8ContractENS_15ContractionTypeEii(ptr dead_on_unwind writable sret(%"class.std::shared_ptr.178") align 8 %15, ptr noundef nonnull align 8 dereferenceable(10128) %5, i32 noundef 0, i32 noundef 1, i32 noundef 1)
          to label %130 unwind label %174

130:                                              ; preds = %129
  call void @_ZNSt12__shared_ptrIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %15) #5
  %131 = load ptr, ptr %3, align 8, !tbaa !5
  %132 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %131, ptr noundef @.str.222)
          to label %133 unwind label %174

133:                                              ; preds = %130
  %134 = load ptr, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %16) #5
  invoke void @_ZNKSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEE3strEv(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %16, ptr noundef nonnull align 8 dereferenceable(128) %13)
          to label %135 unwind label %178

135:                                              ; preds = %133
  %136 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(8) %134, ptr noundef nonnull align 8 dereferenceable(32) %16)
          to label %137 unwind label %182

137:                                              ; preds = %135
  %138 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %136, ptr noundef @.str.223)
          to label %139 unwind label %182

139:                                              ; preds = %137
  call void @llvm.lifetime.start.p0(i64 16, ptr %17) #5
  %140 = call { double, double } @_ZN6qtorch16ContractionTools11GetFinalValEv(ptr noundef nonnull align 8 dereferenceable(10128) %5) #5
  %141 = getelementptr inbounds %"class.std::complex", ptr %17, i32 0, i32 0
  %142 = getelementptr inbounds { double, double }, ptr %141, i32 0, i32 0
  %143 = extractvalue { double, double } %140, 0
  store double %143, ptr %142, align 8
  %144 = getelementptr inbounds { double, double }, ptr %141, i32 0, i32 1
  %145 = extractvalue { double, double } %140, 1
  store double %145, ptr %144, align 8
  %146 = invoke noundef double @_ZNKSt7complexIdE4realB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(16) %17)
          to label %147 unwind label %186

147:                                              ; preds = %139
  %148 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %138, double noundef %146)
          to label %149 unwind label %186

149:                                              ; preds = %147
  %150 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %148, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %151 unwind label %186

151:                                              ; preds = %149
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %16) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %18) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %19) #5
  %152 = call { double, double } @_ZN6qtorch16ContractionTools11GetFinalValEv(ptr noundef nonnull align 8 dereferenceable(10128) %5) #5
  %153 = getelementptr inbounds %"class.std::complex", ptr %19, i32 0, i32 0
  %154 = getelementptr inbounds { double, double }, ptr %153, i32 0, i32 0
  %155 = extractvalue { double, double } %152, 0
  store double %155, ptr %154, align 8
  %156 = getelementptr inbounds { double, double }, ptr %153, i32 0, i32 1
  %157 = extractvalue { double, double } %152, 1
  store double %157, ptr %156, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %20) #5
  invoke void @_ZNSt7complexIdEC2Edd(ptr noundef nonnull align 8 dereferenceable(16) %20, double noundef 5.000000e-01, double noundef 0.000000e+00)
          to label %158 unwind label %192

158:                                              ; preds = %151
  %159 = invoke { double, double } @_ZStmiIdESt7complexIT_ERKS2_S4_(ptr noundef nonnull align 8 dereferenceable(16) %19, ptr noundef nonnull align 8 dereferenceable(16) %20)
          to label %160 unwind label %192

160:                                              ; preds = %158
  %161 = getelementptr inbounds %"class.std::complex", ptr %18, i32 0, i32 0
  %162 = getelementptr inbounds { double, double }, ptr %161, i32 0, i32 0
  %163 = extractvalue { double, double } %159, 0
  store double %163, ptr %162, align 8
  %164 = getelementptr inbounds { double, double }, ptr %161, i32 0, i32 1
  %165 = extractvalue { double, double } %159, 1
  store double %165, ptr %164, align 8
  %166 = invoke noundef double @_ZNKSt7complexIdE4realB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(16) %18)
          to label %167 unwind label %192

167:                                              ; preds = %160
  %168 = invoke noundef double @_ZSt3absd(double noundef %166)
          to label %169 unwind label %192

169:                                              ; preds = %167
  %170 = fcmp ogt double %168, 1.000000e-05
  call void @llvm.lifetime.end.p0(i64 16, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #5
  br i1 %170, label %171, label %205

171:                                              ; preds = %169
  call void @llvm.lifetime.start.p0(i64 32, ptr %21) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr %22) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %22) #5
  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 %172 unwind label %196

172:                                              ; preds = %171
  invoke void @_Z10removeFileRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(32) %21)
          to label %173 unwind label %200

173:                                              ; preds = %172
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %21) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %22) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %21) #5
  store i1 false, ptr %2, align 1
  store i32 1, ptr %23, align 4
  br label %545

174:                                              ; preds = %478, %475, %472, %468, %467, %443, %388, %385, %382, %378, %377, %339, %334, %332, %329, %326, %255, %254, %253, %205, %130, %129, %128
  %175 = landingpad { ptr, i32 }
          cleanup
  %176 = extractvalue { ptr, i32 } %175, 0
  store ptr %176, ptr %8, align 8
  %177 = extractvalue { ptr, i32 } %175, 1
  store i32 %177, ptr %9, align 4
  br label %547

178:                                              ; preds = %133
  %179 = landingpad { ptr, i32 }
          cleanup
  %180 = extractvalue { ptr, i32 } %179, 0
  store ptr %180, ptr %8, align 8
  %181 = extractvalue { ptr, i32 } %179, 1
  store i32 %181, ptr %9, align 4
  br label %191

182:                                              ; preds = %137, %135
  %183 = landingpad { ptr, i32 }
          cleanup
  %184 = extractvalue { ptr, i32 } %183, 0
  store ptr %184, ptr %8, align 8
  %185 = extractvalue { ptr, i32 } %183, 1
  store i32 %185, ptr %9, align 4
  br label %190

186:                                              ; preds = %149, %147, %139
  %187 = landingpad { ptr, i32 }
          cleanup
  %188 = extractvalue { ptr, i32 } %187, 0
  store ptr %188, ptr %8, align 8
  %189 = extractvalue { ptr, i32 } %187, 1
  store i32 %189, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #5
  br label %190

190:                                              ; preds = %186, %182
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #5
  br label %191

191:                                              ; preds = %190, %178
  call void @llvm.lifetime.end.p0(i64 32, ptr %16) #5
  br label %547

192:                                              ; preds = %167, %160, %158, %151
  %193 = landingpad { ptr, i32 }
          cleanup
  %194 = extractvalue { ptr, i32 } %193, 0
  store ptr %194, ptr %8, align 8
  %195 = extractvalue { ptr, i32 } %193, 1
  store i32 %195, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #5
  br label %547

196:                                              ; preds = %171
  %197 = landingpad { ptr, i32 }
          cleanup
  %198 = extractvalue { ptr, i32 } %197, 0
  store ptr %198, ptr %8, align 8
  %199 = extractvalue { ptr, i32 } %197, 1
  store i32 %199, ptr %9, align 4
  br label %204

200:                                              ; preds = %172
  %201 = landingpad { ptr, i32 }
          cleanup
  %202 = extractvalue { ptr, i32 } %201, 0
  store ptr %202, ptr %8, align 8
  %203 = extractvalue { ptr, i32 } %201, 1
  store i32 %203, ptr %9, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %21) #5
  br label %204

204:                                              ; preds = %200, %196
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %22) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %21) #5
  br label %547

205:                                              ; preds = %169
  call void @_ZN6qtorch16ContractionTools5ResetEv(ptr noundef nonnull align 8 dereferenceable(10128) %5)
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE4openEPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248) %4, ptr noundef @.str.106, i32 noundef 16)
          to label %206 unwind label %174

206:                                              ; preds = %205
  store i8 1, ptr %12, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 392, ptr %24) #5
  invoke void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(128) %24)
          to label %207 unwind label %214

207:                                              ; preds = %206
  %208 = invoke noundef nonnull align 8 dereferenceable(128) ptr @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(128) %13, ptr noundef nonnull align 8 dereferenceable(128) %24)
          to label %209 unwind label %218

209:                                              ; preds = %207
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %24) #5
  call void @llvm.lifetime.end.p0(i64 392, ptr %24) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #5
  store i32 0, ptr %25, align 4, !tbaa !11
  br label %210

210:                                              ; preds = %246, %209
  %211 = load i32, ptr %25, align 4, !tbaa !11
  %212 = icmp slt i32 %211, 8
  br i1 %212, label %223, label %213

213:                                              ; preds = %210
  store i32 5, ptr %23, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #5
  br label %253

214:                                              ; preds = %206
  %215 = landingpad { ptr, i32 }
          cleanup
  %216 = extractvalue { ptr, i32 } %215, 0
  store ptr %216, ptr %8, align 8
  %217 = extractvalue { ptr, i32 } %215, 1
  store i32 %217, ptr %9, align 4
  br label %222

218:                                              ; preds = %207
  %219 = landingpad { ptr, i32 }
          cleanup
  %220 = extractvalue { ptr, i32 } %219, 0
  store ptr %220, ptr %8, align 8
  %221 = extractvalue { ptr, i32 } %219, 1
  store i32 %221, ptr %9, align 4
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %24) #5
  br label %222

222:                                              ; preds = %218, %214
  call void @llvm.lifetime.end.p0(i64 392, ptr %24) #5
  br label %547

223:                                              ; preds = %210
  %224 = load i8, ptr %12, align 1, !tbaa !9, !range !13, !noundef !14
  %225 = trunc i8 %224 to i1
  br i1 %225, label %226, label %229

226:                                              ; preds = %223
  %227 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef @.str.220)
          to label %228 unwind label %249

228:                                              ; preds = %226
  br label %232

229:                                              ; preds = %223
  %230 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef @.str.221)
          to label %231 unwind label %249

231:                                              ; preds = %229
  br label %232

232:                                              ; preds = %231, %228
  %233 = phi ptr [ %227, %228 ], [ %230, %231 ]
  %234 = load i8, ptr %12, align 1, !tbaa !9, !range !13, !noundef !14
  %235 = trunc i8 %234 to i1
  br i1 %235, label %236, label %240

236:                                              ; preds = %232
  %237 = getelementptr inbounds i8, ptr %13, i64 16
  %238 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %237, ptr noundef @.str.119)
          to label %239 unwind label %249

239:                                              ; preds = %236
  br label %244

240:                                              ; preds = %232
  %241 = getelementptr inbounds i8, ptr %13, i64 16
  %242 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %241, ptr noundef @.str.124)
          to label %243 unwind label %249

243:                                              ; preds = %240
  br label %244

244:                                              ; preds = %243, %239
  %245 = phi ptr [ %238, %239 ], [ %242, %243 ]
  br label %246

246:                                              ; preds = %244
  %247 = load i32, ptr %25, align 4, !tbaa !11
  %248 = add nsw i32 %247, 1
  store i32 %248, ptr %25, align 4, !tbaa !11
  br label %210, !llvm.loop !17

249:                                              ; preds = %240, %236, %229, %226
  %250 = landingpad { ptr, i32 }
          cleanup
  %251 = extractvalue { ptr, i32 } %250, 0
  store ptr %251, ptr %8, align 8
  %252 = extractvalue { ptr, i32 } %250, 1
  store i32 %252, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #5
  br label %547

253:                                              ; preds = %213
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE5closeEv(ptr noundef nonnull align 8 dereferenceable(248) %4)
          to label %254 unwind label %174

254:                                              ; preds = %253
  invoke void @_ZN6qtorch16ContractionTools8ContractENS_15ContractionTypeEii(ptr dead_on_unwind writable sret(%"class.std::shared_ptr.178") align 8 %26, ptr noundef nonnull align 8 dereferenceable(10128) %5, i32 noundef 0, i32 noundef 1, i32 noundef 1)
          to label %255 unwind label %174

255:                                              ; preds = %254
  call void @_ZNSt12__shared_ptrIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %26) #5
  %256 = load ptr, ptr %3, align 8, !tbaa !5
  %257 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %256, ptr noundef @.str.222)
          to label %258 unwind label %174

258:                                              ; preds = %255
  %259 = load ptr, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %27) #5
  invoke void @_ZNKSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEE3strEv(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %27, ptr noundef nonnull align 8 dereferenceable(128) %13)
          to label %260 unwind label %299

260:                                              ; preds = %258
  %261 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(8) %259, ptr noundef nonnull align 8 dereferenceable(32) %27)
          to label %262 unwind label %303

262:                                              ; preds = %260
  %263 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %261, ptr noundef @.str.223)
          to label %264 unwind label %303

264:                                              ; preds = %262
  call void @llvm.lifetime.start.p0(i64 16, ptr %28) #5
  %265 = call { double, double } @_ZN6qtorch16ContractionTools11GetFinalValEv(ptr noundef nonnull align 8 dereferenceable(10128) %5) #5
  %266 = getelementptr inbounds %"class.std::complex", ptr %28, i32 0, i32 0
  %267 = getelementptr inbounds { double, double }, ptr %266, i32 0, i32 0
  %268 = extractvalue { double, double } %265, 0
  store double %268, ptr %267, align 8
  %269 = getelementptr inbounds { double, double }, ptr %266, i32 0, i32 1
  %270 = extractvalue { double, double } %265, 1
  store double %270, ptr %269, align 8
  %271 = invoke noundef double @_ZNKSt7complexIdE4realB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(16) %28)
          to label %272 unwind label %307

272:                                              ; preds = %264
  %273 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %263, double noundef %271)
          to label %274 unwind label %307

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

276:                                              ; preds = %274
  call void @llvm.lifetime.end.p0(i64 16, ptr %28) #5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %27) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %27) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %29) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %30) #5
  %277 = call { double, double } @_ZN6qtorch16ContractionTools11GetFinalValEv(ptr noundef nonnull align 8 dereferenceable(10128) %5) #5
  %278 = getelementptr inbounds %"class.std::complex", ptr %30, i32 0, i32 0
  %279 = getelementptr inbounds { double, double }, ptr %278, i32 0, i32 0
  %280 = extractvalue { double, double } %277, 0
  store double %280, ptr %279, align 8
  %281 = getelementptr inbounds { double, double }, ptr %278, i32 0, i32 1
  %282 = extractvalue { double, double } %277, 1
  store double %282, ptr %281, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %31) #5
  invoke void @_ZNSt7complexIdEC2Edd(ptr noundef nonnull align 8 dereferenceable(16) %31, double noundef 5.000000e-01, double noundef 0.000000e+00)
          to label %283 unwind label %313

283:                                              ; preds = %276
  %284 = invoke { double, double } @_ZStmiIdESt7complexIT_ERKS2_S4_(ptr noundef nonnull align 8 dereferenceable(16) %30, ptr noundef nonnull align 8 dereferenceable(16) %31)
          to label %285 unwind label %313

285:                                              ; preds = %283
  %286 = getelementptr inbounds %"class.std::complex", ptr %29, i32 0, i32 0
  %287 = getelementptr inbounds { double, double }, ptr %286, i32 0, i32 0
  %288 = extractvalue { double, double } %284, 0
  store double %288, ptr %287, align 8
  %289 = getelementptr inbounds { double, double }, ptr %286, i32 0, i32 1
  %290 = extractvalue { double, double } %284, 1
  store double %290, ptr %289, align 8
  %291 = invoke noundef double @_ZNKSt7complexIdE4realB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(16) %29)
          to label %292 unwind label %313

292:                                              ; preds = %285
  %293 = invoke noundef double @_ZSt3absd(double noundef %291)
          to label %294 unwind label %313

294:                                              ; preds = %292
  %295 = fcmp ogt double %293, 1.000000e-05
  call void @llvm.lifetime.end.p0(i64 16, ptr %31) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %30) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %29) #5
  br i1 %295, label %296, label %326

296:                                              ; preds = %294
  call void @llvm.lifetime.start.p0(i64 32, ptr %32) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr %33) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %33) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %32, ptr noundef @.str.106, ptr noundef nonnull align 1 dereferenceable(1) %33)
          to label %297 unwind label %317

297:                                              ; preds = %296
  invoke void @_Z10removeFileRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(32) %32)
          to label %298 unwind label %321

298:                                              ; preds = %297
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %32) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %33) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %33) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %32) #5
  store i1 false, ptr %2, align 1
  store i32 1, ptr %23, align 4
  br label %545

299:                                              ; preds = %258
  %300 = landingpad { ptr, i32 }
          cleanup
  %301 = extractvalue { ptr, i32 } %300, 0
  store ptr %301, ptr %8, align 8
  %302 = extractvalue { ptr, i32 } %300, 1
  store i32 %302, ptr %9, align 4
  br label %312

303:                                              ; preds = %262, %260
  %304 = landingpad { ptr, i32 }
          cleanup
  %305 = extractvalue { ptr, i32 } %304, 0
  store ptr %305, ptr %8, align 8
  %306 = extractvalue { ptr, i32 } %304, 1
  store i32 %306, ptr %9, align 4
  br label %311

307:                                              ; preds = %274, %272, %264
  %308 = landingpad { ptr, i32 }
          cleanup
  %309 = extractvalue { ptr, i32 } %308, 0
  store ptr %309, ptr %8, align 8
  %310 = extractvalue { ptr, i32 } %308, 1
  store i32 %310, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %28) #5
  br label %311

311:                                              ; preds = %307, %303
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %27) #5
  br label %312

312:                                              ; preds = %311, %299
  call void @llvm.lifetime.end.p0(i64 32, ptr %27) #5
  br label %547

313:                                              ; preds = %292, %285, %283, %276
  %314 = landingpad { ptr, i32 }
          cleanup
  %315 = extractvalue { ptr, i32 } %314, 0
  store ptr %315, ptr %8, align 8
  %316 = extractvalue { ptr, i32 } %314, 1
  store i32 %316, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %31) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %30) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %29) #5
  br label %547

317:                                              ; preds = %296
  %318 = landingpad { ptr, i32 }
          cleanup
  %319 = extractvalue { ptr, i32 } %318, 0
  store ptr %319, ptr %8, align 8
  %320 = extractvalue { ptr, i32 } %318, 1
  store i32 %320, ptr %9, align 4
  br label %325

321:                                              ; preds = %297
  %322 = landingpad { ptr, i32 }
          cleanup
  %323 = extractvalue { ptr, i32 } %322, 0
  store ptr %323, ptr %8, align 8
  %324 = extractvalue { ptr, i32 } %322, 1
  store i32 %324, ptr %9, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %32) #5
  br label %325

325:                                              ; preds = %321, %317
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %33) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %33) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %32) #5
  br label %547

326:                                              ; preds = %294
  %327 = load ptr, ptr %3, align 8, !tbaa !5
  %328 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %327, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %329 unwind label %174

329:                                              ; preds = %326
  %330 = load ptr, ptr %3, align 8, !tbaa !5
  %331 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %330, ptr noundef @.str.224)
          to label %332 unwind label %174

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

334:                                              ; preds = %332
  %335 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %333, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %336 unwind label %174

336:                                              ; preds = %334
  call void @llvm.lifetime.start.p0(i64 32, ptr %34) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr %35) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %35) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %34, ptr noundef @.str.225, ptr noundef nonnull align 1 dereferenceable(1) %35)
          to label %337 unwind label %345

337:                                              ; preds = %336
  call void @llvm.lifetime.start.p0(i64 32, ptr %36) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr %37) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %37) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %36, ptr noundef @.str.106, ptr noundef nonnull align 1 dereferenceable(1) %37)
          to label %338 unwind label %349

338:                                              ; preds = %337
  invoke void @_ZN6qtorch16ContractionTools5ResetERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_i(ptr noundef nonnull align 8 dereferenceable(10128) %5, ptr noundef nonnull align 8 dereferenceable(32) %34, ptr noundef nonnull align 8 dereferenceable(32) %36, i32 noundef 8)
          to label %339 unwind label %353

339:                                              ; preds = %338
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %36) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %37) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %37) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %36) #5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %34) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %35) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %35) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %34) #5
  store i8 0, ptr %12, align 1, !tbaa !9
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE4openEPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248) %4, ptr noundef @.str.106, i32 noundef 16)
          to label %340 unwind label %174

340:                                              ; preds = %339
  call void @llvm.lifetime.start.p0(i64 4, ptr %38) #5
  store i32 0, ptr %38, align 4, !tbaa !11
  br label %341

341:                                              ; preds = %370, %340
  %342 = load i32, ptr %38, align 4, !tbaa !11
  %343 = icmp slt i32 %342, 100
  br i1 %343, label %359, label %344

344:                                              ; preds = %341
  store i32 8, ptr %23, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %38) #5
  br label %377

345:                                              ; preds = %336
  %346 = landingpad { ptr, i32 }
          cleanup
  %347 = extractvalue { ptr, i32 } %346, 0
  store ptr %347, ptr %8, align 8
  %348 = extractvalue { ptr, i32 } %346, 1
  store i32 %348, ptr %9, align 4
  br label %358

349:                                              ; preds = %337
  %350 = landingpad { ptr, i32 }
          cleanup
  %351 = extractvalue { ptr, i32 } %350, 0
  store ptr %351, ptr %8, align 8
  %352 = extractvalue { ptr, i32 } %350, 1
  store i32 %352, ptr %9, align 4
  br label %357

353:                                              ; preds = %338
  %354 = landingpad { ptr, i32 }
          cleanup
  %355 = extractvalue { ptr, i32 } %354, 0
  store ptr %355, ptr %8, align 8
  %356 = extractvalue { ptr, i32 } %354, 1
  store i32 %356, ptr %9, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %36) #5
  br label %357

357:                                              ; preds = %353, %349
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %37) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %37) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %36) #5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %34) #5
  br label %358

358:                                              ; preds = %357, %345
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %35) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %35) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %34) #5
  br label %547

359:                                              ; preds = %341
  %360 = load i8, ptr %12, align 1, !tbaa !9, !range !13, !noundef !14
  %361 = trunc i8 %360 to i1
  br i1 %361, label %362, label %365

362:                                              ; preds = %359
  %363 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef @.str.220)
          to label %364 unwind label %373

364:                                              ; preds = %362
  br label %368

365:                                              ; preds = %359
  %366 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef @.str.221)
          to label %367 unwind label %373

367:                                              ; preds = %365
  br label %368

368:                                              ; preds = %367, %364
  %369 = phi ptr [ %363, %364 ], [ %366, %367 ]
  br label %370

370:                                              ; preds = %368
  %371 = load i32, ptr %38, align 4, !tbaa !11
  %372 = add nsw i32 %371, 1
  store i32 %372, ptr %38, align 4, !tbaa !11
  br label %341, !llvm.loop !18

373:                                              ; preds = %365, %362
  %374 = landingpad { ptr, i32 }
          cleanup
  %375 = extractvalue { ptr, i32 } %374, 0
  store ptr %375, ptr %8, align 8
  %376 = extractvalue { ptr, i32 } %374, 1
  store i32 %376, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %38) #5
  br label %547

377:                                              ; preds = %344
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE5closeEv(ptr noundef nonnull align 8 dereferenceable(248) %4)
          to label %378 unwind label %174

378:                                              ; preds = %377
  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) %5, i32 noundef 0, i32 noundef 1, i32 noundef 1)
          to label %379 unwind label %174

379:                                              ; preds = %378
  call void @_ZNSt12__shared_ptrIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %39) #5
  %380 = load i8, ptr %12, align 1, !tbaa !9, !range !13, !noundef !14
  %381 = trunc i8 %380 to i1
  br i1 %381, label %443, label %382

382:                                              ; preds = %379
  %383 = load ptr, ptr %3, align 8, !tbaa !5
  %384 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %383, ptr noundef @.str.226)
          to label %385 unwind label %174

385:                                              ; preds = %382
  %386 = load ptr, ptr %3, align 8, !tbaa !5
  %387 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %386, ptr noundef @.str.227)
          to label %388 unwind label %174

388:                                              ; preds = %385
  %389 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %387, ptr noundef @.str.223)
          to label %390 unwind label %174

390:                                              ; preds = %388
  call void @llvm.lifetime.start.p0(i64 16, ptr %40) #5
  %391 = call { double, double } @_ZN6qtorch16ContractionTools11GetFinalValEv(ptr noundef nonnull align 8 dereferenceable(10128) %5) #5
  %392 = getelementptr inbounds %"class.std::complex", ptr %40, i32 0, i32 0
  %393 = getelementptr inbounds { double, double }, ptr %392, i32 0, i32 0
  %394 = extractvalue { double, double } %391, 0
  store double %394, ptr %393, align 8
  %395 = getelementptr inbounds { double, double }, ptr %392, i32 0, i32 1
  %396 = extractvalue { double, double } %391, 1
  store double %396, ptr %395, align 8
  %397 = invoke noundef double @_ZNKSt7complexIdE4realB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(16) %40)
          to label %398 unwind label %425

398:                                              ; preds = %390
  %399 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %389, double noundef %397)
          to label %400 unwind label %425

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

402:                                              ; preds = %400
  call void @llvm.lifetime.end.p0(i64 16, ptr %40) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %41) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %42) #5
  %403 = call { double, double } @_ZN6qtorch16ContractionTools11GetFinalValEv(ptr noundef nonnull align 8 dereferenceable(10128) %5) #5
  %404 = getelementptr inbounds %"class.std::complex", ptr %42, i32 0, i32 0
  %405 = getelementptr inbounds { double, double }, ptr %404, i32 0, i32 0
  %406 = extractvalue { double, double } %403, 0
  store double %406, ptr %405, align 8
  %407 = getelementptr inbounds { double, double }, ptr %404, i32 0, i32 1
  %408 = extractvalue { double, double } %403, 1
  store double %408, ptr %407, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %43) #5
  invoke void @_ZNSt7complexIdEC2Edd(ptr noundef nonnull align 8 dereferenceable(16) %43, double noundef 5.000000e-01, double noundef 0.000000e+00)
          to label %409 unwind label %429

409:                                              ; preds = %402
  %410 = invoke { double, double } @_ZStmiIdESt7complexIT_ERKS2_S4_(ptr noundef nonnull align 8 dereferenceable(16) %42, ptr noundef nonnull align 8 dereferenceable(16) %43)
          to label %411 unwind label %429

411:                                              ; preds = %409
  %412 = getelementptr inbounds %"class.std::complex", ptr %41, i32 0, i32 0
  %413 = getelementptr inbounds { double, double }, ptr %412, i32 0, i32 0
  %414 = extractvalue { double, double } %410, 0
  store double %414, ptr %413, align 8
  %415 = getelementptr inbounds { double, double }, ptr %412, i32 0, i32 1
  %416 = extractvalue { double, double } %410, 1
  store double %416, ptr %415, align 8
  %417 = invoke noundef double @_ZNKSt7complexIdE4realB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(16) %41)
          to label %418 unwind label %429

418:                                              ; preds = %411
  %419 = invoke noundef double @_ZSt3absd(double noundef %417)
          to label %420 unwind label %429

420:                                              ; preds = %418
  %421 = fcmp ogt double %419, 1.000000e-05
  call void @llvm.lifetime.end.p0(i64 16, ptr %43) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %42) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %41) #5
  br i1 %421, label %422, label %442

422:                                              ; preds = %420
  call void @llvm.lifetime.start.p0(i64 32, ptr %44) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr %45) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %45) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %44, ptr noundef @.str.106, ptr noundef nonnull align 1 dereferenceable(1) %45)
          to label %423 unwind label %433

423:                                              ; preds = %422
  invoke void @_Z10removeFileRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(32) %44)
          to label %424 unwind label %437

424:                                              ; preds = %423
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %44) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %45) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %45) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %44) #5
  store i1 false, ptr %2, align 1
  store i32 1, ptr %23, align 4
  br label %545

425:                                              ; preds = %400, %398, %390
  %426 = landingpad { ptr, i32 }
          cleanup
  %427 = extractvalue { ptr, i32 } %426, 0
  store ptr %427, ptr %8, align 8
  %428 = extractvalue { ptr, i32 } %426, 1
  store i32 %428, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %40) #5
  br label %547

429:                                              ; preds = %418, %411, %409, %402
  %430 = landingpad { ptr, i32 }
          cleanup
  %431 = extractvalue { ptr, i32 } %430, 0
  store ptr %431, ptr %8, align 8
  %432 = extractvalue { ptr, i32 } %430, 1
  store i32 %432, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %43) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %42) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %41) #5
  br label %547

433:                                              ; preds = %422
  %434 = landingpad { ptr, i32 }
          cleanup
  %435 = extractvalue { ptr, i32 } %434, 0
  store ptr %435, ptr %8, align 8
  %436 = extractvalue { ptr, i32 } %434, 1
  store i32 %436, ptr %9, align 4
  br label %441

437:                                              ; preds = %423
  %438 = landingpad { ptr, i32 }
          cleanup
  %439 = extractvalue { ptr, i32 } %438, 0
  store ptr %439, ptr %8, align 8
  %440 = extractvalue { ptr, i32 } %438, 1
  store i32 %440, ptr %9, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %44) #5
  br label %441

441:                                              ; preds = %437, %433
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %45) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %45) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %44) #5
  br label %547

442:                                              ; preds = %420
  br label %443

443:                                              ; preds = %442, %379
  store i8 1, ptr %12, align 1, !tbaa !9
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE4openEPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248) %4, ptr noundef @.str.106, i32 noundef 16)
          to label %444 unwind label %174

444:                                              ; preds = %443
  call void @llvm.lifetime.start.p0(i64 4, ptr %46) #5
  store i32 0, ptr %46, align 4, !tbaa !11
  br label %445

445:                                              ; preds = %460, %444
  %446 = load i32, ptr %46, align 4, !tbaa !11
  %447 = icmp slt i32 %446, 100
  br i1 %447, label %449, label %448

448:                                              ; preds = %445
  store i32 11, ptr %23, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %46) #5
  br label %467

449:                                              ; preds = %445
  %450 = load i8, ptr %12, align 1, !tbaa !9, !range !13, !noundef !14
  %451 = trunc i8 %450 to i1
  br i1 %451, label %452, label %455

452:                                              ; preds = %449
  %453 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef @.str.220)
          to label %454 unwind label %463

454:                                              ; preds = %452
  br label %458

455:                                              ; preds = %449
  %456 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef @.str.221)
          to label %457 unwind label %463

457:                                              ; preds = %455
  br label %458

458:                                              ; preds = %457, %454
  %459 = phi ptr [ %453, %454 ], [ %456, %457 ]
  br label %460

460:                                              ; preds = %458
  %461 = load i32, ptr %46, align 4, !tbaa !11
  %462 = add nsw i32 %461, 1
  store i32 %462, ptr %46, align 4, !tbaa !11
  br label %445, !llvm.loop !19

463:                                              ; preds = %455, %452
  %464 = landingpad { ptr, i32 }
          cleanup
  %465 = extractvalue { ptr, i32 } %464, 0
  store ptr %465, ptr %8, align 8
  %466 = extractvalue { ptr, i32 } %464, 1
  store i32 %466, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %46) #5
  br label %547

467:                                              ; preds = %448
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE5closeEv(ptr noundef nonnull align 8 dereferenceable(248) %4)
          to label %468 unwind label %174

468:                                              ; preds = %467
  call void @_ZN6qtorch16ContractionTools5ResetEv(ptr noundef nonnull align 8 dereferenceable(10128) %5)
  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) %5, i32 noundef 0, i32 noundef 1, i32 noundef 1)
          to label %469 unwind label %174

469:                                              ; preds = %468
  call void @_ZNSt12__shared_ptrIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %47) #5
  %470 = load i8, ptr %12, align 1, !tbaa !9, !range !13, !noundef !14
  %471 = trunc i8 %470 to i1
  br i1 %471, label %472, label %533

472:                                              ; preds = %469
  %473 = load ptr, ptr %3, align 8, !tbaa !5
  %474 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %473, ptr noundef @.str.226)
          to label %475 unwind label %174

475:                                              ; preds = %472
  %476 = load ptr, ptr %3, align 8, !tbaa !5
  %477 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %476, ptr noundef @.str.228)
          to label %478 unwind label %174

478:                                              ; preds = %475
  %479 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %477, ptr noundef @.str.223)
          to label %480 unwind label %174

480:                                              ; preds = %478
  call void @llvm.lifetime.start.p0(i64 16, ptr %48) #5
  %481 = call { double, double } @_ZN6qtorch16ContractionTools11GetFinalValEv(ptr noundef nonnull align 8 dereferenceable(10128) %5) #5
  %482 = getelementptr inbounds %"class.std::complex", ptr %48, i32 0, i32 0
  %483 = getelementptr inbounds { double, double }, ptr %482, i32 0, i32 0
  %484 = extractvalue { double, double } %481, 0
  store double %484, ptr %483, align 8
  %485 = getelementptr inbounds { double, double }, ptr %482, i32 0, i32 1
  %486 = extractvalue { double, double } %481, 1
  store double %486, ptr %485, align 8
  %487 = invoke noundef double @_ZNKSt7complexIdE4realB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(16) %48)
          to label %488 unwind label %515

488:                                              ; preds = %480
  %489 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %479, double noundef %487)
          to label %490 unwind label %515

490:                                              ; preds = %488
  %491 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %489, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %492 unwind label %515

492:                                              ; preds = %490
  call void @llvm.lifetime.end.p0(i64 16, ptr %48) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %49) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %50) #5
  %493 = call { double, double } @_ZN6qtorch16ContractionTools11GetFinalValEv(ptr noundef nonnull align 8 dereferenceable(10128) %5) #5
  %494 = getelementptr inbounds %"class.std::complex", ptr %50, i32 0, i32 0
  %495 = getelementptr inbounds { double, double }, ptr %494, i32 0, i32 0
  %496 = extractvalue { double, double } %493, 0
  store double %496, ptr %495, align 8
  %497 = getelementptr inbounds { double, double }, ptr %494, i32 0, i32 1
  %498 = extractvalue { double, double } %493, 1
  store double %498, ptr %497, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %51) #5
  invoke void @_ZNSt7complexIdEC2Edd(ptr noundef nonnull align 8 dereferenceable(16) %51, double noundef 5.000000e-01, double noundef 0.000000e+00)
          to label %499 unwind label %519

499:                                              ; preds = %492
  %500 = invoke { double, double } @_ZStmiIdESt7complexIT_ERKS2_S4_(ptr noundef nonnull align 8 dereferenceable(16) %50, ptr noundef nonnull align 8 dereferenceable(16) %51)
          to label %501 unwind label %519

501:                                              ; preds = %499
  %502 = getelementptr inbounds %"class.std::complex", ptr %49, i32 0, i32 0
  %503 = getelementptr inbounds { double, double }, ptr %502, i32 0, i32 0
  %504 = extractvalue { double, double } %500, 0
  store double %504, ptr %503, align 8
  %505 = getelementptr inbounds { double, double }, ptr %502, i32 0, i32 1
  %506 = extractvalue { double, double } %500, 1
  store double %506, ptr %505, align 8
  %507 = invoke noundef double @_ZNKSt7complexIdE4realB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(16) %49)
          to label %508 unwind label %519

508:                                              ; preds = %501
  %509 = invoke noundef double @_ZSt3absd(double noundef %507)
          to label %510 unwind label %519

510:                                              ; preds = %508
  %511 = fcmp ogt double %509, 1.000000e-05
  call void @llvm.lifetime.end.p0(i64 16, ptr %51) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %50) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %49) #5
  br i1 %511, label %512, label %532

512:                                              ; preds = %510
  call void @llvm.lifetime.start.p0(i64 32, ptr %52) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr %53) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %53) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %52, ptr noundef @.str.106, ptr noundef nonnull align 1 dereferenceable(1) %53)
          to label %513 unwind label %523

513:                                              ; preds = %512
  invoke void @_Z10removeFileRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(32) %52)
          to label %514 unwind label %527

514:                                              ; preds = %513
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %52) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %53) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %53) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %52) #5
  store i1 false, ptr %2, align 1
  store i32 1, ptr %23, align 4
  br label %545

515:                                              ; preds = %490, %488, %480
  %516 = landingpad { ptr, i32 }
          cleanup
  %517 = extractvalue { ptr, i32 } %516, 0
  store ptr %517, ptr %8, align 8
  %518 = extractvalue { ptr, i32 } %516, 1
  store i32 %518, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %48) #5
  br label %547

519:                                              ; preds = %508, %501, %499, %492
  %520 = landingpad { ptr, i32 }
          cleanup
  %521 = extractvalue { ptr, i32 } %520, 0
  store ptr %521, ptr %8, align 8
  %522 = extractvalue { ptr, i32 } %520, 1
  store i32 %522, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %51) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %50) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %49) #5
  br label %547

523:                                              ; preds = %512
  %524 = landingpad { ptr, i32 }
          cleanup
  %525 = extractvalue { ptr, i32 } %524, 0
  store ptr %525, ptr %8, align 8
  %526 = extractvalue { ptr, i32 } %524, 1
  store i32 %526, ptr %9, align 4
  br label %531

527:                                              ; preds = %513
  %528 = landingpad { ptr, i32 }
          cleanup
  %529 = extractvalue { ptr, i32 } %528, 0
  store ptr %529, ptr %8, align 8
  %530 = extractvalue { ptr, i32 } %528, 1
  store i32 %530, ptr %9, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %52) #5
  br label %531

531:                                              ; preds = %527, %523
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %53) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %53) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %52) #5
  br label %547

532:                                              ; preds = %510
  br label %533

533:                                              ; preds = %532, %469
  call void @llvm.lifetime.start.p0(i64 32, ptr %54) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr %55) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %55) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %54, ptr noundef @.str.106, ptr noundef nonnull align 1 dereferenceable(1) %55)
          to label %534 unwind label %536

534:                                              ; preds = %533
  invoke void @_Z10removeFileRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(32) %54)
          to label %535 unwind label %540

535:                                              ; preds = %534
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %54) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %55) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %55) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %54) #5
  store i1 true, ptr %2, align 1
  store i32 1, ptr %23, align 4
  br label %545

536:                                              ; preds = %533
  %537 = landingpad { ptr, i32 }
          cleanup
  %538 = extractvalue { ptr, i32 } %537, 0
  store ptr %538, ptr %8, align 8
  %539 = extractvalue { ptr, i32 } %537, 1
  store i32 %539, ptr %9, align 4
  br label %544

540:                                              ; preds = %534
  %541 = landingpad { ptr, i32 }
          cleanup
  %542 = extractvalue { ptr, i32 } %541, 0
  store ptr %542, ptr %8, align 8
  %543 = extractvalue { ptr, i32 } %541, 1
  store i32 %543, ptr %9, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %54) #5
  br label %544

544:                                              ; preds = %540, %536
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %55) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %55) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %54) #5
  br label %547

545:                                              ; preds = %535, %514, %424, %298, %173
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %13) #5
  call void @llvm.lifetime.end.p0(i64 392, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #5
  call void @_ZN6qtorch16ContractionToolsD2Ev(ptr noundef nonnull align 8 dereferenceable(10128) %5) #5
  call void @llvm.lifetime.end.p0(i64 10128, ptr %5) #5
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248) %4) #5
  call void @llvm.lifetime.end.p0(i64 512, ptr %4) #5
  %546 = load i1, ptr %2, align 1
  ret i1 %546

547:                                              ; preds = %544, %531, %519, %515, %463, %441, %429, %425, %373, %358, %325, %313, %312, %249, %222, %204, %192, %191, %174, %124
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %13) #5
  br label %548

548:                                              ; preds = %547, %94
  call void @llvm.lifetime.end.p0(i64 392, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #5
  br label %549

549:                                              ; preds = %548, %90
  call void @_ZN6qtorch16ContractionToolsD2Ev(ptr noundef nonnull align 8 dereferenceable(10128) %5) #5
  br label %550

550:                                              ; preds = %549, %89
  call void @llvm.lifetime.end.p0(i64 10128, ptr %5) #5
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248) %4) #5
  call void @llvm.lifetime.end.p0(i64 512, ptr %4) #5
  br label %551

551:                                              ; preds = %550
  %552 = load ptr, ptr %8, align 8
  %553 = load i32, ptr %9, align 4
  %554 = insertvalue { ptr, i32 } poison, ptr %552, 0
  %555 = insertvalue { ptr, i32 } %554, i32 %553, 1
  resume { ptr, i32 } %555
}

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

; 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 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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 = !{!"bool", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{i8 0, i8 2}
!14 = !{}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = distinct !{!17, !16}
!18 = distinct !{!18, !16}
!19 = distinct !{!19, !16}


; 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::__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::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::complex" = type { { double, double } }
%"class.std::vector.186" = type { %"struct.std::_Vector_base.187" }
%"struct.std::_Vector_base.187" = type { %"struct.std::_Vector_base<std::shared_ptr<std::vector<std::shared_ptr<qtorch::Node>>>, std::allocator<std::shared_ptr<std::vector<std::shared_ptr<qtorch::Node>>>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::shared_ptr<std::vector<std::shared_ptr<qtorch::Node>>>, std::allocator<std::shared_ptr<std::vector<std::shared_ptr<qtorch::Node>>>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::shared_ptr<std::vector<std::shared_ptr<qtorch::Node>>>, std::allocator<std::shared_ptr<std::vector<std::shared_ptr<qtorch::Node>>>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::shared_ptr<std::vector<std::shared_ptr<qtorch::Node>>>, std::allocator<std::shared_ptr<std::vector<std::shared_ptr<qtorch::Node>>>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::random_device" = type { %union.anon.191 }
%union.anon.191 = type { %"class.std::mersenne_twister_engine" }
%"class.std::mersenne_twister_engine" = type { [624 x i64], i64 }
%"class.std::allocator" = type { i8 }
%"class.std::__cxx11::basic_stringstream" = type { %"class.std::basic_iostream.base", %"class.std::__cxx11::basic_stringbuf", %"class.std::basic_ios" }
%"class.std::basic_iostream.base" = type { %"class.std::basic_istream.base", %"class.std::basic_ostream.base" }
%"class.std::basic_istream.base" = type { ptr, i64 }
%"class.std::__cxx11::basic_stringbuf" = type { %"class.std::basic_streambuf", i32, %"class.std::__cxx11::basic_string" }

@.str.106 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.119 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.124 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.217 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.218 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.219 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.220 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.221 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.222 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.223 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.224 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.225 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.226 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.227 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.228 = external hidden unnamed_addr constant [9 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 dso_local void @_ZNSt7complexIdEC2Edd(ptr noundef nonnull align 8 dereferenceable(16), double noundef, double noundef) unnamed_addr #3 align 2

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6qtorch16ContractionTools5ResetEv(ptr noundef nonnull align 8 dereferenceable(10128)) local_unnamed_addr #3 align 2

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

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

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

; Function Attrs: mustprogress uwtable
declare void @_ZNKSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEE3strEv(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(128)) 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 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 #4

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local { double, double } @_ZStmiIdESt7complexIT_ERKS2_S4_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_Z7catTestRSt14basic_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.qtorch::ContractionTools", align 8
  %4 = alloca %"class.std::__cxx11::basic_string", align 8
  %5 = alloca %"class.std::allocator", align 1
  %6 = alloca %"class.std::__cxx11::basic_string", align 8
  %7 = alloca %"class.std::allocator", align 1
  %8 = alloca %"class.std::__cxx11::basic_stringstream", align 8
  %9 = alloca %"class.std::shared_ptr.178", align 8
  %10 = alloca %"class.std::__cxx11::basic_string", align 8
  %11 = alloca %"class.std::complex", align 8
  %12 = alloca %"class.std::complex", align 8
  %13 = alloca %"class.std::complex", align 8
  %14 = alloca %"class.std::complex", align 8
  %15 = alloca %"class.std::__cxx11::basic_string", align 8
  %16 = alloca %"class.std::allocator", align 1
  %17 = alloca %"class.std::__cxx11::basic_stringstream", align 8
  %18 = alloca %"class.std::shared_ptr.178", align 8
  %19 = alloca %"class.std::__cxx11::basic_string", align 8
  %20 = alloca %"class.std::complex", align 8
  %21 = alloca %"class.std::complex", align 8
  %22 = alloca %"class.std::complex", align 8
  %23 = alloca %"class.std::complex", align 8
  %24 = alloca %"class.std::__cxx11::basic_string", align 8
  %25 = alloca %"class.std::allocator", align 1
  %26 = alloca %"class.std::__cxx11::basic_string", align 8
  %27 = alloca %"class.std::allocator", align 1
  %28 = alloca %"class.std::__cxx11::basic_string", align 8
  %29 = alloca %"class.std::allocator", align 1
  %30 = alloca %"class.std::shared_ptr.178", align 8
  %31 = alloca %"class.std::complex", align 8
  %32 = alloca %"class.std::complex", align 8
  %33 = alloca %"class.std::complex", align 8
  %34 = alloca %"class.std::complex", align 8
  %35 = alloca %"class.std::__cxx11::basic_string", align 8
  %36 = alloca %"class.std::allocator", align 1
  %37 = alloca %"class.std::shared_ptr.178", align 8
  %38 = alloca %"class.std::complex", align 8
  %39 = alloca %"class.std::complex", align 8
  %40 = alloca %"class.std::complex", align 8
  %41 = alloca %"class.std::complex", align 8
  %42 = alloca %"class.std::__cxx11::basic_string", align 8
  %43 = alloca %"class.std::allocator", align 1
  %44 = alloca %"class.std::__cxx11::basic_string", align 8
  %45 = alloca %"class.std::allocator", align 1
  %46 = 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.217)
  %47 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %46, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %48 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %47, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.start.p0(i64 512, ptr nonnull %2) #5
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(248) %2)
  call void @llvm.lifetime.start.p0(i64 10128, ptr nonnull %3) #5
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %5) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef nonnull @.str.218, ptr noundef nonnull align 1 dereferenceable(1) %5)
          to label %49 unwind label %61

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

50:                                               ; preds = %49
  invoke void @_ZN6qtorch16ContractionToolsC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_i(ptr noundef nonnull align 8 dereferenceable(10128) %3, ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef nonnull align 8 dereferenceable(32) %6, i32 noundef 8)
          to label %51 unwind label %65

51:                                               ; preds = %50
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #5
  %52 = 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.219)
          to label %53 unwind label %69

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

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

57:                                               ; preds = %55
  call void @_ZN6qtorch16ContractionTools5ResetEv(ptr noundef nonnull align 8 dereferenceable(10128) %3)
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE4openEPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248) %2, ptr noundef nonnull @.str.106, i32 noundef 16)
          to label %58 unwind label %69

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

.preheader82:                                     ; preds = %58
  %59 = getelementptr inbounds i8, ptr %8, i64 16
  %60 = 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.221)
          to label %73 unwind label %104

61:                                               ; preds = %1
  %62 = landingpad { ptr, i32 }
          cleanup
  br label %68

63:                                               ; preds = %49
  %64 = landingpad { ptr, i32 }
          cleanup
  br label %67

65:                                               ; preds = %50
  %66 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #5
  br label %67

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

68:                                               ; preds = %67, %61
  %.pn.pn = phi { ptr, i32 } [ %.pn, %67 ], [ %62, %61 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #5
  br label %375

69:                                               ; preds = %57, %55, %53, %51
  %70 = landingpad { ptr, i32 }
          cleanup
  br label %374

71:                                               ; preds = %58
  %72 = landingpad { ptr, i32 }
          cleanup
  br label %373

73:                                               ; preds = %.preheader82
  %74 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %59, ptr noundef nonnull @.str.124)
          to label %75 unwind label %104

75:                                               ; preds = %73
  %76 = 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.221)
          to label %77 unwind label %104

77:                                               ; preds = %75
  %78 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %59, ptr noundef nonnull @.str.124)
          to label %79 unwind label %104

79:                                               ; preds = %77
  %80 = 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.221)
          to label %81 unwind label %104

81:                                               ; preds = %79
  %82 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %59, ptr noundef nonnull @.str.124)
          to label %83 unwind label %104

83:                                               ; preds = %81
  %84 = 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.221)
          to label %85 unwind label %104

85:                                               ; preds = %83
  %86 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %59, ptr noundef nonnull @.str.124)
          to label %87 unwind label %104

87:                                               ; preds = %85
  %88 = 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.221)
          to label %89 unwind label %104

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

91:                                               ; preds = %89
  %92 = 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.221)
          to label %93 unwind label %104

93:                                               ; preds = %91
  %94 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %59, ptr noundef nonnull @.str.124)
          to label %95 unwind label %104

95:                                               ; preds = %93
  %96 = 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.221)
          to label %97 unwind label %104

97:                                               ; preds = %95
  %98 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %59, ptr noundef nonnull @.str.124)
          to label %99 unwind label %104

99:                                               ; preds = %97
  %100 = 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.221)
          to label %101 unwind label %104

101:                                              ; preds = %99
  %102 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %59, ptr noundef nonnull @.str.124)
          to label %103 unwind label %104

103:                                              ; preds = %101
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE5closeEv(ptr noundef nonnull align 8 dereferenceable(248) %2)
          to label %106 unwind label %139

104:                                              ; preds = %101, %99, %97, %95, %93, %91, %89, %87, %85, %83, %81, %79, %77, %75, %73, %.preheader82
  %105 = landingpad { ptr, i32 }
          cleanup
  br label %372

106:                                              ; preds = %103
  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) %3, i32 noundef 0, i32 noundef 1, i32 noundef 1)
          to label %107 unwind label %139

107:                                              ; preds = %106
  call void @_ZNSt12__shared_ptrIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %9) #5
  %108 = 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.222)
          to label %109 unwind label %139

109:                                              ; preds = %107
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %10) #5
  invoke void @_ZNKSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEE3strEv(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %10, ptr noundef nonnull align 8 dereferenceable(128) %8)
          to label %110 unwind label %141

110:                                              ; preds = %109
  %111 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull align 8 dereferenceable(32) %10)
          to label %112 unwind label %143

112:                                              ; preds = %110
  %113 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %111, ptr noundef nonnull @.str.223)
          to label %114 unwind label %143

114:                                              ; preds = %112
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %11) #5
  %115 = call { double, double } @_ZN6qtorch16ContractionTools11GetFinalValEv(ptr noundef nonnull align 8 dereferenceable(10128) %3) #5
  %116 = extractvalue { double, double } %115, 0
  store double %116, ptr %11, align 8
  %117 = getelementptr inbounds i8, ptr %11, i64 8
  %118 = extractvalue { double, double } %115, 1
  store double %118, ptr %117, align 8
  %119 = call noundef double @_ZNKSt7complexIdE4realB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(16) %11)
  %120 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %113, double noundef %119)
          to label %121 unwind label %145

121:                                              ; preds = %114
  %122 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %120, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %123 unwind label %145

123:                                              ; preds = %121
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %12) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %13) #5
  %124 = call { double, double } @_ZN6qtorch16ContractionTools11GetFinalValEv(ptr noundef nonnull align 8 dereferenceable(10128) %3) #5
  %125 = extractvalue { double, double } %124, 0
  store double %125, ptr %13, align 8
  %126 = getelementptr inbounds i8, ptr %13, i64 8
  %127 = extractvalue { double, double } %124, 1
  store double %127, ptr %126, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %14) #5
  call void @_ZNSt7complexIdEC2Edd(ptr noundef nonnull align 8 dereferenceable(16) %14, double noundef 5.000000e-01, double noundef 0.000000e+00)
  %128 = invoke { double, double } @_ZStmiIdESt7complexIT_ERKS2_S4_(ptr noundef nonnull align 8 dereferenceable(16) %13, ptr noundef nonnull align 8 dereferenceable(16) %14)
          to label %129 unwind label %149

129:                                              ; preds = %123
  %130 = extractvalue { double, double } %128, 0
  store double %130, ptr %12, align 8
  %131 = getelementptr inbounds i8, ptr %12, i64 8
  %132 = extractvalue { double, double } %128, 1
  store double %132, ptr %131, align 8
  %133 = call noundef double @_ZNKSt7complexIdE4realB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(16) %12)
  %134 = call noundef double @_ZSt3absd(double noundef %133)
  %135 = fcmp ogt double %134, 1.000000e-05
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %14) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %12) #5
  br i1 %135, label %136, label %156

136:                                              ; preds = %129
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %15) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %16) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %15, ptr noundef nonnull @.str.106, ptr noundef nonnull align 1 dereferenceable(1) %16)
          to label %137 unwind label %151

137:                                              ; preds = %136
  invoke void @_Z10removeFileRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(32) %15)
          to label %138 unwind label %153

138:                                              ; preds = %137
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %16) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %15) #5
  br label %371

139:                                              ; preds = %327, %325, %323, %322, %316, %315, %279, %277, %275, %274, %260, %259, %254, %252, %250, %248, %201, %200, %197, %156, %107, %106, %103
  %140 = landingpad { ptr, i32 }
          cleanup
  br label %372

141:                                              ; preds = %109
  %142 = landingpad { ptr, i32 }
          cleanup
  br label %148

143:                                              ; preds = %112, %110
  %144 = landingpad { ptr, i32 }
          cleanup
  br label %147

145:                                              ; preds = %121, %114
  %146 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #5
  br label %147

147:                                              ; preds = %145, %143
  %.pn55 = phi { ptr, i32 } [ %146, %145 ], [ %144, %143 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #5
  br label %148

148:                                              ; preds = %147, %141
  %.pn55.pn = phi { ptr, i32 } [ %.pn55, %147 ], [ %142, %141 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #5
  br label %372

149:                                              ; preds = %123
  %150 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %14) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %12) #5
  br label %372

151:                                              ; preds = %136
  %152 = landingpad { ptr, i32 }
          cleanup
  br label %155

153:                                              ; preds = %137
  %154 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #5
  br label %155

155:                                              ; preds = %153, %151
  %.pn74 = phi { ptr, i32 } [ %154, %153 ], [ %152, %151 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %16) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %15) #5
  br label %372

156:                                              ; preds = %129
  call void @_ZN6qtorch16ContractionTools5ResetEv(ptr noundef nonnull align 8 dereferenceable(10128) %3)
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE4openEPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248) %2, ptr noundef nonnull @.str.106, i32 noundef 16)
          to label %157 unwind label %139

157:                                              ; preds = %156
  call void @llvm.lifetime.start.p0(i64 392, ptr nonnull %17) #5
  invoke void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(128) %17)
          to label %158 unwind label %162

158:                                              ; preds = %157
  %159 = invoke noundef nonnull align 8 dereferenceable(128) ptr @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(128) %8, ptr noundef nonnull align 8 dereferenceable(128) %17)
          to label %160 unwind label %164

160:                                              ; preds = %158
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %17) #5
  call void @llvm.lifetime.end.p0(i64 392, ptr nonnull %17) #5
  %161 = 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.220)
          to label %167 unwind label %198

162:                                              ; preds = %157
  %163 = landingpad { ptr, i32 }
          cleanup
  br label %166

164:                                              ; preds = %158
  %165 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %17) #5
  br label %166

166:                                              ; preds = %164, %162
  %.pn58 = phi { ptr, i32 } [ %165, %164 ], [ %163, %162 ]
  call void @llvm.lifetime.end.p0(i64 392, ptr nonnull %17) #5
  br label %372

167:                                              ; preds = %160
  %168 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %59, ptr noundef nonnull @.str.119)
          to label %169 unwind label %198

169:                                              ; preds = %167
  %170 = 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.220)
          to label %171 unwind label %198

171:                                              ; preds = %169
  %172 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %59, ptr noundef nonnull @.str.119)
          to label %173 unwind label %198

173:                                              ; preds = %171
  %174 = 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.220)
          to label %175 unwind label %198

175:                                              ; preds = %173
  %176 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %59, ptr noundef nonnull @.str.119)
          to label %177 unwind label %198

177:                                              ; preds = %175
  %178 = 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.220)
          to label %179 unwind label %198

179:                                              ; preds = %177
  %180 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %59, ptr noundef nonnull @.str.119)
          to label %181 unwind label %198

181:                                              ; preds = %179
  %182 = 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.220)
          to label %183 unwind label %198

183:                                              ; preds = %181
  %184 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %59, ptr noundef nonnull @.str.119)
          to label %185 unwind label %198

185:                                              ; preds = %183
  %186 = 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.220)
          to label %187 unwind label %198

187:                                              ; preds = %185
  %188 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %59, ptr noundef nonnull @.str.119)
          to label %189 unwind label %198

189:                                              ; preds = %187
  %190 = 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.220)
          to label %191 unwind label %198

191:                                              ; preds = %189
  %192 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %59, ptr noundef nonnull @.str.119)
          to label %193 unwind label %198

193:                                              ; preds = %191
  %194 = 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.220)
          to label %195 unwind label %198

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

197:                                              ; preds = %195
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE5closeEv(ptr noundef nonnull align 8 dereferenceable(248) %2)
          to label %200 unwind label %139

198:                                              ; preds = %195, %193, %191, %189, %187, %185, %183, %181, %179, %177, %175, %173, %171, %169, %167, %160
  %199 = landingpad { ptr, i32 }
          cleanup
  br label %372

200:                                              ; preds = %197
  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) %3, i32 noundef 0, i32 noundef 1, i32 noundef 1)
          to label %201 unwind label %139

201:                                              ; preds = %200
  call void @_ZNSt12__shared_ptrIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %18) #5
  %202 = 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.222)
          to label %203 unwind label %139

203:                                              ; preds = %201
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %19) #5
  invoke void @_ZNKSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEE3strEv(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %19, ptr noundef nonnull align 8 dereferenceable(128) %8)
          to label %204 unwind label %233

204:                                              ; preds = %203
  %205 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull align 8 dereferenceable(32) %19)
          to label %206 unwind label %235

206:                                              ; preds = %204
  %207 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %205, ptr noundef nonnull @.str.223)
          to label %208 unwind label %235

208:                                              ; preds = %206
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %20) #5
  %209 = call { double, double } @_ZN6qtorch16ContractionTools11GetFinalValEv(ptr noundef nonnull align 8 dereferenceable(10128) %3) #5
  %210 = extractvalue { double, double } %209, 0
  store double %210, ptr %20, align 8
  %211 = getelementptr inbounds i8, ptr %20, i64 8
  %212 = extractvalue { double, double } %209, 1
  store double %212, ptr %211, align 8
  %213 = call noundef double @_ZNKSt7complexIdE4realB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(16) %20)
  %214 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %207, double noundef %213)
          to label %215 unwind label %237

215:                                              ; preds = %208
  %216 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %214, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %217 unwind label %237

217:                                              ; preds = %215
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %20) #5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %19) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %21) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %22) #5
  %218 = call { double, double } @_ZN6qtorch16ContractionTools11GetFinalValEv(ptr noundef nonnull align 8 dereferenceable(10128) %3) #5
  %219 = extractvalue { double, double } %218, 0
  store double %219, ptr %22, align 8
  %220 = getelementptr inbounds i8, ptr %22, 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 %23) #5
  call void @_ZNSt7complexIdEC2Edd(ptr noundef nonnull align 8 dereferenceable(16) %23, double noundef 5.000000e-01, double noundef 0.000000e+00)
  %222 = invoke { double, double } @_ZStmiIdESt7complexIT_ERKS2_S4_(ptr noundef nonnull align 8 dereferenceable(16) %22, ptr noundef nonnull align 8 dereferenceable(16) %23)
          to label %223 unwind label %241

223:                                              ; preds = %217
  %224 = extractvalue { double, double } %222, 0
  store double %224, ptr %21, align 8
  %225 = getelementptr inbounds i8, ptr %21, i64 8
  %226 = extractvalue { double, double } %222, 1
  store double %226, ptr %225, align 8
  %227 = call noundef double @_ZNKSt7complexIdE4realB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(16) %21)
  %228 = call noundef double @_ZSt3absd(double noundef %227)
  %229 = fcmp ogt double %228, 1.000000e-05
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %23) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %22) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %21) #5
  br i1 %229, label %230, label %248

230:                                              ; preds = %223
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %24) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %25) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %25) #5
  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 %231 unwind label %243

231:                                              ; preds = %230
  invoke void @_Z10removeFileRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(32) %24)
          to label %232 unwind label %245

232:                                              ; preds = %231
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %24) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %25) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %25) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %24) #5
  br label %371

233:                                              ; preds = %203
  %234 = landingpad { ptr, i32 }
          cleanup
  br label %240

235:                                              ; preds = %206, %204
  %236 = landingpad { ptr, i32 }
          cleanup
  br label %239

237:                                              ; preds = %215, %208
  %238 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %20) #5
  br label %239

239:                                              ; preds = %237, %235
  %.pn60 = phi { ptr, i32 } [ %238, %237 ], [ %236, %235 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #5
  br label %240

240:                                              ; preds = %239, %233
  %.pn60.pn = phi { ptr, i32 } [ %.pn60, %239 ], [ %234, %233 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %19) #5
  br label %372

241:                                              ; preds = %217
  %242 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %23) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %22) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %21) #5
  br label %372

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

245:                                              ; preds = %231
  %246 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %24) #5
  br label %247

247:                                              ; preds = %245, %243
  %.pn72 = phi { ptr, i32 } [ %246, %245 ], [ %244, %243 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %25) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %25) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %24) #5
  br label %372

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

250:                                              ; preds = %248
  %251 = 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.224)
          to label %252 unwind label %139

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

254:                                              ; preds = %252
  %255 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %253, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %256 unwind label %139

256:                                              ; preds = %254
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %26) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %27) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %27) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %26, ptr noundef nonnull @.str.225, ptr noundef nonnull align 1 dereferenceable(1) %27)
          to label %257 unwind label %261

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

258:                                              ; preds = %257
  invoke void @_ZN6qtorch16ContractionTools5ResetERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_i(ptr noundef nonnull align 8 dereferenceable(10128) %3, ptr noundef nonnull align 8 dereferenceable(32) %26, ptr noundef nonnull align 8 dereferenceable(32) %28, i32 noundef 8)
          to label %259 unwind label %265

259:                                              ; preds = %258
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %28) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %29) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %29) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %28) #5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %26) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %27) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %27) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %26) #5
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE4openEPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248) %2, ptr noundef nonnull @.str.106, i32 noundef 16)
          to label %.preheader81 unwind label %139

260:                                              ; preds = %270
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE5closeEv(ptr noundef nonnull align 8 dereferenceable(248) %2)
          to label %274 unwind label %139

261:                                              ; preds = %256
  %262 = landingpad { ptr, i32 }
          cleanup
  br label %268

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

265:                                              ; preds = %258
  %266 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %28) #5
  br label %267

267:                                              ; preds = %265, %263
  %.pn63 = phi { ptr, i32 } [ %266, %265 ], [ %264, %263 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %29) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %29) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %28) #5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %26) #5
  br label %268

268:                                              ; preds = %267, %261
  %.pn63.pn = phi { ptr, i32 } [ %.pn63, %267 ], [ %262, %261 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %27) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %27) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %26) #5
  br label %372

.preheader81:                                     ; preds = %259, %270
  %.03085 = phi i32 [ %271, %270 ], [ 0, %259 ]
  %269 = 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.221)
          to label %270 unwind label %272

270:                                              ; preds = %.preheader81
  %271 = add nuw nsw i32 %.03085, 1
  %exitcond.not = icmp eq i32 %271, 100
  br i1 %exitcond.not, label %260, label %.preheader81, !llvm.loop !5

272:                                              ; preds = %.preheader81
  %273 = landingpad { ptr, i32 }
          cleanup
  br label %372

274:                                              ; preds = %260
  invoke void @_ZN6qtorch16ContractionTools8ContractENS_15ContractionTypeEii(ptr dead_on_unwind nonnull writable sret(%"class.std::shared_ptr.178") align 8 %30, ptr noundef nonnull align 8 dereferenceable(10128) %3, i32 noundef 0, i32 noundef 1, i32 noundef 1)
          to label %275 unwind label %139

275:                                              ; preds = %274
  call void @_ZNSt12__shared_ptrIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %30) #5
  %276 = 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.226)
          to label %277 unwind label %139

277:                                              ; preds = %275
  %278 = 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.227)
          to label %279 unwind label %139

279:                                              ; preds = %277
  %280 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %278, ptr noundef nonnull @.str.223)
          to label %281 unwind label %139

281:                                              ; preds = %279
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %31) #5
  %282 = call { double, double } @_ZN6qtorch16ContractionTools11GetFinalValEv(ptr noundef nonnull align 8 dereferenceable(10128) %3) #5
  %283 = extractvalue { double, double } %282, 0
  store double %283, ptr %31, align 8
  %284 = getelementptr inbounds i8, ptr %31, i64 8
  %285 = extractvalue { double, double } %282, 1
  store double %285, ptr %284, align 8
  %286 = call noundef double @_ZNKSt7complexIdE4realB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(16) %31)
  %287 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %280, double noundef %286)
          to label %288 unwind label %306

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

290:                                              ; preds = %288
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %31) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %32) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %33) #5
  %291 = call { double, double } @_ZN6qtorch16ContractionTools11GetFinalValEv(ptr noundef nonnull align 8 dereferenceable(10128) %3) #5
  %292 = extractvalue { double, double } %291, 0
  store double %292, ptr %33, align 8
  %293 = getelementptr inbounds i8, ptr %33, i64 8
  %294 = extractvalue { double, double } %291, 1
  store double %294, ptr %293, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %34) #5
  call void @_ZNSt7complexIdEC2Edd(ptr noundef nonnull align 8 dereferenceable(16) %34, double noundef 5.000000e-01, double noundef 0.000000e+00)
  %295 = invoke { double, double } @_ZStmiIdESt7complexIT_ERKS2_S4_(ptr noundef nonnull align 8 dereferenceable(16) %33, ptr noundef nonnull align 8 dereferenceable(16) %34)
          to label %296 unwind label %308

296:                                              ; preds = %290
  %297 = extractvalue { double, double } %295, 0
  store double %297, ptr %32, align 8
  %298 = getelementptr inbounds i8, ptr %32, i64 8
  %299 = extractvalue { double, double } %295, 1
  store double %299, ptr %298, align 8
  %300 = call noundef double @_ZNKSt7complexIdE4realB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(16) %32)
  %301 = call noundef double @_ZSt3absd(double noundef %300)
  %302 = fcmp ogt double %301, 1.000000e-05
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %34) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %33) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %32) #5
  br i1 %302, label %303, label %315

303:                                              ; preds = %296
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %35) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %36) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %36) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %35, ptr noundef nonnull @.str.106, ptr noundef nonnull align 1 dereferenceable(1) %36)
          to label %304 unwind label %310

304:                                              ; preds = %303
  invoke void @_Z10removeFileRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(32) %35)
          to label %305 unwind label %312

305:                                              ; preds = %304
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %35) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %36) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %36) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %35) #5
  br label %371

306:                                              ; preds = %288, %281
  %307 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %31) #5
  br label %372

308:                                              ; preds = %290
  %309 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %34) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %33) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %32) #5
  br label %372

310:                                              ; preds = %303
  %311 = landingpad { ptr, i32 }
          cleanup
  br label %314

312:                                              ; preds = %304
  %313 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %35) #5
  br label %314

314:                                              ; preds = %312, %310
  %.pn70 = phi { ptr, i32 } [ %313, %312 ], [ %311, %310 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %36) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %36) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %35) #5
  br label %372

315:                                              ; preds = %296
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE4openEPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248) %2, ptr noundef nonnull @.str.106, i32 noundef 16)
          to label %.preheader unwind label %139

316:                                              ; preds = %318
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE5closeEv(ptr noundef nonnull align 8 dereferenceable(248) %2)
          to label %322 unwind label %139

.preheader:                                       ; preds = %315, %318
  %.086 = phi i32 [ %319, %318 ], [ 0, %315 ]
  %317 = 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.220)
          to label %318 unwind label %320

318:                                              ; preds = %.preheader
  %319 = add nuw nsw i32 %.086, 1
  %exitcond87.not = icmp eq i32 %319, 100
  br i1 %exitcond87.not, label %316, label %.preheader, !llvm.loop !7

320:                                              ; preds = %.preheader
  %321 = landingpad { ptr, i32 }
          cleanup
  br label %372

322:                                              ; preds = %316
  call void @_ZN6qtorch16ContractionTools5ResetEv(ptr noundef nonnull align 8 dereferenceable(10128) %3)
  invoke void @_ZN6qtorch16ContractionTools8ContractENS_15ContractionTypeEii(ptr dead_on_unwind nonnull writable sret(%"class.std::shared_ptr.178") align 8 %37, ptr noundef nonnull align 8 dereferenceable(10128) %3, i32 noundef 0, i32 noundef 1, i32 noundef 1)
          to label %323 unwind label %139

323:                                              ; preds = %322
  call void @_ZNSt12__shared_ptrIN6qtorch7NetworkELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %37) #5
  %324 = 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.226)
          to label %325 unwind label %139

325:                                              ; preds = %323
  %326 = 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.228)
          to label %327 unwind label %139

327:                                              ; preds = %325
  %328 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %326, ptr noundef nonnull @.str.223)
          to label %329 unwind label %139

329:                                              ; preds = %327
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %38) #5
  %330 = call { double, double } @_ZN6qtorch16ContractionTools11GetFinalValEv(ptr noundef nonnull align 8 dereferenceable(10128) %3) #5
  %331 = extractvalue { double, double } %330, 0
  store double %331, ptr %38, align 8
  %332 = getelementptr inbounds i8, ptr %38, i64 8
  %333 = extractvalue { double, double } %330, 1
  store double %333, ptr %332, align 8
  %334 = call noundef double @_ZNKSt7complexIdE4realB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(16) %38)
  %335 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %328, double noundef %334)
          to label %336 unwind label %354

336:                                              ; preds = %329
  %337 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %335, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %338 unwind label %354

338:                                              ; preds = %336
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %38) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %39) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %40) #5
  %339 = call { double, double } @_ZN6qtorch16ContractionTools11GetFinalValEv(ptr noundef nonnull align 8 dereferenceable(10128) %3) #5
  %340 = extractvalue { double, double } %339, 0
  store double %340, ptr %40, align 8
  %341 = getelementptr inbounds i8, ptr %40, i64 8
  %342 = extractvalue { double, double } %339, 1
  store double %342, ptr %341, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %41) #5
  call void @_ZNSt7complexIdEC2Edd(ptr noundef nonnull align 8 dereferenceable(16) %41, double noundef 5.000000e-01, double noundef 0.000000e+00)
  %343 = invoke { double, double } @_ZStmiIdESt7complexIT_ERKS2_S4_(ptr noundef nonnull align 8 dereferenceable(16) %40, ptr noundef nonnull align 8 dereferenceable(16) %41)
          to label %344 unwind label %356

344:                                              ; preds = %338
  %345 = extractvalue { double, double } %343, 0
  store double %345, ptr %39, align 8
  %346 = getelementptr inbounds i8, ptr %39, i64 8
  %347 = extractvalue { double, double } %343, 1
  store double %347, ptr %346, align 8
  %348 = call noundef double @_ZNKSt7complexIdE4realB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(16) %39)
  %349 = call noundef double @_ZSt3absd(double noundef %348)
  %350 = fcmp ogt double %349, 1.000000e-05
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %41) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %40) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %39) #5
  br i1 %350, label %351, label %363

351:                                              ; preds = %344
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %42) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %43) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %43) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %42, ptr noundef nonnull @.str.106, ptr noundef nonnull align 1 dereferenceable(1) %43)
          to label %352 unwind label %358

352:                                              ; preds = %351
  invoke void @_Z10removeFileRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(32) %42)
          to label %353 unwind label %360

353:                                              ; preds = %352
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %42) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %43) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %43) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %42) #5
  br label %371

354:                                              ; preds = %336, %329
  %355 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %38) #5
  br label %372

356:                                              ; preds = %338
  %357 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %41) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %40) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %39) #5
  br label %372

358:                                              ; preds = %351
  %359 = landingpad { ptr, i32 }
          cleanup
  br label %362

360:                                              ; preds = %352
  %361 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %42) #5
  br label %362

362:                                              ; preds = %360, %358
  %.pn68 = phi { ptr, i32 } [ %361, %360 ], [ %359, %358 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %43) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %43) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %42) #5
  br label %372

363:                                              ; preds = %344
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %44) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %45) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %45) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %44, ptr noundef nonnull @.str.106, ptr noundef nonnull align 1 dereferenceable(1) %45)
          to label %364 unwind label %366

364:                                              ; preds = %363
  invoke void @_Z10removeFileRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(32) %44)
          to label %365 unwind label %368

365:                                              ; preds = %364
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %44) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %45) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %45) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %44) #5
  br label %371

366:                                              ; preds = %363
  %367 = landingpad { ptr, i32 }
          cleanup
  br label %370

368:                                              ; preds = %364
  %369 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %44) #5
  br label %370

370:                                              ; preds = %368, %366
  %.pn66 = phi { ptr, i32 } [ %369, %368 ], [ %367, %366 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %45) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %45) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %44) #5
  br label %372

371:                                              ; preds = %365, %353, %305, %232, %138
  %.052 = phi i1 [ false, %138 ], [ false, %232 ], [ false, %353 ], [ true, %365 ], [ false, %305 ]
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %8) #5
  call void @llvm.lifetime.end.p0(i64 392, ptr nonnull %8) #5
  call void @_ZN6qtorch16ContractionToolsD2Ev(ptr noundef nonnull align 8 dereferenceable(10128) %3) #5
  call void @llvm.lifetime.end.p0(i64 10128, ptr nonnull %3) #5
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248) %2) #5
  call void @llvm.lifetime.end.p0(i64 512, ptr nonnull %2) #5
  ret i1 %.052

372:                                              ; preds = %370, %362, %356, %354, %320, %314, %308, %306, %272, %268, %247, %241, %240, %198, %166, %155, %149, %148, %139, %104
  %.pn76 = phi { ptr, i32 } [ %105, %104 ], [ %.pn74, %155 ], [ %199, %198 ], [ %.pn72, %247 ], [ %273, %272 ], [ %321, %320 ], [ %.pn68, %362 ], [ %.pn66, %370 ], [ %357, %356 ], [ %355, %354 ], [ %140, %139 ], [ %.pn70, %314 ], [ %309, %308 ], [ %307, %306 ], [ %.pn63.pn, %268 ], [ %242, %241 ], [ %.pn60.pn, %240 ], [ %.pn58, %166 ], [ %150, %149 ], [ %.pn55.pn, %148 ]
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %8) #5
  br label %373

373:                                              ; preds = %372, %71
  %.pn76.pn = phi { ptr, i32 } [ %.pn76, %372 ], [ %72, %71 ]
  call void @llvm.lifetime.end.p0(i64 392, ptr nonnull %8) #5
  br label %374

374:                                              ; preds = %373, %69
  %.pn76.pn.pn = phi { ptr, i32 } [ %.pn76.pn, %373 ], [ %70, %69 ]
  call void @_ZN6qtorch16ContractionToolsD2Ev(ptr noundef nonnull align 8 dereferenceable(10128) %3) #5
  br label %375

375:                                              ; preds = %374, %68
  %.pn76.pn.pn.pn = phi { ptr, i32 } [ %.pn76.pn.pn, %374 ], [ %.pn.pn, %68 ]
  call void @llvm.lifetime.end.p0(i64 10128, ptr nonnull %3) #5
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248) %2) #5
  call void @llvm.lifetime.end.p0(i64 512, ptr nonnull %2) #5
  resume { ptr, i32 } %.pn76.pn.pn.pn
}

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

; 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 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}
!7 = distinct !{!7, !6}


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