; LLVM IR from sbshah97/DS-Algo-Handbook :: labs/lab11/bellman_ford (bellman_stl)

; 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"

%"struct.std::_List_iterator" = type { ptr }
%"struct.std::pair" = type { i32, i32 }

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #0 align 2

; Function Attrs: mustprogress nounwind uwtable
define dso_local noundef i32 @_Z11bellmanFordSt6vectorINSt7__cxx114listISt4pairIiiESaIS3_EEESaIS5_EEiiRS_IS3_S4_E(ptr noundef %0, i32 noundef %1, i32 noundef %2, ptr noundef nonnull align 8 dereferenceable(24) %3) #0 {
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca %"struct.std::_List_iterator", align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca %"struct.std::_List_iterator", align 8
  %15 = alloca %"struct.std::_List_iterator", align 8
  %16 = alloca %"struct.std::_List_iterator", align 8
  %17 = alloca %"struct.std::_List_iterator", align 8
  %18 = alloca i32, align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store i32 %1, ptr %7, align 4, !tbaa !9
  store i32 %2, ptr %8, align 4, !tbaa !9
  store ptr %3, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #3
  call void @_ZNSt14_List_iteratorISt4pairIiiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %10) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #3
  store i32 0, ptr %11, align 4, !tbaa !9
  br label %19

19:                                               ; preds = %34, %4
  %20 = load i32, ptr %11, align 4, !tbaa !9
  %21 = load i32, ptr %7, align 4, !tbaa !9
  %22 = icmp sle i32 %20, %21
  br i1 %22, label %23, label %37

23:                                               ; preds = %19
  %24 = load ptr, ptr %9, align 8, !tbaa !5
  %25 = load i32, ptr %11, align 4, !tbaa !9
  %26 = sext i32 %25 to i64
  %27 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %24, i64 noundef %26) #3
  %28 = getelementptr inbounds %"struct.std::pair", ptr %27, i32 0, i32 0
  store i32 2147483647, ptr %28, align 4, !tbaa !11
  %29 = load ptr, ptr %9, align 8, !tbaa !5
  %30 = load i32, ptr %11, align 4, !tbaa !9
  %31 = sext i32 %30 to i64
  %32 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %29, i64 noundef %31) #3
  %33 = getelementptr inbounds %"struct.std::pair", ptr %32, i32 0, i32 1
  store i32 -1, ptr %33, align 4, !tbaa !13
  br label %34

34:                                               ; preds = %23
  %35 = load i32, ptr %11, align 4, !tbaa !9
  %36 = add nsw i32 %35, 1
  store i32 %36, ptr %11, align 4, !tbaa !9
  br label %19, !llvm.loop !14

37:                                               ; preds = %19
  %38 = load ptr, ptr %9, align 8, !tbaa !5
  %39 = load i32, ptr %8, align 4, !tbaa !9
  %40 = sext i32 %39 to i64
  %41 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %38, i64 noundef %40) #3
  %42 = getelementptr inbounds %"struct.std::pair", ptr %41, i32 0, i32 0
  store i32 0, ptr %42, align 4, !tbaa !11
  %43 = load ptr, ptr %9, align 8, !tbaa !5
  %44 = load i32, ptr %8, align 4, !tbaa !9
  %45 = sext i32 %44 to i64
  %46 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %43, i64 noundef %45) #3
  %47 = getelementptr inbounds %"struct.std::pair", ptr %46, i32 0, i32 1
  store i32 0, ptr %47, align 4, !tbaa !13
  store i32 1, ptr %11, align 4, !tbaa !9
  br label %48

48:                                               ; preds = %134, %37
  %49 = load i32, ptr %11, align 4, !tbaa !9
  %50 = load i32, ptr %7, align 4, !tbaa !9
  %51 = sub nsw i32 %50, 1
  %52 = icmp sle i32 %49, %51
  br i1 %52, label %53, label %137

53:                                               ; preds = %48
  store i32 1, ptr %12, align 4, !tbaa !9
  br label %54

54:                                               ; preds = %130, %53
  %55 = load i32, ptr %12, align 4, !tbaa !9
  %56 = load i32, ptr %7, align 4, !tbaa !9
  %57 = icmp sle i32 %55, %56
  br i1 %57, label %58, label %133

58:                                               ; preds = %54
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #3
  %59 = load i32, ptr %12, align 4, !tbaa !9
  %60 = sext i32 %59 to i64
  %61 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorINSt7__cxx114listISt4pairIiiESaIS3_EEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %60) #3
  %62 = call ptr @_ZNSt7__cxx114listISt4pairIiiESaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %61) #3
  %63 = getelementptr inbounds %"struct.std::_List_iterator", ptr %14, i32 0, i32 0
  store ptr %62, ptr %63, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %10, ptr align 8 %14, i64 8, i1 false), !tbaa.struct !16
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #3
  br label %64

64:                                               ; preds = %127, %79, %58
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #3
  %65 = load i32, ptr %12, align 4, !tbaa !9
  %66 = sext i32 %65 to i64
  %67 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorINSt7__cxx114listISt4pairIiiESaIS3_EEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %66) #3
  %68 = call ptr @_ZNSt7__cxx114listISt4pairIiiESaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %67) #3
  %69 = getelementptr inbounds %"struct.std::_List_iterator", ptr %15, i32 0, i32 0
  store ptr %68, ptr %69, align 8
  %70 = call noundef zeroext i1 @_ZStneRKSt14_List_iteratorISt4pairIiiEES4_(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 8 dereferenceable(8) %15) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #3
  br i1 %70, label %71, label %129

71:                                               ; preds = %64
  %72 = load ptr, ptr %9, align 8, !tbaa !5
  %73 = load i32, ptr %12, align 4, !tbaa !9
  %74 = sext i32 %73 to i64
  %75 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %72, i64 noundef %74) #3
  %76 = getelementptr inbounds %"struct.std::pair", ptr %75, i32 0, i32 0
  %77 = load i32, ptr %76, align 4, !tbaa !11
  %78 = icmp eq i32 %77, 2147483647
  br i1 %78, label %79, label %81

79:                                               ; preds = %71
  %80 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt14_List_iteratorISt4pairIiiEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %10) #3
  br label %64, !llvm.loop !17

81:                                               ; preds = %71
  %82 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt14_List_iteratorISt4pairIiiEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %10) #3
  %83 = getelementptr inbounds %"struct.std::pair", ptr %82, i32 0, i32 1
  %84 = load i32, ptr %83, align 4, !tbaa !13
  %85 = load ptr, ptr %9, align 8, !tbaa !5
  %86 = load i32, ptr %12, align 4, !tbaa !9
  %87 = sext i32 %86 to i64
  %88 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %85, i64 noundef %87) #3
  %89 = getelementptr inbounds %"struct.std::pair", ptr %88, i32 0, i32 0
  %90 = load i32, ptr %89, align 4, !tbaa !11
  %91 = add nsw i32 %84, %90
  %92 = load ptr, ptr %9, align 8, !tbaa !5
  %93 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt14_List_iteratorISt4pairIiiEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %10) #3
  %94 = getelementptr inbounds %"struct.std::pair", ptr %93, i32 0, i32 0
  %95 = load i32, ptr %94, align 4, !tbaa !11
  %96 = sext i32 %95 to i64
  %97 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %92, i64 noundef %96) #3
  %98 = getelementptr inbounds %"struct.std::pair", ptr %97, i32 0, i32 0
  %99 = load i32, ptr %98, align 4, !tbaa !11
  %100 = icmp slt i32 %91, %99
  br i1 %100, label %101, label %127

101:                                              ; preds = %81
  %102 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt14_List_iteratorISt4pairIiiEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %10) #3
  %103 = getelementptr inbounds %"struct.std::pair", ptr %102, i32 0, i32 1
  %104 = load i32, ptr %103, align 4, !tbaa !13
  %105 = load ptr, ptr %9, align 8, !tbaa !5
  %106 = load i32, ptr %12, align 4, !tbaa !9
  %107 = sext i32 %106 to i64
  %108 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %105, i64 noundef %107) #3
  %109 = getelementptr inbounds %"struct.std::pair", ptr %108, i32 0, i32 0
  %110 = load i32, ptr %109, align 4, !tbaa !11
  %111 = add nsw i32 %104, %110
  %112 = load ptr, ptr %9, align 8, !tbaa !5
  %113 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt14_List_iteratorISt4pairIiiEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %10) #3
  %114 = getelementptr inbounds %"struct.std::pair", ptr %113, i32 0, i32 0
  %115 = load i32, ptr %114, align 4, !tbaa !11
  %116 = sext i32 %115 to i64
  %117 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %112, i64 noundef %116) #3
  %118 = getelementptr inbounds %"struct.std::pair", ptr %117, i32 0, i32 0
  store i32 %111, ptr %118, align 4, !tbaa !11
  %119 = load i32, ptr %12, align 4, !tbaa !9
  %120 = load ptr, ptr %9, align 8, !tbaa !5
  %121 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt14_List_iteratorISt4pairIiiEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %10) #3
  %122 = getelementptr inbounds %"struct.std::pair", ptr %121, i32 0, i32 0
  %123 = load i32, ptr %122, align 4, !tbaa !11
  %124 = sext i32 %123 to i64
  %125 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %120, i64 noundef %124) #3
  %126 = getelementptr inbounds %"struct.std::pair", ptr %125, i32 0, i32 1
  store i32 %119, ptr %126, align 4, !tbaa !13
  br label %127

127:                                              ; preds = %101, %81
  %128 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt14_List_iteratorISt4pairIiiEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %10) #3
  br label %64, !llvm.loop !17

129:                                              ; preds = %64
  br label %130

130:                                              ; preds = %129
  %131 = load i32, ptr %12, align 4, !tbaa !9
  %132 = add nsw i32 %131, 1
  store i32 %132, ptr %12, align 4, !tbaa !9
  br label %54, !llvm.loop !18

133:                                              ; preds = %54
  br label %134

134:                                              ; preds = %133
  %135 = load i32, ptr %11, align 4, !tbaa !9
  %136 = add nsw i32 %135, 1
  store i32 %136, ptr %11, align 4, !tbaa !9
  br label %48, !llvm.loop !19

137:                                              ; preds = %48
  store i32 1, ptr %12, align 4, !tbaa !9
  br label %138

138:                                              ; preds = %180, %137
  %139 = load i32, ptr %12, align 4, !tbaa !9
  %140 = load i32, ptr %7, align 4, !tbaa !9
  %141 = icmp sle i32 %139, %140
  br i1 %141, label %142, label %183

142:                                              ; preds = %138
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #3
  %143 = load i32, ptr %12, align 4, !tbaa !9
  %144 = sext i32 %143 to i64
  %145 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorINSt7__cxx114listISt4pairIiiESaIS3_EEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %144) #3
  %146 = call ptr @_ZNSt7__cxx114listISt4pairIiiESaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %145) #3
  %147 = getelementptr inbounds %"struct.std::_List_iterator", ptr %16, i32 0, i32 0
  store ptr %146, ptr %147, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %10, ptr align 8 %16, i64 8, i1 false), !tbaa.struct !16
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #3
  br label %148

148:                                              ; preds = %177, %142
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #3
  %149 = load i32, ptr %12, align 4, !tbaa !9
  %150 = sext i32 %149 to i64
  %151 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorINSt7__cxx114listISt4pairIiiESaIS3_EEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %150) #3
  %152 = call ptr @_ZNSt7__cxx114listISt4pairIiiESaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %151) #3
  %153 = getelementptr inbounds %"struct.std::_List_iterator", ptr %17, i32 0, i32 0
  store ptr %152, ptr %153, align 8
  %154 = call noundef zeroext i1 @_ZStneRKSt14_List_iteratorISt4pairIiiEES4_(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 8 dereferenceable(8) %17) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #3
  br i1 %154, label %155, label %179

155:                                              ; preds = %148
  %156 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt14_List_iteratorISt4pairIiiEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %10) #3
  %157 = getelementptr inbounds %"struct.std::pair", ptr %156, i32 0, i32 1
  %158 = load i32, ptr %157, align 4, !tbaa !13
  %159 = load ptr, ptr %9, align 8, !tbaa !5
  %160 = load i32, ptr %12, align 4, !tbaa !9
  %161 = sext i32 %160 to i64
  %162 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %159, i64 noundef %161) #3
  %163 = getelementptr inbounds %"struct.std::pair", ptr %162, i32 0, i32 0
  %164 = load i32, ptr %163, align 4, !tbaa !11
  %165 = add nsw i32 %158, %164
  %166 = load ptr, ptr %9, align 8, !tbaa !5
  %167 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt14_List_iteratorISt4pairIiiEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %10) #3
  %168 = getelementptr inbounds %"struct.std::pair", ptr %167, i32 0, i32 0
  %169 = load i32, ptr %168, align 4, !tbaa !11
  %170 = sext i32 %169 to i64
  %171 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %166, i64 noundef %170) #3
  %172 = getelementptr inbounds %"struct.std::pair", ptr %171, i32 0, i32 0
  %173 = load i32, ptr %172, align 4, !tbaa !11
  %174 = icmp slt i32 %165, %173
  br i1 %174, label %175, label %177

175:                                              ; preds = %155
  %176 = load i32, ptr %12, align 4, !tbaa !9
  store i32 %176, ptr %5, align 4
  store i32 1, ptr %18, align 4
  br label %184

177:                                              ; preds = %155
  %178 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt14_List_iteratorISt4pairIiiEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %10) #3
  br label %148, !llvm.loop !20

179:                                              ; preds = %148
  br label %180

180:                                              ; preds = %179
  %181 = load i32, ptr %12, align 4, !tbaa !9
  %182 = add nsw i32 %181, 1
  store i32 %182, ptr %12, align 4, !tbaa !9
  br label %138, !llvm.loop !21

183:                                              ; preds = %138
  store i32 -1, ptr %5, align 4
  store i32 1, ptr %18, align 4
  br label %184

184:                                              ; preds = %183, %175
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  %185 = load i32, ptr %5, align 4
  ret i32 %185
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt14_List_iteratorISt4pairIiiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #0 align 2

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

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

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

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

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

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

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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, !10, i64 0}
!12 = !{!"_ZTSSt4pairIiiE", !10, i64 0, !10, i64 4}
!13 = !{!12, !10, i64 4}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = !{i64 0, i64 8, !5}
!17 = distinct !{!17, !15}
!18 = distinct !{!18, !15}
!19 = distinct !{!19, !15}
!20 = distinct !{!20, !15}
!21 = distinct !{!21, !15}


; 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"

%"struct.std::_List_iterator" = type { ptr }

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

; Function Attrs: mustprogress nounwind uwtable
define dso_local noundef i32 @_Z11bellmanFordSt6vectorINSt7__cxx114listISt4pairIiiESaIS3_EEESaIS5_EEiiRS_IS3_S4_E(ptr noundef %0, i32 noundef %1, i32 noundef %2, ptr noundef nonnull align 8 dereferenceable(24) %3) local_unnamed_addr #0 {
  %5 = alloca %"struct.std::_List_iterator", align 8
  %6 = alloca %"struct.std::_List_iterator", align 8
  %7 = alloca %"struct.std::_List_iterator", align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #2
  call void @_ZNSt14_List_iteratorISt4pairIiiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %5) #2
  %.not49 = icmp slt i32 %1, 0
  br i1 %.not49, label %._crit_edge, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %4
  %8 = add nuw i32 %1, 1
  %wide.trip.count = zext i32 %8 to i64
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next, %.lr.ph ]
  %9 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %indvars.iv) #2
  store i32 2147483647, ptr %9, align 4, !tbaa !5
  %10 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %indvars.iv) #2
  %11 = getelementptr inbounds i8, ptr %10, i64 4
  store i32 -1, ptr %11, align 4, !tbaa !10
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !11

._crit_edge:                                      ; preds = %.lr.ph, %4
  %12 = sext i32 %2 to i64
  %13 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %12) #2
  store i32 0, ptr %13, align 4, !tbaa !5
  %14 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %12) #2
  %15 = getelementptr inbounds i8, ptr %14, i64 4
  store i32 0, ptr %15, align 4, !tbaa !10
  %.not43.not58 = icmp sgt i32 %1, 1
  br i1 %.not43.not58, label %.preheader47.preheader, label %.preheader

.preheader47.preheader:                           ; preds = %._crit_edge
  %16 = add nuw i32 %1, 1
  %wide.trip.count72 = zext i32 %16 to i64
  br label %.preheader47

.preheader47:                                     ; preds = %.preheader47.preheader, %._crit_edge57
  %.159 = phi i32 [ %61, %._crit_edge57 ], [ 1, %.preheader47.preheader ]
  br label %18

.preheader:                                       ; preds = %._crit_edge57, %._crit_edge
  %.not4463 = icmp slt i32 %1, 1
  br i1 %.not4463, label %.loopexit, label %.lr.ph65.preheader

.lr.ph65.preheader:                               ; preds = %.preheader
  %17 = add nuw i32 %1, 1
  %wide.trip.count78 = zext i32 %17 to i64
  br label %.lr.ph65

18:                                               ; preds = %.preheader47, %._crit_edge53
  %indvars.iv69 = phi i64 [ 1, %.preheader47 ], [ %indvars.iv.next70, %._crit_edge53 ]
  %19 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorINSt7__cxx114listISt4pairIiiESaIS3_EEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %indvars.iv69) #2
  %20 = call ptr @_ZNSt7__cxx114listISt4pairIiiESaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %19) #2
  store ptr %20, ptr %5, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #2
  %21 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorINSt7__cxx114listISt4pairIiiESaIS3_EEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %indvars.iv69) #2
  %22 = call ptr @_ZNSt7__cxx114listISt4pairIiiESaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %21) #2
  store ptr %22, ptr %6, align 8
  %23 = call noundef zeroext i1 @_ZStneRKSt14_List_iteratorISt4pairIiiEES4_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #2
  br i1 %23, label %.lr.ph52.preheader, label %._crit_edge53

.lr.ph52.preheader:                               ; preds = %18
  %24 = trunc nuw nsw i64 %indvars.iv69 to i32
  br label %.lr.ph52

.lr.ph52:                                         ; preds = %.lr.ph52.preheader, %.backedge
  %25 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %indvars.iv69) #2
  %26 = load i32, ptr %25, align 4, !tbaa !5
  %27 = icmp eq i32 %26, 2147483647
  br i1 %27, label %.backedge, label %32

.backedge:                                        ; preds = %.lr.ph52, %32, %45
  %28 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt14_List_iteratorISt4pairIiiEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #2
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #2
  %29 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorINSt7__cxx114listISt4pairIiiESaIS3_EEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %indvars.iv69) #2
  %30 = call ptr @_ZNSt7__cxx114listISt4pairIiiESaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %29) #2
  store ptr %30, ptr %6, align 8
  %31 = call noundef zeroext i1 @_ZStneRKSt14_List_iteratorISt4pairIiiEES4_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #2
  br i1 %31, label %.lr.ph52, label %._crit_edge53, !llvm.loop !15

32:                                               ; preds = %.lr.ph52
  %33 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt14_List_iteratorISt4pairIiiEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #2
  %34 = getelementptr inbounds i8, ptr %33, i64 4
  %35 = load i32, ptr %34, align 4, !tbaa !10
  %36 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %indvars.iv69) #2
  %37 = load i32, ptr %36, align 4, !tbaa !5
  %38 = add nsw i32 %37, %35
  %39 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt14_List_iteratorISt4pairIiiEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #2
  %40 = load i32, ptr %39, align 4, !tbaa !5
  %41 = sext i32 %40 to i64
  %42 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %41) #2
  %43 = load i32, ptr %42, align 4, !tbaa !5
  %44 = icmp slt i32 %38, %43
  br i1 %44, label %45, label %.backedge

45:                                               ; preds = %32
  %46 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt14_List_iteratorISt4pairIiiEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #2
  %47 = getelementptr inbounds i8, ptr %46, i64 4
  %48 = load i32, ptr %47, align 4, !tbaa !10
  %49 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %indvars.iv69) #2
  %50 = load i32, ptr %49, align 4, !tbaa !5
  %51 = add nsw i32 %50, %48
  %52 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt14_List_iteratorISt4pairIiiEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #2
  %53 = load i32, ptr %52, align 4, !tbaa !5
  %54 = sext i32 %53 to i64
  %55 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %54) #2
  store i32 %51, ptr %55, align 4, !tbaa !5
  %56 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt14_List_iteratorISt4pairIiiEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #2
  %57 = load i32, ptr %56, align 4, !tbaa !5
  %58 = sext i32 %57 to i64
  %59 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %58) #2
  %60 = getelementptr inbounds i8, ptr %59, i64 4
  store i32 %24, ptr %60, align 4, !tbaa !10
  br label %.backedge

._crit_edge53:                                    ; preds = %.backedge, %18
  %indvars.iv.next70 = add nuw nsw i64 %indvars.iv69, 1
  %exitcond73.not = icmp eq i64 %indvars.iv.next70, %wide.trip.count72
  br i1 %exitcond73.not, label %._crit_edge57, label %18, !llvm.loop !16

._crit_edge57:                                    ; preds = %._crit_edge53
  %61 = add nuw nsw i32 %.159, 1
  %exitcond74.not = icmp eq i32 %61, %1
  br i1 %exitcond74.not, label %.preheader, label %.preheader47, !llvm.loop !17

.lr.ph65:                                         ; preds = %.lr.ph65.preheader, %._crit_edge62
  %indvars.iv75 = phi i64 [ 1, %.lr.ph65.preheader ], [ %indvars.iv.next76, %._crit_edge62 ]
  %62 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorINSt7__cxx114listISt4pairIiiESaIS3_EEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %indvars.iv75) #2
  %63 = call ptr @_ZNSt7__cxx114listISt4pairIiiESaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %62) #2
  store ptr %63, ptr %5, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #2
  %64 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorINSt7__cxx114listISt4pairIiiESaIS3_EEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %indvars.iv75) #2
  %65 = call ptr @_ZNSt7__cxx114listISt4pairIiiESaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %64) #2
  store ptr %65, ptr %7, align 8
  %66 = call noundef zeroext i1 @_ZStneRKSt14_List_iteratorISt4pairIiiEES4_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %7) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #2
  br i1 %66, label %.lr.ph61, label %._crit_edge62

.lr.ph61:                                         ; preds = %.lr.ph65, %79
  %67 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt14_List_iteratorISt4pairIiiEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #2
  %68 = getelementptr inbounds i8, ptr %67, i64 4
  %69 = load i32, ptr %68, align 4, !tbaa !10
  %70 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %indvars.iv75) #2
  %71 = load i32, ptr %70, align 4, !tbaa !5
  %72 = add nsw i32 %71, %69
  %73 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt14_List_iteratorISt4pairIiiEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #2
  %74 = load i32, ptr %73, align 4, !tbaa !5
  %75 = sext i32 %74 to i64
  %76 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %75) #2
  %77 = load i32, ptr %76, align 4, !tbaa !5
  %78 = icmp slt i32 %72, %77
  br i1 %78, label %.loopexit.loopexit, label %79

79:                                               ; preds = %.lr.ph61
  %80 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt14_List_iteratorISt4pairIiiEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #2
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #2
  %81 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorINSt7__cxx114listISt4pairIiiESaIS3_EEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %indvars.iv75) #2
  %82 = call ptr @_ZNSt7__cxx114listISt4pairIiiESaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %81) #2
  store ptr %82, ptr %7, align 8
  %83 = call noundef zeroext i1 @_ZStneRKSt14_List_iteratorISt4pairIiiEES4_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %7) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #2
  br i1 %83, label %.lr.ph61, label %._crit_edge62, !llvm.loop !18

._crit_edge62:                                    ; preds = %79, %.lr.ph65
  %indvars.iv.next76 = add nuw nsw i64 %indvars.iv75, 1
  %exitcond79.not = icmp eq i64 %indvars.iv.next76, %wide.trip.count78
  br i1 %exitcond79.not, label %.loopexit, label %.lr.ph65, !llvm.loop !19

.loopexit.loopexit:                               ; preds = %.lr.ph61
  %84 = trunc nuw nsw i64 %indvars.iv75 to i32
  br label %.loopexit

.loopexit:                                        ; preds = %._crit_edge62, %.loopexit.loopexit, %.preheader
  %.0 = phi i32 [ -1, %.preheader ], [ %84, %.loopexit.loopexit ], [ -1, %._crit_edge62 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #2
  ret i32 %.0
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt14_List_iteratorISt4pairIiiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #0 align 2

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

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

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

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

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

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

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

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 = !{!"_ZTSSt4pairIiiE", !7, i64 0, !7, i64 4}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!6, !7, i64 4}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!14, !14, i64 0}
!14 = !{!"any pointer", !8, i64 0}
!15 = distinct !{!15, !12}
!16 = distinct !{!16, !12}
!17 = distinct !{!17, !12}
!18 = distinct !{!18, !12}
!19 = distinct !{!19, !12}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass