; LLVM IR from ADJA/algos :: Graphs (BellmanFord)

; 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::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<edge, std::allocator<edge>>::_Vector_impl" }
%"struct.std::_Vector_base<edge, std::allocator<edge>>::_Vector_impl" = type { %"struct.std::_Vector_base<edge, std::allocator<edge>>::_Vector_impl_data" }
%"struct.std::_Vector_base<edge, std::allocator<edge>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.edge = type { i32, i32, i32 }

@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@dist = external dso_local global [105 x i32], align 16
@e = external dso_local global %"class.std::vector", align 8
@.str = external hidden unnamed_addr constant [6 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca %struct.edge, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i8, align 1
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %13 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @n, ptr noundef @m)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #5
  store i32 1, ptr %2, align 4, !tbaa !5
  br label %14

14:                                               ; preds = %24, %0
  %15 = load i32, ptr %2, align 4, !tbaa !5
  %16 = load i32, ptr @m, align 4, !tbaa !5
  %17 = icmp sle i32 %15, %16
  br i1 %17, label %19, label %18

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

19:                                               ; preds = %14
  call void @llvm.lifetime.start.p0(i64 12, ptr %3) #5
  %20 = getelementptr inbounds %struct.edge, ptr %3, i32 0, i32 0
  %21 = getelementptr inbounds %struct.edge, ptr %3, i32 0, i32 1
  %22 = getelementptr inbounds %struct.edge, ptr %3, i32 0, i32 2
  %23 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.2, ptr noundef %20, ptr noundef %21, ptr noundef %22)
  call void @_ZNSt6vectorI4edgeSaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24) @e, ptr noundef nonnull align 4 dereferenceable(12) %3)
  call void @llvm.lifetime.end.p0(i64 12, ptr %3) #5
  br label %24

24:                                               ; preds = %19
  %25 = load i32, ptr %2, align 4, !tbaa !5
  %26 = add nsw i32 %25, 1
  store i32 %26, ptr %2, align 4, !tbaa !5
  br label %14, !llvm.loop !9

27:                                               ; preds = %18
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #5
  store i32 1, ptr %4, align 4, !tbaa !5
  br label %28

28:                                               ; preds = %37, %27
  %29 = load i32, ptr %4, align 4, !tbaa !5
  %30 = load i32, ptr @n, align 4, !tbaa !5
  %31 = icmp sle i32 %29, %30
  br i1 %31, label %33, label %32

32:                                               ; preds = %28
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  br label %40

33:                                               ; preds = %28
  %34 = load i32, ptr %4, align 4, !tbaa !5
  %35 = sext i32 %34 to i64
  %36 = getelementptr inbounds [105 x i32], ptr @dist, i64 0, i64 %35
  store i32 30000, ptr %36, align 4, !tbaa !5
  br label %37

37:                                               ; preds = %33
  %38 = load i32, ptr %4, align 4, !tbaa !5
  %39 = add nsw i32 %38, 1
  store i32 %39, ptr %4, align 4, !tbaa !5
  br label %28, !llvm.loop !11

40:                                               ; preds = %32
  store i32 0, ptr getelementptr inbounds ([105 x i32], ptr @dist, i64 0, i64 1), align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  store i32 1, ptr %5, align 4, !tbaa !5
  br label %41

41:                                               ; preds = %107, %40
  %42 = load i32, ptr %5, align 4, !tbaa !5
  %43 = load i32, ptr @n, align 4, !tbaa !5
  %44 = icmp sle i32 %42, %43
  br i1 %44, label %46, label %45

45:                                               ; preds = %41
  store i32 8, ptr %6, align 4
  br label %110

46:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 1, ptr %7) #5
  store i8 0, ptr %7, align 1, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  store i32 0, ptr %8, align 4, !tbaa !5
  br label %47

47:                                               ; preds = %96, %46
  %48 = load i32, ptr %8, align 4, !tbaa !5
  %49 = load i32, ptr @m, align 4, !tbaa !5
  %50 = icmp slt i32 %48, %49
  br i1 %50, label %52, label %51

51:                                               ; preds = %47
  store i32 11, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  br label %99

52:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  %53 = load i32, ptr %8, align 4, !tbaa !5
  %54 = sext i32 %53 to i64
  %55 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorI4edgeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @e, i64 noundef %54) #5
  %56 = getelementptr inbounds %struct.edge, ptr %55, i32 0, i32 0
  %57 = load i32, ptr %56, align 4, !tbaa !14
  store i32 %57, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  %58 = load i32, ptr %8, align 4, !tbaa !5
  %59 = sext i32 %58 to i64
  %60 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorI4edgeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @e, i64 noundef %59) #5
  %61 = getelementptr inbounds %struct.edge, ptr %60, i32 0, i32 1
  %62 = load i32, ptr %61, align 4, !tbaa !16
  store i32 %62, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  %63 = load i32, ptr %8, align 4, !tbaa !5
  %64 = sext i32 %63 to i64
  %65 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorI4edgeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @e, i64 noundef %64) #5
  %66 = getelementptr inbounds %struct.edge, ptr %65, i32 0, i32 2
  %67 = load i32, ptr %66, align 4, !tbaa !17
  store i32 %67, ptr %11, align 4, !tbaa !5
  %68 = load i32, ptr %9, align 4, !tbaa !5
  %69 = sext i32 %68 to i64
  %70 = getelementptr inbounds [105 x i32], ptr @dist, i64 0, i64 %69
  %71 = load i32, ptr %70, align 4, !tbaa !5
  %72 = icmp ne i32 %71, 30000
  br i1 %72, label %73, label %95

73:                                               ; preds = %52
  %74 = load i32, ptr %9, align 4, !tbaa !5
  %75 = sext i32 %74 to i64
  %76 = getelementptr inbounds [105 x i32], ptr @dist, i64 0, i64 %75
  %77 = load i32, ptr %76, align 4, !tbaa !5
  %78 = load i32, ptr %11, align 4, !tbaa !5
  %79 = add nsw i32 %77, %78
  %80 = load i32, ptr %10, align 4, !tbaa !5
  %81 = sext i32 %80 to i64
  %82 = getelementptr inbounds [105 x i32], ptr @dist, i64 0, i64 %81
  %83 = load i32, ptr %82, align 4, !tbaa !5
  %84 = icmp slt i32 %79, %83
  br i1 %84, label %85, label %95

85:                                               ; preds = %73
  %86 = load i32, ptr %9, align 4, !tbaa !5
  %87 = sext i32 %86 to i64
  %88 = getelementptr inbounds [105 x i32], ptr @dist, i64 0, i64 %87
  %89 = load i32, ptr %88, align 4, !tbaa !5
  %90 = load i32, ptr %11, align 4, !tbaa !5
  %91 = add nsw i32 %89, %90
  %92 = load i32, ptr %10, align 4, !tbaa !5
  %93 = sext i32 %92 to i64
  %94 = getelementptr inbounds [105 x i32], ptr @dist, i64 0, i64 %93
  store i32 %91, ptr %94, align 4, !tbaa !5
  store i8 1, ptr %7, align 1, !tbaa !12
  br label %95

95:                                               ; preds = %85, %73, %52
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  br label %96

96:                                               ; preds = %95
  %97 = load i32, ptr %8, align 4, !tbaa !5
  %98 = add nsw i32 %97, 1
  store i32 %98, ptr %8, align 4, !tbaa !5
  br label %47, !llvm.loop !18

99:                                               ; preds = %51
  %100 = load i8, ptr %7, align 1, !tbaa !12, !range !19, !noundef !20
  %101 = trunc i8 %100 to i1
  br i1 %101, label %103, label %102

102:                                              ; preds = %99
  store i32 8, ptr %6, align 4
  br label %104

103:                                              ; preds = %99
  store i32 0, ptr %6, align 4
  br label %104

104:                                              ; preds = %103, %102
  call void @llvm.lifetime.end.p0(i64 1, ptr %7) #5
  %105 = load i32, ptr %6, align 4
  switch i32 %105, label %110 [
    i32 0, label %106
  ]

106:                                              ; preds = %104
  br label %107

107:                                              ; preds = %106
  %108 = load i32, ptr %5, align 4, !tbaa !5
  %109 = add nsw i32 %108, 1
  store i32 %109, ptr %5, align 4, !tbaa !5
  br label %41, !llvm.loop !21

110:                                              ; preds = %104, %45
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  br label %111

111:                                              ; preds = %110
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  store i32 1, ptr %12, align 4, !tbaa !5
  br label %112

112:                                              ; preds = %123, %111
  %113 = load i32, ptr %12, align 4, !tbaa !5
  %114 = load i32, ptr @n, align 4, !tbaa !5
  %115 = icmp sle i32 %113, %114
  br i1 %115, label %117, label %116

116:                                              ; preds = %112
  store i32 14, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  br label %126

117:                                              ; preds = %112
  %118 = load i32, ptr %12, align 4, !tbaa !5
  %119 = sext i32 %118 to i64
  %120 = getelementptr inbounds [105 x i32], ptr @dist, i64 0, i64 %119
  %121 = load i32, ptr %120, align 4, !tbaa !5
  %122 = call i32 (ptr, ...) @printf(ptr noundef @.str.3, i32 noundef %121)
  br label %123

123:                                              ; preds = %117
  %124 = load i32, ptr %12, align 4, !tbaa !5
  %125 = add nsw i32 %124, 1
  store i32 %125, ptr %12, align 4, !tbaa !5
  br label %112, !llvm.loop !22

126:                                              ; preds = %116
  ret i32 0
}

declare i32 @__isoc99_scanf(ptr noundef, ...) #1

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorI4edgeSaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(12)) #3 align 2

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

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

declare i32 @printf(ptr noundef, ...) #1

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


; 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::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<edge, std::allocator<edge>>::_Vector_impl" }
%"struct.std::_Vector_base<edge, std::allocator<edge>>::_Vector_impl" = type { %"struct.std::_Vector_base<edge, std::allocator<edge>>::_Vector_impl_data" }
%"struct.std::_Vector_base<edge, std::allocator<edge>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.edge = type { i32, i32, i32 }

@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@dist = external dso_local local_unnamed_addr global [105 x i32], align 16
@e = external dso_local global %"class.std::vector", align 8
@.str = external hidden unnamed_addr constant [6 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca %struct.edge, align 4
  %2 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n, ptr noundef nonnull @m)
  %3 = load i32, ptr @m, align 4, !tbaa !5
  %.not37 = icmp slt i32 %3, 1
  br i1 %.not37, label %.preheader36, label %.lr.ph

.lr.ph:                                           ; preds = %0
  %4 = getelementptr inbounds i8, ptr %1, i64 4
  %5 = getelementptr inbounds i8, ptr %1, i64 8
  br label %14

.preheader36.loopexit:                            ; preds = %14
  %6 = icmp sgt i32 %17, 0
  br label %.preheader36

.preheader36:                                     ; preds = %.preheader36.loopexit, %0
  %7 = phi i1 [ false, %0 ], [ %6, %.preheader36.loopexit ]
  %8 = load i32, ptr @n, align 4, !tbaa !5
  %.not3239 = icmp slt i32 %8, 1
  br i1 %.not3239, label %._crit_edge.thread, label %.lr.ph41.preheader

._crit_edge.thread:                               ; preds = %.preheader36
  store i32 0, ptr getelementptr inbounds (i8, ptr @dist, i64 4), align 4, !tbaa !5
  br label %._crit_edge54

.lr.ph41.preheader:                               ; preds = %.preheader36
  %9 = add nuw i32 %8, 1
  %wide.trip.count = zext i32 %9 to i64
  %10 = zext nneg i32 %8 to i64
  %min.iters.check = icmp ult i32 %8, 8
  br i1 %min.iters.check, label %.lr.ph41.preheader96, label %vector.ph

.lr.ph41.preheader96:                             ; preds = %middle.block, %.lr.ph41.preheader
  %indvars.iv.ph = phi i64 [ 1, %.lr.ph41.preheader ], [ %ind.end, %middle.block ]
  br label %.lr.ph41

vector.ph:                                        ; preds = %.lr.ph41.preheader
  %n.vec = and i64 %10, 2147483640
  %ind.end = or disjoint i64 %n.vec, 1
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %offset.idx = or disjoint i64 %index, 1
  %11 = getelementptr inbounds [105 x i32], ptr @dist, i64 0, i64 %offset.idx
  %12 = getelementptr inbounds i8, ptr %11, i64 16
  store <4 x i32> <i32 30000, i32 30000, i32 30000, i32 30000>, ptr %11, align 4, !tbaa !5
  store <4 x i32> <i32 30000, i32 30000, i32 30000, i32 30000>, ptr %12, align 4, !tbaa !5
  %index.next = add nuw i64 %index, 8
  %13 = icmp eq i64 %index.next, %n.vec
  br i1 %13, label %middle.block, label %vector.body, !llvm.loop !9

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %10
  br i1 %cmp.n, label %._crit_edge, label %.lr.ph41.preheader96

14:                                               ; preds = %.lr.ph, %14
  %.02438 = phi i32 [ 1, %.lr.ph ], [ %16, %14 ]
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %1) #5
  %15 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.2, ptr noundef nonnull %1, ptr noundef nonnull %4, ptr noundef nonnull %5)
  call void @_ZNSt6vectorI4edgeSaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24) @e, ptr noundef nonnull align 4 dereferenceable(12) %1)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %1) #5
  %16 = add nuw nsw i32 %.02438, 1
  %17 = load i32, ptr @m, align 4, !tbaa !5
  %.not.not = icmp slt i32 %.02438, %17
  br i1 %.not.not, label %14, label %.preheader36.loopexit, !llvm.loop !13

._crit_edge:                                      ; preds = %.lr.ph41, %middle.block
  store i32 0, ptr getelementptr inbounds (i8, ptr @dist, i64 4), align 4, !tbaa !5
  br i1 %.not3239, label %._crit_edge54, label %.preheader.lr.ph

.preheader.lr.ph:                                 ; preds = %._crit_edge
  br i1 %7, label %.lr.ph44.outer.preheader, label %.lr.ph53.preheader

.lr.ph41:                                         ; preds = %.lr.ph41.preheader96, %.lr.ph41
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph41 ], [ %indvars.iv.ph, %.lr.ph41.preheader96 ]
  %18 = getelementptr inbounds [105 x i32], ptr @dist, i64 0, i64 %indvars.iv
  store i32 30000, ptr %18, align 4, !tbaa !5
  %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.ph41, !llvm.loop !14

19:                                               ; preds = %._crit_edge45.thread69, %._crit_edge45
  %.pre.pre.pre72 = phi i32 [ %.pre.pre.pre71, %._crit_edge45.thread69 ], [ %.pre.pre.pre, %._crit_edge45 ]
  %20 = phi i32 [ %45, %._crit_edge45.thread69 ], [ %41, %._crit_edge45 ]
  %.not33.not = icmp slt i32 %.0264789, %.pre.pre.pre72
  %21 = add nuw nsw i32 %.0264789, 1
  %22 = icmp sgt i32 %20, 0
  %or.cond = and i1 %.not33.not, %22
  br i1 %or.cond, label %.lr.ph44.outer.preheader, label %._crit_edge48, !llvm.loop !15

.lr.ph44.outer.preheader:                         ; preds = %.preheader.lr.ph, %19
  %.0264789 = phi i32 [ %21, %19 ], [ 1, %.preheader.lr.ph ]
  br label %.lr.ph44.outer

.lr.ph44.outer:                                   ; preds = %.lr.ph44.outer.preheader, %.thread
  %indvars.iv56.ph = phi i64 [ %indvars.iv.next5767, %.thread ], [ 0, %.lr.ph44.outer.preheader ]
  %.02842.ph = phi i1 [ true, %.thread ], [ false, %.lr.ph44.outer.preheader ]
  br label %.lr.ph44

._crit_edge45:                                    ; preds = %40
  %.pre.pre.pre = load i32, ptr @n, align 4, !tbaa !5
  br i1 %.02842.ph, label %19, label %._crit_edge48

.lr.ph44:                                         ; preds = %.lr.ph44.outer, %40
  %indvars.iv56 = phi i64 [ %indvars.iv.next57, %40 ], [ %indvars.iv56.ph, %.lr.ph44.outer ]
  %23 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorI4edgeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @e, i64 noundef %indvars.iv56) #5
  %24 = load i32, ptr %23, align 4, !tbaa !17
  %25 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorI4edgeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @e, i64 noundef %indvars.iv56) #5
  %26 = getelementptr inbounds i8, ptr %25, i64 4
  %27 = load i32, ptr %26, align 4, !tbaa !19
  %28 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorI4edgeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @e, i64 noundef %indvars.iv56) #5
  %29 = sext i32 %24 to i64
  %30 = getelementptr inbounds [105 x i32], ptr @dist, i64 0, i64 %29
  %31 = load i32, ptr %30, align 4, !tbaa !5
  %.not35 = icmp eq i32 %31, 30000
  br i1 %.not35, label %40, label %32

32:                                               ; preds = %.lr.ph44
  %33 = getelementptr inbounds i8, ptr %28, i64 8
  %34 = load i32, ptr %33, align 4, !tbaa !20
  %35 = add nsw i32 %34, %31
  %36 = sext i32 %27 to i64
  %37 = getelementptr inbounds [105 x i32], ptr @dist, i64 0, i64 %36
  %38 = load i32, ptr %37, align 4, !tbaa !5
  %39 = icmp slt i32 %35, %38
  br i1 %39, label %.thread, label %40

40:                                               ; preds = %32, %.lr.ph44
  %indvars.iv.next57 = add nuw nsw i64 %indvars.iv56, 1
  %41 = load i32, ptr @m, align 4, !tbaa !5
  %42 = sext i32 %41 to i64
  %43 = icmp slt i64 %indvars.iv.next57, %42
  br i1 %43, label %.lr.ph44, label %._crit_edge45, !llvm.loop !21

.thread:                                          ; preds = %32
  %44 = getelementptr inbounds [105 x i32], ptr @dist, i64 0, i64 %36
  store i32 %35, ptr %44, align 4, !tbaa !5
  %indvars.iv.next5767 = add nuw nsw i64 %indvars.iv56, 1
  %45 = load i32, ptr @m, align 4, !tbaa !5
  %46 = sext i32 %45 to i64
  %47 = icmp slt i64 %indvars.iv.next5767, %46
  br i1 %47, label %.lr.ph44.outer, label %._crit_edge45.thread69, !llvm.loop !21

._crit_edge45.thread69:                           ; preds = %.thread
  %.pre.pre.pre71 = load i32, ptr @n, align 4, !tbaa !5
  br label %19

._crit_edge48:                                    ; preds = %._crit_edge45, %19
  %48 = phi i32 [ %.pre.pre.pre72, %19 ], [ %.pre.pre.pre, %._crit_edge45 ]
  %.not3450 = icmp slt i32 %48, 1
  br i1 %.not3450, label %._crit_edge54, label %.lr.ph53.preheader

.lr.ph53.preheader:                               ; preds = %.preheader.lr.ph, %._crit_edge48
  br label %.lr.ph53

._crit_edge54:                                    ; preds = %.lr.ph53, %._crit_edge.thread, %._crit_edge, %._crit_edge48
  ret i32 0

.lr.ph53:                                         ; preds = %.lr.ph53.preheader, %.lr.ph53
  %indvars.iv58 = phi i64 [ %indvars.iv.next59, %.lr.ph53 ], [ 1, %.lr.ph53.preheader ]
  %49 = getelementptr inbounds [105 x i32], ptr @dist, i64 0, i64 %indvars.iv58
  %50 = load i32, ptr %49, align 4, !tbaa !5
  %51 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %50)
  %indvars.iv.next59 = add nuw nsw i64 %indvars.iv58, 1
  %52 = load i32, ptr @n, align 4, !tbaa !5
  %53 = sext i32 %52 to i64
  %.not34.not = icmp slt i64 %indvars.iv58, %53
  br i1 %.not34.not, label %.lr.ph53, label %._crit_edge54, !llvm.loop !22
}

; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #1

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorI4edgeSaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #3 align 2

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

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

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #1

attributes #0 = { mustprogress norecurse 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 = { nofree nounwind "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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10, !11, !12}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!"llvm.loop.isvectorized", i32 1}
!12 = !{!"llvm.loop.unroll.runtime.disable"}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10, !12, !11}
!15 = distinct !{!15, !10, !16}
!16 = !{!"llvm.loop.unswitch.partial.disable"}
!17 = !{!18, !6, i64 0}
!18 = !{!"_ZTS4edge", !6, i64 0, !6, i64 4, !6, i64 8}
!19 = !{!18, !6, i64 4}
!20 = !{!18, !6, i64 8}
!21 = distinct !{!21, !10}
!22 = distinct !{!22, !10}


; Effective O3 passes: AggressiveInstCombinePass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopInstSimplifyPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,ReassociatePass,SROAPass,SimpleLoopUnswitchPass,SimplifyCFGPass,TailCallElimPass