; LLVM IR from FOSS-UCSC/FOSSALGO :: algorithms/gr-dij/c (dijkstra_algorithm)

; 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: nounwind uwtable
declare dso_local ptr @newMinHeapNode(i32 noundef, i32 noundef) #1

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

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

; Function Attrs: nounwind uwtable
declare dso_local ptr @extractMin(ptr noundef) #1

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

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

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

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

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

27:                                               ; preds = %23
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #3
  br label %54

28:                                               ; preds = %23
  %29 = load i32, ptr %9, align 4, !tbaa !9
  %30 = sext i32 %29 to i64
  %31 = getelementptr inbounds i32, ptr %20, i64 %30
  store i32 2147483647, ptr %31, align 4, !tbaa !9
  %32 = load i32, ptr %9, align 4, !tbaa !9
  %33 = load i32, ptr %9, align 4, !tbaa !9
  %34 = sext i32 %33 to i64
  %35 = getelementptr inbounds i32, ptr %20, i64 %34
  %36 = load i32, ptr %35, align 4, !tbaa !9
  %37 = call ptr @newMinHeapNode(i32 noundef %32, i32 noundef %36)
  %38 = load ptr, ptr %8, 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 %9, 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 %9, align 4, !tbaa !9
  %45 = load ptr, ptr %8, 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 %9, 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 %9, align 4, !tbaa !9
  %53 = add nsw i32 %52, 1
  store i32 %53, ptr %9, align 4, !tbaa !9
  br label %23, !llvm.loop !16

54:                                               ; preds = %27
  %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 %20, i64 %57
  %59 = load i32, ptr %58, align 4, !tbaa !9
  %60 = call ptr @newMinHeapNode(i32 noundef %55, i32 noundef %59)
  %61 = load ptr, ptr %8, 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 %8, 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 %20, i64 %75
  store i32 0, ptr %76, align 4, !tbaa !9
  %77 = load ptr, ptr %8, 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 %20, i64 %80
  %82 = load i32, ptr %81, align 4, !tbaa !9
  call void @decreaseKey(ptr noundef %77, i32 noundef %78, i32 noundef %82)
  %83 = load i32, ptr %5, align 4, !tbaa !9
  %84 = load ptr, ptr %8, 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 = %158, %54
  %87 = load ptr, ptr %8, align 8, !tbaa !5
  %88 = call i32 @isEmpty(ptr noundef %87)
  %89 = icmp ne i32 %88, 0
  %90 = xor i1 %89, true
  br i1 %90, label %91, label %159

91:                                               ; preds = %86
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #3
  %92 = load ptr, ptr %8, align 8, !tbaa !5
  %93 = call ptr @extractMin(ptr noundef %92)
  store ptr %93, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #3
  %94 = load ptr, ptr %10, 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 %11, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #3
  %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 %11, 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 %12, align 8, !tbaa !5
  br label %105

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

108:                                              ; preds = %105
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #3
  %109 = load ptr, ptr %12, 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 %13, align 4, !tbaa !9
  %112 = load ptr, ptr %8, align 8, !tbaa !5
  %113 = load i32, ptr %13, align 4, !tbaa !9
  %114 = call i32 @isInMinHeap(ptr noundef %112, i32 noundef %113)
  %115 = icmp ne i32 %114, 0
  br i1 %115, label %116, label %154

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

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

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

154:                                              ; preds = %136, %122, %116, %108
  %155 = load ptr, ptr %12, align 8, !tbaa !5
  %156 = getelementptr inbounds %struct.AdjListNode, ptr %155, i32 0, i32 2
  %157 = load ptr, ptr %156, align 8, !tbaa !27
  store ptr %157, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #3
  br label %105, !llvm.loop !28

158:                                              ; preds = %105
  call void @llvm.lifetime.end.p0(i64 8, 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
  br label %86, !llvm.loop !29

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

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 = { nocallback nofree nosync nounwind willreturn }
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/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 0}
!12 = !{!"Graph", !10, i64 0, !6, i64 8}
!13 = !{!14, !6, i64 16}
!14 = !{!"MinHeap", !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 = !{!"MinHeapNode", !10, i64 0, !10, i64 4}
!21 = !{!12, !6, i64 8}
!22 = !{!23, !6, i64 0}
!23 = !{!"AdjList", !6, i64 0}
!24 = !{!25, !10, i64 0}
!25 = !{!"AdjListNode", !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: nounwind uwtable
declare dso_local ptr @newMinHeapNode(i32 noundef, i32 noundef) local_unnamed_addr #0

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

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

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local void @dijkstra(ptr nocapture noundef readonly %0, i32 noundef %1) local_unnamed_addr #0 {
.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 ptr @createMinHeap(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 %19

._crit_edge.loopexit:                             ; preds = %19
  %.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
  %9 = getelementptr inbounds i32, ptr %4, i64 %.phi.trans.insert
  %10 = tail call ptr @newMinHeapNode(i32 noundef %1, i32 noundef %.pre)
  %11 = getelementptr inbounds i8, ptr %5, i64 16
  %12 = load ptr, ptr %11, align 8, !tbaa !12
  %13 = getelementptr inbounds ptr, ptr %12, i64 %.phi.trans.insert
  store ptr %10, ptr %13, align 8, !tbaa !14
  %14 = getelementptr inbounds i8, ptr %5, i64 8
  %15 = load ptr, ptr %14, align 8, !tbaa !15
  %16 = getelementptr inbounds i32, ptr %15, i64 %.phi.trans.insert
  store i32 %1, ptr %16, align 4, !tbaa !11
  store i32 0, ptr %9, align 4, !tbaa !11
  tail call void @decreaseKey(ptr noundef %5, i32 noundef %1, i32 noundef 0)
  store i32 %2, ptr %5, align 8, !tbaa !16
  %17 = tail call i32 @isEmpty(ptr noundef nonnull %5)
  %.not61 = icmp eq i32 %17, 0
  br i1 %.not61, label %.lr.ph63, label %._crit_edge64

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

19:                                               ; preds = %.lr.ph, %19
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %19 ]
  %20 = getelementptr inbounds i32, ptr %4, i64 %indvars.iv
  store i32 2147483647, ptr %20, align 4, !tbaa !11
  %21 = trunc nuw nsw i64 %indvars.iv to i32
  %22 = tail call ptr @newMinHeapNode(i32 noundef %21, i32 noundef 2147483647)
  %23 = load ptr, ptr %7, align 8, !tbaa !12
  %24 = getelementptr inbounds ptr, ptr %23, i64 %indvars.iv
  store ptr %22, ptr %24, align 8, !tbaa !14
  %25 = load ptr, ptr %8, align 8, !tbaa !15
  %26 = getelementptr inbounds i32, ptr %25, i64 %indvars.iv
  store i32 %21, ptr %26, 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 %19, !llvm.loop !17

.loopexit:                                        ; preds = %49, %28
  %27 = tail call i32 @isEmpty(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 ptr @extractMin(ptr noundef nonnull %5)
  %30 = load i32, ptr %29, align 4, !tbaa !20
  %31 = load ptr, ptr %18, align 8, !tbaa !22
  %32 = sext i32 %30 to i64
  %33 = getelementptr inbounds %struct.AdjList, ptr %31, i64 %32
  %.04856 = load ptr, ptr %33, align 8, !tbaa !14
  %.not5257 = icmp eq ptr %.04856, null
  br i1 %.not5257, 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
  %.04858 = phi ptr [ %.04856, %.lr.ph60 ], [ %.048, %49 ]
  %36 = load i32, ptr %.04858, align 8, !tbaa !23
  %37 = tail call i32 @isInMinHeap(ptr noundef nonnull %5, i32 noundef %36)
  %.not53 = icmp eq i32 %37, 0
  br i1 %.not53, label %49, label %38

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 %.04858, 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 @decreaseKey(ptr noundef nonnull %5, i32 noundef %36, i32 noundef %43)
  br label %49

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

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

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: write)
declare void @llvm.assume(i1 noundef) #1

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


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