; LLVM IR from VAR-solutions/Algorithms :: Graphs/Minimum Spanning Tree/C++/data-structures (LinkedGraph)

; 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::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::__cxx11::basic_stringstream" = type { %"class.std::basic_iostream.base", %"class.std::__cxx11::basic_stringbuf", %"class.std::basic_ios" }
%"class.std::basic_iostream.base" = type { %"class.std::basic_istream.base", %"class.std::basic_ostream.base" }
%"class.std::basic_istream.base" = type { ptr, i64 }
%"class.std::basic_ostream.base" = type { ptr }
%"class.std::__cxx11::basic_stringbuf" = type { %"class.std::basic_streambuf", i32, %"class.std::__cxx11::basic_string" }
%"class.std::basic_streambuf" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, %"class.std::locale" }
%"class.std::locale" = type { ptr }
%"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.LinkedGraph = type { ptr }
%class.LinkedGraphEdge = type { i32, i32, i32 }

@.str = external hidden unnamed_addr constant [4 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [2 x i8], align 1

declare i32 @__gxx_personality_v0(...)

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

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

declare noundef i32 @_ZN9ArrayListIP10LinkedListIP15LinkedGraphEdgeEE7getSizeEv(ptr noundef nonnull align 8 dereferenceable(12)) #1

declare noundef ptr @_ZN9ArrayListIP10LinkedListIP15LinkedGraphEdgeEE3getEi(ptr noundef nonnull align 8 dereferenceable(12), i32 noundef) #1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11LinkedGraph8toStringB5cxx11Ev(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8 %0, ptr noundef nonnull align 8 dereferenceable(8) %1) #2 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca %"class.std::__cxx11::basic_stringstream", align 8
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca %"class.std::__cxx11::basic_string", align 8
  %11 = alloca i32, align 4
  %12 = alloca %"class.std::__cxx11::basic_string", align 8
  %13 = alloca %"class.std::__cxx11::basic_string", align 8
  %14 = alloca %"class.std::__cxx11::basic_string", align 8
  store ptr %0, ptr %3, align 8
  store ptr %1, ptr %4, align 8, !tbaa !5
  %15 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 392, ptr %5) #6
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(128) %5)
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  store i32 0, ptr %6, align 4, !tbaa !9
  br label %16

16:                                               ; preds = %148, %2
  %17 = load i32, ptr %6, align 4, !tbaa !9
  %18 = getelementptr inbounds %class.LinkedGraph, ptr %15, i32 0, i32 0
  %19 = load ptr, ptr %18, align 8, !tbaa !11
  %20 = invoke noundef i32 @_ZN9ArrayListIP10LinkedListIP15LinkedGraphEdgeEE7getSizeEv(ptr noundef nonnull align 8 dereferenceable(12) %19)
          to label %21 unwind label %24

21:                                               ; preds = %16
  %22 = icmp slt i32 %17, %20
  br i1 %22, label %28, label %23

23:                                               ; preds = %21
  store i32 2, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  br label %152

24:                                               ; preds = %144, %16
  %25 = landingpad { ptr, i32 }
          cleanup
  %26 = extractvalue { ptr, i32 } %25, 0
  store ptr %26, ptr %7, align 8
  %27 = extractvalue { ptr, i32 } %25, 1
  store i32 %27, ptr %8, align 4
  br label %151

28:                                               ; preds = %21
  %29 = getelementptr inbounds i8, ptr %5, i64 16
  call void @llvm.lifetime.start.p0(i64 32, ptr %10) #6
  %30 = load i32, ptr %6, align 4, !tbaa !9
  call void @_ZNSt7__cxx119to_stringEi(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %10, i32 noundef %30) #6
  %31 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(8) %29, ptr noundef nonnull align 8 dereferenceable(32) %10)
          to label %32 unwind label %46

32:                                               ; preds = %28
  %33 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %31, ptr noundef @.str)
          to label %34 unwind label %46

34:                                               ; preds = %32
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %10) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  store i32 0, ptr %11, align 4, !tbaa !9
  br label %35

35:                                               ; preds = %113, %34
  %36 = load i32, ptr %11, align 4, !tbaa !9
  %37 = getelementptr inbounds %class.LinkedGraph, ptr %15, i32 0, i32 0
  %38 = load ptr, ptr %37, align 8, !tbaa !11
  %39 = load i32, ptr %6, align 4, !tbaa !9
  %40 = invoke noundef ptr @_ZN9ArrayListIP10LinkedListIP15LinkedGraphEdgeEE3getEi(ptr noundef nonnull align 8 dereferenceable(12) %38, i32 noundef %39)
          to label %41 unwind label %50

41:                                               ; preds = %35
  %42 = invoke noundef i32 @_ZN10LinkedListIP15LinkedGraphEdgeE7getSizeEv(ptr noundef nonnull align 8 dereferenceable(20) %40)
          to label %43 unwind label %50

43:                                               ; preds = %41
  %44 = icmp slt i32 %36, %42
  br i1 %44, label %54, label %45

45:                                               ; preds = %43
  store i32 5, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  br label %144

46:                                               ; preds = %32, %28
  %47 = landingpad { ptr, i32 }
          cleanup
  %48 = extractvalue { ptr, i32 } %47, 0
  store ptr %48, ptr %7, align 8
  %49 = extractvalue { ptr, i32 } %47, 1
  store i32 %49, ptr %8, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %10) #6
  br label %151

50:                                               ; preds = %109, %93, %77, %61, %57, %41, %35
  %51 = landingpad { ptr, i32 }
          cleanup
  %52 = extractvalue { ptr, i32 } %51, 0
  store ptr %52, ptr %7, align 8
  %53 = extractvalue { ptr, i32 } %51, 1
  store i32 %53, ptr %8, align 4
  br label %143

54:                                               ; preds = %43
  %55 = load i32, ptr %11, align 4, !tbaa !9
  %56 = icmp sgt i32 %55, 0
  br i1 %56, label %57, label %61

57:                                               ; preds = %54
  %58 = getelementptr inbounds i8, ptr %5, i64 16
  %59 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %58, ptr noundef @.str.1)
          to label %60 unwind label %50

60:                                               ; preds = %57
  br label %61

61:                                               ; preds = %60, %54
  %62 = getelementptr inbounds i8, ptr %5, i64 16
  %63 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %62, ptr noundef @.str.2)
          to label %64 unwind label %50

64:                                               ; preds = %61
  %65 = getelementptr inbounds i8, ptr %5, i64 16
  call void @llvm.lifetime.start.p0(i64 32, ptr %12) #6
  %66 = getelementptr inbounds %class.LinkedGraph, ptr %15, i32 0, i32 0
  %67 = load ptr, ptr %66, align 8, !tbaa !11
  %68 = load i32, ptr %6, align 4, !tbaa !9
  %69 = invoke noundef ptr @_ZN9ArrayListIP10LinkedListIP15LinkedGraphEdgeEE3getEi(ptr noundef nonnull align 8 dereferenceable(12) %67, i32 noundef %68)
          to label %70 unwind label %116

70:                                               ; preds = %64
  %71 = load i32, ptr %11, align 4, !tbaa !9
  %72 = invoke noundef ptr @_ZN10LinkedListIP15LinkedGraphEdgeE3getEi(ptr noundef nonnull align 8 dereferenceable(20) %69, i32 noundef %71)
          to label %73 unwind label %116

73:                                               ; preds = %70
  %74 = getelementptr inbounds %class.LinkedGraphEdge, ptr %72, i32 0, i32 0
  %75 = load i32, ptr %74, align 4, !tbaa !13
  call void @_ZNSt7__cxx119to_stringEi(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %12, i32 noundef %75) #6
  %76 = 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) %65, ptr noundef nonnull align 8 dereferenceable(32) %12)
          to label %77 unwind label %120

77:                                               ; preds = %73
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #6
  %78 = getelementptr inbounds i8, ptr %5, i64 16
  %79 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %78, ptr noundef @.str.3)
          to label %80 unwind label %50

80:                                               ; preds = %77
  %81 = getelementptr inbounds i8, ptr %5, i64 16
  call void @llvm.lifetime.start.p0(i64 32, ptr %13) #6
  %82 = getelementptr inbounds %class.LinkedGraph, ptr %15, i32 0, i32 0
  %83 = load ptr, ptr %82, align 8, !tbaa !11
  %84 = load i32, ptr %6, align 4, !tbaa !9
  %85 = invoke noundef ptr @_ZN9ArrayListIP10LinkedListIP15LinkedGraphEdgeEE3getEi(ptr noundef nonnull align 8 dereferenceable(12) %83, i32 noundef %84)
          to label %86 unwind label %125

86:                                               ; preds = %80
  %87 = load i32, ptr %11, align 4, !tbaa !9
  %88 = invoke noundef ptr @_ZN10LinkedListIP15LinkedGraphEdgeE3getEi(ptr noundef nonnull align 8 dereferenceable(20) %85, i32 noundef %87)
          to label %89 unwind label %125

89:                                               ; preds = %86
  %90 = getelementptr inbounds %class.LinkedGraphEdge, ptr %88, i32 0, i32 1
  %91 = load i32, ptr %90, align 4, !tbaa !15
  call void @_ZNSt7__cxx119to_stringEi(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %13, i32 noundef %91) #6
  %92 = 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) %81, ptr noundef nonnull align 8 dereferenceable(32) %13)
          to label %93 unwind label %129

93:                                               ; preds = %89
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %13) #6
  %94 = getelementptr inbounds i8, ptr %5, i64 16
  %95 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %94, ptr noundef @.str.1)
          to label %96 unwind label %50

96:                                               ; preds = %93
  %97 = getelementptr inbounds i8, ptr %5, i64 16
  call void @llvm.lifetime.start.p0(i64 32, ptr %14) #6
  %98 = getelementptr inbounds %class.LinkedGraph, ptr %15, i32 0, i32 0
  %99 = load ptr, ptr %98, align 8, !tbaa !11
  %100 = load i32, ptr %6, align 4, !tbaa !9
  %101 = invoke noundef ptr @_ZN9ArrayListIP10LinkedListIP15LinkedGraphEdgeEE3getEi(ptr noundef nonnull align 8 dereferenceable(12) %99, i32 noundef %100)
          to label %102 unwind label %134

102:                                              ; preds = %96
  %103 = load i32, ptr %11, align 4, !tbaa !9
  %104 = invoke noundef ptr @_ZN10LinkedListIP15LinkedGraphEdgeE3getEi(ptr noundef nonnull align 8 dereferenceable(20) %101, i32 noundef %103)
          to label %105 unwind label %134

105:                                              ; preds = %102
  %106 = getelementptr inbounds %class.LinkedGraphEdge, ptr %104, i32 0, i32 2
  %107 = load i32, ptr %106, align 4, !tbaa !16
  call void @_ZNSt7__cxx119to_stringEi(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %14, i32 noundef %107) #6
  %108 = 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) %97, ptr noundef nonnull align 8 dereferenceable(32) %14)
          to label %109 unwind label %138

109:                                              ; preds = %105
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %14) #6
  %110 = getelementptr inbounds i8, ptr %5, i64 16
  %111 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %110, ptr noundef @.str.4)
          to label %112 unwind label %50

112:                                              ; preds = %109
  br label %113

113:                                              ; preds = %112
  %114 = load i32, ptr %11, align 4, !tbaa !9
  %115 = add nsw i32 %114, 1
  store i32 %115, ptr %11, align 4, !tbaa !9
  br label %35, !llvm.loop !17

116:                                              ; preds = %70, %64
  %117 = landingpad { ptr, i32 }
          cleanup
  %118 = extractvalue { ptr, i32 } %117, 0
  store ptr %118, ptr %7, align 8
  %119 = extractvalue { ptr, i32 } %117, 1
  store i32 %119, ptr %8, align 4
  br label %124

120:                                              ; preds = %73
  %121 = landingpad { ptr, i32 }
          cleanup
  %122 = extractvalue { ptr, i32 } %121, 0
  store ptr %122, ptr %7, align 8
  %123 = extractvalue { ptr, i32 } %121, 1
  store i32 %123, ptr %8, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #6
  br label %124

124:                                              ; preds = %120, %116
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #6
  br label %143

125:                                              ; preds = %86, %80
  %126 = landingpad { ptr, i32 }
          cleanup
  %127 = extractvalue { ptr, i32 } %126, 0
  store ptr %127, ptr %7, align 8
  %128 = extractvalue { ptr, i32 } %126, 1
  store i32 %128, ptr %8, align 4
  br label %133

129:                                              ; preds = %89
  %130 = landingpad { ptr, i32 }
          cleanup
  %131 = extractvalue { ptr, i32 } %130, 0
  store ptr %131, ptr %7, align 8
  %132 = extractvalue { ptr, i32 } %130, 1
  store i32 %132, ptr %8, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #6
  br label %133

133:                                              ; preds = %129, %125
  call void @llvm.lifetime.end.p0(i64 32, ptr %13) #6
  br label %143

134:                                              ; preds = %102, %96
  %135 = landingpad { ptr, i32 }
          cleanup
  %136 = extractvalue { ptr, i32 } %135, 0
  store ptr %136, ptr %7, align 8
  %137 = extractvalue { ptr, i32 } %135, 1
  store i32 %137, ptr %8, align 4
  br label %142

138:                                              ; preds = %105
  %139 = landingpad { ptr, i32 }
          cleanup
  %140 = extractvalue { ptr, i32 } %139, 0
  store ptr %140, ptr %7, align 8
  %141 = extractvalue { ptr, i32 } %139, 1
  store i32 %141, ptr %8, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #6
  br label %142

142:                                              ; preds = %138, %134
  call void @llvm.lifetime.end.p0(i64 32, ptr %14) #6
  br label %143

143:                                              ; preds = %142, %133, %124, %50
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  br label %151

144:                                              ; preds = %45
  %145 = getelementptr inbounds i8, ptr %5, i64 16
  %146 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %145, ptr noundef @.str.5)
          to label %147 unwind label %24

147:                                              ; preds = %144
  br label %148

148:                                              ; preds = %147
  %149 = load i32, ptr %6, align 4, !tbaa !9
  %150 = add nsw i32 %149, 1
  store i32 %150, ptr %6, align 4, !tbaa !9
  br label %16, !llvm.loop !19

151:                                              ; preds = %143, %46, %24
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  br label %161

152:                                              ; preds = %23
  %153 = getelementptr inbounds i8, ptr %5, i64 16
  %154 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSo5flushEv(ptr noundef nonnull align 8 dereferenceable(8) %153)
          to label %155 unwind label %157

155:                                              ; preds = %152
  invoke void @_ZNKSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEE3strEv(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %0, ptr noundef nonnull align 8 dereferenceable(128) %5)
          to label %156 unwind label %157

156:                                              ; preds = %155
  store i32 1, ptr %9, align 4
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %5) #6
  call void @llvm.lifetime.end.p0(i64 392, ptr %5) #6
  ret void

157:                                              ; preds = %155, %152
  %158 = landingpad { ptr, i32 }
          cleanup
  %159 = extractvalue { ptr, i32 } %158, 0
  store ptr %159, ptr %7, align 8
  %160 = extractvalue { ptr, i32 } %158, 1
  store i32 %160, ptr %8, align 4
  br label %161

161:                                              ; preds = %157, %151
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %5) #6
  call void @llvm.lifetime.end.p0(i64 392, ptr %5) #6
  br label %162

162:                                              ; preds = %161
  %163 = load ptr, ptr %7, align 8
  %164 = load i32, ptr %8, align 4
  %165 = insertvalue { ptr, i32 } poison, ptr %163, 0
  %166 = insertvalue { ptr, i32 } %165, i32 %164, 1
  resume { ptr, i32 } %166
}

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

; 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) #3

; 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)) #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNSt7__cxx119to_stringEi(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, i32 noundef) #4

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

declare noundef i32 @_ZN10LinkedListIP15LinkedGraphEdgeE7getSizeEv(ptr noundef nonnull align 8 dereferenceable(20)) #1

declare noundef ptr @_ZN10LinkedListIP15LinkedGraphEdgeE3getEi(ptr noundef nonnull align 8 dereferenceable(20), i32 noundef) #1

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSo5flushEv(ptr noundef nonnull align 8 dereferenceable(8)) #1

; 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 nounwind uwtable
declare void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128)) unnamed_addr #5 align 2

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

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

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


; 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::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::__cxx11::basic_stringstream" = type { %"class.std::basic_iostream.base", %"class.std::__cxx11::basic_stringbuf", %"class.std::basic_ios" }
%"class.std::basic_iostream.base" = type { %"class.std::basic_istream.base", %"class.std::basic_ostream.base" }
%"class.std::basic_istream.base" = type { ptr, i64 }
%"class.std::basic_ostream.base" = type { ptr }
%"class.std::__cxx11::basic_stringbuf" = type { %"class.std::basic_streambuf", i32, %"class.std::__cxx11::basic_string" }
%"class.std::basic_streambuf" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, %"class.std::locale" }
%"class.std::locale" = type { ptr }
%"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 }

@.str = external hidden unnamed_addr constant [4 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [2 x i8], align 1

declare i32 @__gxx_personality_v0(...)

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

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

declare noundef i32 @_ZN9ArrayListIP10LinkedListIP15LinkedGraphEdgeEE7getSizeEv(ptr noundef nonnull align 8 dereferenceable(12)) local_unnamed_addr #1

declare noundef ptr @_ZN9ArrayListIP10LinkedListIP15LinkedGraphEdgeEE3getEi(ptr noundef nonnull align 8 dereferenceable(12), i32 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11LinkedGraph8toStringB5cxx11Ev(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8 %0, ptr nocapture noundef nonnull readonly align 8 dereferenceable(8) %1) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.std::__cxx11::basic_stringstream", align 8
  %4 = alloca %"class.std::__cxx11::basic_string", align 8
  %5 = alloca %"class.std::__cxx11::basic_string", align 8
  %6 = alloca %"class.std::__cxx11::basic_string", align 8
  %7 = alloca %"class.std::__cxx11::basic_string", align 8
  call void @llvm.lifetime.start.p0(i64 392, ptr nonnull %3) #6
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(128) %3)
  %8 = getelementptr inbounds i8, ptr %3, i64 16
  br label %9

9:                                                ; preds = %115, %2
  %.022 = phi i32 [ 0, %2 ], [ %116, %115 ]
  %10 = load ptr, ptr %1, align 8, !tbaa !5
  %11 = invoke noundef i32 @_ZN9ArrayListIP10LinkedListIP15LinkedGraphEdgeEE7getSizeEv(ptr noundef nonnull align 8 dereferenceable(12) %10)
          to label %12 unwind label %16

12:                                               ; preds = %9
  %13 = icmp slt i32 %.022, %11
  br i1 %13, label %18, label %14

14:                                               ; preds = %12
  %15 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSo5flushEv(ptr noundef nonnull align 8 dereferenceable(8) %8)
          to label %117 unwind label %119

16:                                               ; preds = %.loopexit33, %9
  %17 = landingpad { ptr, i32 }
          cleanup
  br label %121

18:                                               ; preds = %12
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #6
  call void @_ZNSt7__cxx119to_stringEi(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %4, i32 noundef %.022) #6
  %19 = 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) %8, ptr noundef nonnull align 8 dereferenceable(32) %4)
          to label %20 unwind label %69

20:                                               ; preds = %18
  %21 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %19, ptr noundef nonnull @.str)
          to label %.peel.begin unwind label %69

.peel.begin:                                      ; preds = %20
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #6
  %22 = load ptr, ptr %1, align 8, !tbaa !5
  %23 = invoke noundef ptr @_ZN9ArrayListIP10LinkedListIP15LinkedGraphEdgeEE3getEi(ptr noundef nonnull align 8 dereferenceable(12) %22, i32 noundef %.022)
          to label %24 unwind label %.loopexit.split-lp

24:                                               ; preds = %.peel.begin
  %25 = invoke noundef i32 @_ZN10LinkedListIP15LinkedGraphEdgeE7getSizeEv(ptr noundef nonnull align 8 dereferenceable(20) %23)
          to label %26 unwind label %.loopexit.split-lp

26:                                               ; preds = %24
  %27 = icmp sgt i32 %25, 0
  br i1 %27, label %28, label %.loopexit33

28:                                               ; preds = %26
  %29 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull @.str.2)
          to label %30 unwind label %.loopexit.split-lp

30:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #6
  %31 = load ptr, ptr %1, align 8, !tbaa !5
  %32 = invoke noundef ptr @_ZN9ArrayListIP10LinkedListIP15LinkedGraphEdgeEE3getEi(ptr noundef nonnull align 8 dereferenceable(12) %31, i32 noundef %.022)
          to label %33 unwind label %.loopexit.split-lp35

33:                                               ; preds = %30
  %34 = invoke noundef ptr @_ZN10LinkedListIP15LinkedGraphEdgeE3getEi(ptr noundef nonnull align 8 dereferenceable(20) %32, i32 noundef 0)
          to label %35 unwind label %.loopexit.split-lp35

35:                                               ; preds = %33
  %36 = load i32, ptr %34, align 4, !tbaa !10
  call void @_ZNSt7__cxx119to_stringEi(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %5, i32 noundef %36) #6
  %37 = 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) %8, ptr noundef nonnull align 8 dereferenceable(32) %5)
          to label %38 unwind label %.loopexit.split-lp40

38:                                               ; preds = %35
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #6
  %39 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull @.str.3)
          to label %40 unwind label %.loopexit.split-lp

40:                                               ; preds = %38
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #6
  %41 = load ptr, ptr %1, align 8, !tbaa !5
  %42 = invoke noundef ptr @_ZN9ArrayListIP10LinkedListIP15LinkedGraphEdgeEE3getEi(ptr noundef nonnull align 8 dereferenceable(12) %41, i32 noundef %.022)
          to label %43 unwind label %.loopexit.split-lp45

43:                                               ; preds = %40
  %44 = invoke noundef ptr @_ZN10LinkedListIP15LinkedGraphEdgeE3getEi(ptr noundef nonnull align 8 dereferenceable(20) %42, i32 noundef 0)
          to label %45 unwind label %.loopexit.split-lp45

45:                                               ; preds = %43
  %46 = getelementptr inbounds i8, ptr %44, i64 4
  %47 = load i32, ptr %46, align 4, !tbaa !13
  call void @_ZNSt7__cxx119to_stringEi(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %6, i32 noundef %47) #6
  %48 = 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) %8, ptr noundef nonnull align 8 dereferenceable(32) %6)
          to label %49 unwind label %.loopexit.split-lp50

49:                                               ; preds = %45
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #6
  %50 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull @.str.1)
          to label %51 unwind label %.loopexit.split-lp

51:                                               ; preds = %49
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #6
  %52 = load ptr, ptr %1, align 8, !tbaa !5
  %53 = invoke noundef ptr @_ZN9ArrayListIP10LinkedListIP15LinkedGraphEdgeEE3getEi(ptr noundef nonnull align 8 dereferenceable(12) %52, i32 noundef %.022)
          to label %54 unwind label %.loopexit.split-lp55

54:                                               ; preds = %51
  %55 = invoke noundef ptr @_ZN10LinkedListIP15LinkedGraphEdgeE3getEi(ptr noundef nonnull align 8 dereferenceable(20) %53, i32 noundef 0)
          to label %56 unwind label %.loopexit.split-lp55

56:                                               ; preds = %54
  %57 = getelementptr inbounds i8, ptr %55, i64 8
  %58 = load i32, ptr %57, align 4, !tbaa !14
  call void @_ZNSt7__cxx119to_stringEi(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %7, i32 noundef %58) #6
  %59 = 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) %8, ptr noundef nonnull align 8 dereferenceable(32) %7)
          to label %60 unwind label %.loopexit.split-lp60

60:                                               ; preds = %56
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #6
  %61 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull @.str.4)
          to label %.peel.next unwind label %.loopexit.split-lp

.peel.next:                                       ; preds = %60, %107
  %.0 = phi i32 [ %108, %107 ], [ 1, %60 ]
  %62 = load ptr, ptr %1, align 8, !tbaa !5
  %63 = invoke noundef ptr @_ZN9ArrayListIP10LinkedListIP15LinkedGraphEdgeEE3getEi(ptr noundef nonnull align 8 dereferenceable(12) %62, i32 noundef %.022)
          to label %64 unwind label %.loopexit

64:                                               ; preds = %.peel.next
  %65 = invoke noundef i32 @_ZN10LinkedListIP15LinkedGraphEdgeE7getSizeEv(ptr noundef nonnull align 8 dereferenceable(20) %63)
          to label %66 unwind label %.loopexit

66:                                               ; preds = %64
  %67 = icmp slt i32 %.0, %65
  br i1 %67, label %71, label %.loopexit33

.loopexit33:                                      ; preds = %66, %26
  %68 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull @.str.5)
          to label %115 unwind label %16

69:                                               ; preds = %20, %18
  %70 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #6
  br label %121

.loopexit:                                        ; preds = %.peel.next, %64, %71, %73, %83, %94, %105
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %121

.loopexit.split-lp:                               ; preds = %.peel.begin, %24, %28, %38, %49, %60
  %lpad.loopexit.split-lp = landingpad { ptr, i32 }
          cleanup
  br label %121

71:                                               ; preds = %66
  %72 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull @.str.1)
          to label %73 unwind label %.loopexit

73:                                               ; preds = %71
  %74 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull @.str.2)
          to label %75 unwind label %.loopexit

75:                                               ; preds = %73
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #6
  %76 = load ptr, ptr %1, align 8, !tbaa !5
  %77 = invoke noundef ptr @_ZN9ArrayListIP10LinkedListIP15LinkedGraphEdgeEE3getEi(ptr noundef nonnull align 8 dereferenceable(12) %76, i32 noundef %.022)
          to label %78 unwind label %.loopexit34

78:                                               ; preds = %75
  %79 = invoke noundef ptr @_ZN10LinkedListIP15LinkedGraphEdgeE3getEi(ptr noundef nonnull align 8 dereferenceable(20) %77, i32 noundef %.0)
          to label %80 unwind label %.loopexit34

80:                                               ; preds = %78
  %81 = load i32, ptr %79, align 4, !tbaa !10
  call void @_ZNSt7__cxx119to_stringEi(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %5, i32 noundef %81) #6
  %82 = 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) %8, ptr noundef nonnull align 8 dereferenceable(32) %5)
          to label %83 unwind label %.loopexit39

83:                                               ; preds = %80
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #6
  %84 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull @.str.3)
          to label %85 unwind label %.loopexit

85:                                               ; preds = %83
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #6
  %86 = load ptr, ptr %1, align 8, !tbaa !5
  %87 = invoke noundef ptr @_ZN9ArrayListIP10LinkedListIP15LinkedGraphEdgeEE3getEi(ptr noundef nonnull align 8 dereferenceable(12) %86, i32 noundef %.022)
          to label %88 unwind label %.loopexit44

88:                                               ; preds = %85
  %89 = invoke noundef ptr @_ZN10LinkedListIP15LinkedGraphEdgeE3getEi(ptr noundef nonnull align 8 dereferenceable(20) %87, i32 noundef %.0)
          to label %90 unwind label %.loopexit44

90:                                               ; preds = %88
  %91 = getelementptr inbounds i8, ptr %89, i64 4
  %92 = load i32, ptr %91, align 4, !tbaa !13
  call void @_ZNSt7__cxx119to_stringEi(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %6, i32 noundef %92) #6
  %93 = 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) %8, ptr noundef nonnull align 8 dereferenceable(32) %6)
          to label %94 unwind label %.loopexit49

94:                                               ; preds = %90
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #6
  %95 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull @.str.1)
          to label %96 unwind label %.loopexit

96:                                               ; preds = %94
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #6
  %97 = load ptr, ptr %1, align 8, !tbaa !5
  %98 = invoke noundef ptr @_ZN9ArrayListIP10LinkedListIP15LinkedGraphEdgeEE3getEi(ptr noundef nonnull align 8 dereferenceable(12) %97, i32 noundef %.022)
          to label %99 unwind label %.loopexit54

99:                                               ; preds = %96
  %100 = invoke noundef ptr @_ZN10LinkedListIP15LinkedGraphEdgeE3getEi(ptr noundef nonnull align 8 dereferenceable(20) %98, i32 noundef %.0)
          to label %101 unwind label %.loopexit54

101:                                              ; preds = %99
  %102 = getelementptr inbounds i8, ptr %100, i64 8
  %103 = load i32, ptr %102, align 4, !tbaa !14
  call void @_ZNSt7__cxx119to_stringEi(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %7, i32 noundef %103) #6
  %104 = 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) %8, ptr noundef nonnull align 8 dereferenceable(32) %7)
          to label %105 unwind label %.loopexit59

105:                                              ; preds = %101
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #6
  %106 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull @.str.4)
          to label %107 unwind label %.loopexit

107:                                              ; preds = %105
  %108 = add nuw nsw i32 %.0, 1
  br label %.peel.next, !llvm.loop !15

.loopexit34:                                      ; preds = %75, %78
  %lpad.loopexit36 = landingpad { ptr, i32 }
          cleanup
  br label %110

.loopexit.split-lp35:                             ; preds = %30, %33
  %lpad.loopexit.split-lp37 = landingpad { ptr, i32 }
          cleanup
  br label %110

.loopexit39:                                      ; preds = %80
  %lpad.loopexit41 = landingpad { ptr, i32 }
          cleanup
  br label %109

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

109:                                              ; preds = %.loopexit.split-lp40, %.loopexit39
  %lpad.phi43 = phi { ptr, i32 } [ %lpad.loopexit41, %.loopexit39 ], [ %lpad.loopexit.split-lp42, %.loopexit.split-lp40 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #6
  br label %110

110:                                              ; preds = %.loopexit34, %.loopexit.split-lp35, %109
  %.pn = phi { ptr, i32 } [ %lpad.phi43, %109 ], [ %lpad.loopexit36, %.loopexit34 ], [ %lpad.loopexit.split-lp37, %.loopexit.split-lp35 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #6
  br label %121

.loopexit44:                                      ; preds = %85, %88
  %lpad.loopexit46 = landingpad { ptr, i32 }
          cleanup
  br label %112

.loopexit.split-lp45:                             ; preds = %40, %43
  %lpad.loopexit.split-lp47 = landingpad { ptr, i32 }
          cleanup
  br label %112

.loopexit49:                                      ; preds = %90
  %lpad.loopexit51 = landingpad { ptr, i32 }
          cleanup
  br label %111

.loopexit.split-lp50:                             ; preds = %45
  %lpad.loopexit.split-lp52 = landingpad { ptr, i32 }
          cleanup
  br label %111

111:                                              ; preds = %.loopexit.split-lp50, %.loopexit49
  %lpad.phi53 = phi { ptr, i32 } [ %lpad.loopexit51, %.loopexit49 ], [ %lpad.loopexit.split-lp52, %.loopexit.split-lp50 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #6
  br label %112

112:                                              ; preds = %.loopexit44, %.loopexit.split-lp45, %111
  %.pn24 = phi { ptr, i32 } [ %lpad.phi53, %111 ], [ %lpad.loopexit46, %.loopexit44 ], [ %lpad.loopexit.split-lp47, %.loopexit.split-lp45 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #6
  br label %121

.loopexit54:                                      ; preds = %96, %99
  %lpad.loopexit56 = landingpad { ptr, i32 }
          cleanup
  br label %114

.loopexit.split-lp55:                             ; preds = %51, %54
  %lpad.loopexit.split-lp57 = landingpad { ptr, i32 }
          cleanup
  br label %114

.loopexit59:                                      ; preds = %101
  %lpad.loopexit61 = landingpad { ptr, i32 }
          cleanup
  br label %113

.loopexit.split-lp60:                             ; preds = %56
  %lpad.loopexit.split-lp62 = landingpad { ptr, i32 }
          cleanup
  br label %113

113:                                              ; preds = %.loopexit.split-lp60, %.loopexit59
  %lpad.phi63 = phi { ptr, i32 } [ %lpad.loopexit61, %.loopexit59 ], [ %lpad.loopexit.split-lp62, %.loopexit.split-lp60 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #6
  br label %114

114:                                              ; preds = %.loopexit54, %.loopexit.split-lp55, %113
  %.pn26 = phi { ptr, i32 } [ %lpad.phi63, %113 ], [ %lpad.loopexit56, %.loopexit54 ], [ %lpad.loopexit.split-lp57, %.loopexit.split-lp55 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #6
  br label %121

115:                                              ; preds = %.loopexit33
  %116 = add nuw nsw i32 %.022, 1
  br label %9, !llvm.loop !18

117:                                              ; preds = %14
  invoke void @_ZNKSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEE3strEv(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %0, ptr noundef nonnull align 8 dereferenceable(128) %3)
          to label %118 unwind label %119

118:                                              ; preds = %117
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %3) #6
  call void @llvm.lifetime.end.p0(i64 392, ptr nonnull %3) #6
  ret void

119:                                              ; preds = %117, %14
  %120 = landingpad { ptr, i32 }
          cleanup
  br label %121

121:                                              ; preds = %.loopexit, %.loopexit.split-lp, %16, %69, %114, %112, %110, %119
  %.pn28.pn.pn = phi { ptr, i32 } [ %120, %119 ], [ %17, %16 ], [ %70, %69 ], [ %.pn26, %114 ], [ %.pn24, %112 ], [ %.pn, %110 ], [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ]
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %3) #6
  call void @llvm.lifetime.end.p0(i64 392, ptr nonnull %3) #6
  resume { ptr, i32 } %.pn28.pn.pn
}

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

; 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 #3

; 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 #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNSt7__cxx119to_stringEi(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, i32 noundef) local_unnamed_addr #4

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

declare noundef i32 @_ZN10LinkedListIP15LinkedGraphEdgeE7getSizeEv(ptr noundef nonnull align 8 dereferenceable(20)) local_unnamed_addr #1

declare noundef ptr @_ZN10LinkedListIP15LinkedGraphEdgeE3getEi(ptr noundef nonnull align 8 dereferenceable(20), i32 noundef) local_unnamed_addr #1

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSo5flushEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1

; 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 nounwind uwtable
declare void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128)) unnamed_addr #5 align 2

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

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

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


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopFullUnrollPass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SCCPPass,SROAPass,SimplifyCFGPass