; LLVM IR from codeIIEST/Algorithms :: Competitive Coding/Graphs/Shortest Path/dijsktra (dijsktra_implementation)

; 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.Graph = type { i32, ptr }
%struct.MinHeap = type { i32, i32, ptr, ptr }
%struct.MinHeapNode = type { i32, i32 }
%struct.adjList = type { ptr }
%struct.adjListNode = type { i32, i32, ptr }

; 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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_Z14newMinHeapNodeii(i32 noundef, i32 noundef) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_Z13createMinHeapi(i32 noundef) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z7isEmptyP7MinHeap(ptr noundef) #1

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_Z10extractMinP7MinHeap(ptr noundef) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_Z11decreaseKeyP7MinHeapii(ptr noundef, i32 noundef, i32 noundef) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_Z11isInMinHeapP7MinHeapi(ptr noundef, i32 noundef) #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z8printarrPiii(ptr noundef, i32 noundef, i32 noundef) #2

; Function Attrs: mustprogress uwtable
define dso_local void @_Z8dijsktraP5Graphi(ptr noundef %0, i32 noundef %1) #2 {
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca i64, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store i32 %1, ptr %4, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  %15 = load ptr, ptr %3, align 8, !tbaa !5
  %16 = getelementptr inbounds %struct.Graph, ptr %15, i32 0, i32 0
  %17 = load i32, ptr %16, align 8, !tbaa !11
  store i32 %17, ptr %7, align 4, !tbaa !9
  %18 = load i32, ptr %7, align 4, !tbaa !9
  %19 = zext i32 %18 to i64
  %20 = call ptr @llvm.stacksave.p0()
  store ptr %20, ptr %8, align 8
  %21 = alloca i32, i64 %19, align 16
  store i64 %19, ptr %9, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  %22 = load i32, ptr %7, align 4, !tbaa !9
  %23 = call noundef ptr @_Z13createMinHeapi(i32 noundef %22)
  store ptr %23, ptr %10, align 8, !tbaa !5
  store i32 0, ptr %5, align 4, !tbaa !9
  br label %24

24:                                               ; preds = %51, %2
  %25 = load i32, ptr %5, align 4, !tbaa !9
  %26 = load i32, ptr %7, align 4, !tbaa !9
  %27 = icmp slt i32 %25, %26
  br i1 %27, label %28, label %54

28:                                               ; preds = %24
  %29 = load i32, ptr %5, align 4, !tbaa !9
  %30 = sext i32 %29 to i64
  %31 = getelementptr inbounds i32, ptr %21, i64 %30
  store i32 65535, ptr %31, align 4, !tbaa !9
  %32 = load i32, ptr %5, align 4, !tbaa !9
  %33 = load i32, ptr %5, align 4, !tbaa !9
  %34 = sext i32 %33 to i64
  %35 = getelementptr inbounds i32, ptr %21, i64 %34
  %36 = load i32, ptr %35, align 4, !tbaa !9
  %37 = call noundef ptr @_Z14newMinHeapNodeii(i32 noundef %32, i32 noundef %36)
  %38 = load ptr, ptr %10, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct.MinHeap, ptr %38, i32 0, i32 3
  %40 = load ptr, ptr %39, align 8, !tbaa !13
  %41 = load i32, ptr %5, align 4, !tbaa !9
  %42 = sext i32 %41 to i64
  %43 = getelementptr inbounds ptr, ptr %40, i64 %42
  store ptr %37, ptr %43, align 8, !tbaa !5
  %44 = load i32, ptr %5, align 4, !tbaa !9
  %45 = load ptr, ptr %10, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.MinHeap, ptr %45, i32 0, i32 2
  %47 = load ptr, ptr %46, align 8, !tbaa !15
  %48 = load i32, ptr %5, align 4, !tbaa !9
  %49 = sext i32 %48 to i64
  %50 = getelementptr inbounds i32, ptr %47, i64 %49
  store i32 %44, ptr %50, align 4, !tbaa !9
  br label %51

51:                                               ; preds = %28
  %52 = load i32, ptr %5, align 4, !tbaa !9
  %53 = add nsw i32 %52, 1
  store i32 %53, ptr %5, align 4, !tbaa !9
  br label %24, !llvm.loop !16

54:                                               ; preds = %24
  %55 = load i32, ptr %4, align 4, !tbaa !9
  %56 = load i32, ptr %4, align 4, !tbaa !9
  %57 = sext i32 %56 to i64
  %58 = getelementptr inbounds i32, ptr %21, i64 %57
  %59 = load i32, ptr %58, align 4, !tbaa !9
  %60 = call noundef ptr @_Z14newMinHeapNodeii(i32 noundef %55, i32 noundef %59)
  %61 = load ptr, ptr %10, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.MinHeap, ptr %61, i32 0, i32 3
  %63 = load ptr, ptr %62, align 8, !tbaa !13
  %64 = load i32, ptr %4, align 4, !tbaa !9
  %65 = sext i32 %64 to i64
  %66 = getelementptr inbounds ptr, ptr %63, i64 %65
  store ptr %60, ptr %66, align 8, !tbaa !5
  %67 = load i32, ptr %4, align 4, !tbaa !9
  %68 = load ptr, ptr %10, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.MinHeap, ptr %68, i32 0, i32 2
  %70 = load ptr, ptr %69, align 8, !tbaa !15
  %71 = load i32, ptr %4, align 4, !tbaa !9
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds i32, ptr %70, i64 %72
  store i32 %67, ptr %73, align 4, !tbaa !9
  %74 = load i32, ptr %4, align 4, !tbaa !9
  %75 = sext i32 %74 to i64
  %76 = getelementptr inbounds i32, ptr %21, i64 %75
  store i32 0, ptr %76, align 4, !tbaa !9
  %77 = load ptr, ptr %10, align 8, !tbaa !5
  %78 = load i32, ptr %4, align 4, !tbaa !9
  %79 = load i32, ptr %4, align 4, !tbaa !9
  %80 = sext i32 %79 to i64
  %81 = getelementptr inbounds i32, ptr %21, i64 %80
  %82 = load i32, ptr %81, align 4, !tbaa !9
  call void @_Z11decreaseKeyP7MinHeapii(ptr noundef %77, i32 noundef %78, i32 noundef %82)
  %83 = load i32, ptr %7, align 4, !tbaa !9
  %84 = load ptr, ptr %10, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct.MinHeap, ptr %84, i32 0, i32 0
  store i32 %83, ptr %85, align 8, !tbaa !18
  br label %86

86:                                               ; preds = %157, %54
  %87 = load ptr, ptr %10, align 8, !tbaa !5
  %88 = call noundef i32 @_Z7isEmptyP7MinHeap(ptr noundef %87)
  %89 = icmp ne i32 %88, 0
  %90 = xor i1 %89, true
  br i1 %90, label %91, label %158

91:                                               ; preds = %86
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  %92 = load ptr, ptr %10, align 8, !tbaa !5
  %93 = call noundef ptr @_Z10extractMinP7MinHeap(ptr noundef %92)
  store ptr %93, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  %94 = load ptr, ptr %11, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct.MinHeapNode, ptr %94, i32 0, i32 0
  %96 = load i32, ptr %95, align 4, !tbaa !19
  store i32 %96, ptr %12, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  %97 = load ptr, ptr %3, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct.Graph, ptr %97, i32 0, i32 1
  %99 = load ptr, ptr %98, align 8, !tbaa !21
  %100 = load i32, ptr %12, align 4, !tbaa !9
  %101 = sext i32 %100 to i64
  %102 = getelementptr inbounds %struct.adjList, ptr %99, i64 %101
  %103 = getelementptr inbounds %struct.adjList, ptr %102, i32 0, i32 0
  %104 = load ptr, ptr %103, align 8, !tbaa !22
  store ptr %104, ptr %13, align 8, !tbaa !5
  br label %105

105:                                              ; preds = %153, %91
  %106 = load ptr, ptr %13, align 8, !tbaa !5
  %107 = icmp ne ptr %106, null
  br i1 %107, label %108, label %157

108:                                              ; preds = %105
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #4
  %109 = load ptr, ptr %13, align 8, !tbaa !5
  %110 = getelementptr inbounds %struct.adjListNode, ptr %109, i32 0, i32 0
  %111 = load i32, ptr %110, align 8, !tbaa !24
  store i32 %111, ptr %14, align 4, !tbaa !9
  %112 = load ptr, ptr %10, align 8, !tbaa !5
  %113 = load i32, ptr %14, align 4, !tbaa !9
  %114 = call noundef zeroext i1 @_Z11isInMinHeapP7MinHeapi(ptr noundef %112, i32 noundef %113)
  br i1 %114, label %115, label %153

115:                                              ; preds = %108
  %116 = load i32, ptr %12, align 4, !tbaa !9
  %117 = sext i32 %116 to i64
  %118 = getelementptr inbounds i32, ptr %21, i64 %117
  %119 = load i32, ptr %118, align 4, !tbaa !9
  %120 = icmp ne i32 %119, 2147483647
  br i1 %120, label %121, label %153

121:                                              ; preds = %115
  %122 = load ptr, ptr %13, align 8, !tbaa !5
  %123 = getelementptr inbounds %struct.adjListNode, ptr %122, i32 0, i32 1
  %124 = load i32, ptr %123, align 4, !tbaa !26
  %125 = load i32, ptr %12, align 4, !tbaa !9
  %126 = sext i32 %125 to i64
  %127 = getelementptr inbounds i32, ptr %21, i64 %126
  %128 = load i32, ptr %127, align 4, !tbaa !9
  %129 = add nsw i32 %124, %128
  %130 = load i32, ptr %14, align 4, !tbaa !9
  %131 = sext i32 %130 to i64
  %132 = getelementptr inbounds i32, ptr %21, i64 %131
  %133 = load i32, ptr %132, align 4, !tbaa !9
  %134 = icmp slt i32 %129, %133
  br i1 %134, label %135, label %153

135:                                              ; preds = %121
  %136 = load i32, ptr %12, align 4, !tbaa !9
  %137 = sext i32 %136 to i64
  %138 = getelementptr inbounds i32, ptr %21, i64 %137
  %139 = load i32, ptr %138, align 4, !tbaa !9
  %140 = load ptr, ptr %13, align 8, !tbaa !5
  %141 = getelementptr inbounds %struct.adjListNode, ptr %140, i32 0, i32 1
  %142 = load i32, ptr %141, align 4, !tbaa !26
  %143 = add nsw i32 %139, %142
  %144 = load i32, ptr %14, align 4, !tbaa !9
  %145 = sext i32 %144 to i64
  %146 = getelementptr inbounds i32, ptr %21, i64 %145
  store i32 %143, ptr %146, align 4, !tbaa !9
  %147 = load ptr, ptr %10, align 8, !tbaa !5
  %148 = load i32, ptr %14, align 4, !tbaa !9
  %149 = load i32, ptr %14, align 4, !tbaa !9
  %150 = sext i32 %149 to i64
  %151 = getelementptr inbounds i32, ptr %21, i64 %150
  %152 = load i32, ptr %151, align 4, !tbaa !9
  call void @_Z11decreaseKeyP7MinHeapii(ptr noundef %147, i32 noundef %148, i32 noundef %152)
  br label %153

153:                                              ; preds = %135, %121, %115, %108
  %154 = load ptr, ptr %13, align 8, !tbaa !5
  %155 = getelementptr inbounds %struct.adjListNode, ptr %154, i32 0, i32 2
  %156 = load ptr, ptr %155, align 8, !tbaa !27
  store ptr %156, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  br label %105, !llvm.loop !28

157:                                              ; preds = %105
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  br label %86, !llvm.loop !29

158:                                              ; preds = %86
  %159 = load i32, ptr %7, align 4, !tbaa !9
  %160 = load i32, ptr %4, align 4, !tbaa !9
  call void @_Z8printarrPiii(ptr noundef %21, i32 noundef %159, i32 noundef %160)
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  %161 = load ptr, ptr %8, align 8
  call void @llvm.stackrestore.p0(ptr %161)
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  ret void
}

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #3

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #3

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { nocallback nofree nosync nounwind willreturn }
attributes #4 = { 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 = !{!"_ZTS5Graph", !10, i64 0, !6, i64 8}
!13 = !{!14, !6, i64 16}
!14 = !{!"_ZTS7MinHeap", !10, i64 0, !10, i64 4, !6, i64 8, !6, i64 16}
!15 = !{!14, !6, i64 8}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = !{!14, !10, i64 0}
!19 = !{!20, !10, i64 0}
!20 = !{!"_ZTS11MinHeapNode", !10, i64 0, !10, i64 4}
!21 = !{!12, !6, i64 8}
!22 = !{!23, !6, i64 0}
!23 = !{!"_ZTS7adjList", !6, i64 0}
!24 = !{!25, !10, i64 0}
!25 = !{!"_ZTS11adjListNode", !10, i64 0, !10, i64 4, !6, i64 8}
!26 = !{!25, !10, i64 4}
!27 = !{!25, !6, i64 8}
!28 = distinct !{!28, !17}
!29 = distinct !{!29, !17}


; 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.adjList = type { ptr }

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_Z14newMinHeapNodeii(i32 noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_Z13createMinHeapi(i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z7isEmptyP7MinHeap(ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_Z10extractMinP7MinHeap(ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_Z11decreaseKeyP7MinHeapii(ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_Z11isInMinHeapP7MinHeapi(ptr noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z8printarrPiii(ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z8dijsktraP5Graphi(ptr nocapture noundef readonly %0, i32 noundef %1) local_unnamed_addr #1 {
.lr.ph:
  %2 = load i32, ptr %0, align 8, !tbaa !5
  %3 = zext i32 %2 to i64
  %4 = alloca i32, i64 %3, align 16
  %5 = tail call noundef ptr @_Z13createMinHeapi(i32 noundef %2)
  %6 = icmp sgt i32 %2, 0
  tail call void @llvm.assume(i1 %6)
  %7 = getelementptr inbounds i8, ptr %5, i64 16
  %8 = getelementptr inbounds i8, ptr %5, i64 8
  br label %9

9:                                                ; preds = %.lr.ph, %9
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %9 ]
  %10 = getelementptr inbounds i32, ptr %4, i64 %indvars.iv
  store i32 65535, ptr %10, align 4, !tbaa !11
  %11 = trunc nuw nsw i64 %indvars.iv to i32
  %12 = tail call noundef ptr @_Z14newMinHeapNodeii(i32 noundef %11, i32 noundef 65535)
  %13 = load ptr, ptr %7, align 8, !tbaa !12
  %14 = getelementptr inbounds ptr, ptr %13, i64 %indvars.iv
  store ptr %12, ptr %14, align 8, !tbaa !14
  %15 = load ptr, ptr %8, align 8, !tbaa !15
  %16 = getelementptr inbounds i32, ptr %15, i64 %indvars.iv
  store i32 %11, ptr %16, align 4, !tbaa !11
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %3
  br i1 %exitcond.not, label %._crit_edge.loopexit, label %9, !llvm.loop !16

._crit_edge.loopexit:                             ; preds = %9
  %.phi.trans.insert = sext i32 %1 to i64
  %.phi.trans.insert66 = getelementptr inbounds i32, ptr %4, i64 %.phi.trans.insert
  %.pre = load i32, ptr %.phi.trans.insert66, align 4, !tbaa !11
  %17 = getelementptr inbounds i32, ptr %4, i64 %.phi.trans.insert
  %18 = tail call noundef ptr @_Z14newMinHeapNodeii(i32 noundef %1, i32 noundef %.pre)
  %19 = getelementptr inbounds i8, ptr %5, i64 16
  %20 = load ptr, ptr %19, align 8, !tbaa !12
  %21 = getelementptr inbounds ptr, ptr %20, i64 %.phi.trans.insert
  store ptr %18, ptr %21, align 8, !tbaa !14
  %22 = getelementptr inbounds i8, ptr %5, i64 8
  %23 = load ptr, ptr %22, align 8, !tbaa !15
  %24 = getelementptr inbounds i32, ptr %23, i64 %.phi.trans.insert
  store i32 %1, ptr %24, align 4, !tbaa !11
  store i32 0, ptr %17, align 4, !tbaa !11
  tail call void @_Z11decreaseKeyP7MinHeapii(ptr noundef %5, i32 noundef %1, i32 noundef 0)
  store i32 %2, ptr %5, align 8, !tbaa !18
  %25 = tail call noundef i32 @_Z7isEmptyP7MinHeap(ptr noundef nonnull %5)
  %.not61 = icmp eq i32 %25, 0
  br i1 %.not61, label %.lr.ph63, label %._crit_edge64

.lr.ph63:                                         ; preds = %._crit_edge.loopexit
  %26 = getelementptr inbounds i8, ptr %0, i64 8
  br label %28

.loopexit:                                        ; preds = %49, %28
  %27 = tail call noundef i32 @_Z7isEmptyP7MinHeap(ptr noundef nonnull %5)
  %.not = icmp eq i32 %27, 0
  br i1 %.not, label %28, label %._crit_edge64, !llvm.loop !19

28:                                               ; preds = %.lr.ph63, %.loopexit
  %29 = tail call noundef ptr @_Z10extractMinP7MinHeap(ptr noundef nonnull %5)
  %30 = load i32, ptr %29, align 4, !tbaa !20
  %31 = load ptr, ptr %26, align 8, !tbaa !22
  %32 = sext i32 %30 to i64
  %33 = getelementptr inbounds %struct.adjList, ptr %31, i64 %32
  %.04956 = load ptr, ptr %33, align 8, !tbaa !14
  %.not5357 = icmp eq ptr %.04956, null
  br i1 %.not5357, label %.loopexit, label %.lr.ph60

.lr.ph60:                                         ; preds = %28
  %34 = getelementptr inbounds i32, ptr %4, i64 %32
  br label %35

35:                                               ; preds = %.lr.ph60, %49
  %.04958 = phi ptr [ %.04956, %.lr.ph60 ], [ %.049, %49 ]
  %36 = load i32, ptr %.04958, align 8, !tbaa !23
  %37 = tail call noundef zeroext i1 @_Z11isInMinHeapP7MinHeapi(ptr noundef nonnull %5, i32 noundef %36)
  br i1 %37, label %38, label %49

38:                                               ; preds = %35
  %39 = load i32, ptr %34, align 4, !tbaa !11
  %.not54 = icmp eq i32 %39, 2147483647
  br i1 %.not54, label %49, label %40

40:                                               ; preds = %38
  %41 = getelementptr inbounds i8, ptr %.04958, i64 4
  %42 = load i32, ptr %41, align 4, !tbaa !25
  %43 = add nsw i32 %42, %39
  %44 = sext i32 %36 to i64
  %45 = getelementptr inbounds i32, ptr %4, i64 %44
  %46 = load i32, ptr %45, align 4, !tbaa !11
  %47 = icmp slt i32 %43, %46
  br i1 %47, label %48, label %49

48:                                               ; preds = %40
  store i32 %43, ptr %45, align 4, !tbaa !11
  tail call void @_Z11decreaseKeyP7MinHeapii(ptr noundef nonnull %5, i32 noundef %36, i32 noundef %43)
  br label %49

49:                                               ; preds = %48, %40, %38, %35
  %50 = getelementptr inbounds i8, ptr %.04958, i64 8
  %.049 = load ptr, ptr %50, align 8, !tbaa !14
  %.not53 = icmp eq ptr %.049, null
  br i1 %.not53, label %.loopexit, label %35, !llvm.loop !26

._crit_edge64:                                    ; preds = %.loopexit, %._crit_edge.loopexit
  call void @_Z8printarrPiii(ptr noundef nonnull %4, i32 noundef %2, i32 noundef %1)
  ret void
}

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: write)
declare void @llvm.assume(i1 noundef) #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 uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: write) }

!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 = !{!"_ZTS5Graph", !7, i64 0, !10, i64 8}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!7, !7, i64 0}
!12 = !{!13, !10, i64 16}
!13 = !{!"_ZTS7MinHeap", !7, i64 0, !7, i64 4, !10, i64 8, !10, i64 16}
!14 = !{!10, !10, i64 0}
!15 = !{!13, !10, i64 8}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = !{!13, !7, i64 0}
!19 = distinct !{!19, !17}
!20 = !{!21, !7, i64 0}
!21 = !{!"_ZTS11MinHeapNode", !7, i64 0, !7, i64 4}
!22 = !{!6, !10, i64 8}
!23 = !{!24, !7, i64 0}
!24 = !{!"_ZTS11adjListNode", !7, i64 0, !7, i64 4, !10, i64 8}
!25 = !{!24, !7, i64 4}
!26 = distinct !{!26, !17}


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