; LLVM IR from Vishnuparammal/maze_runner :: src (maze)

; 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, float }
%struct.AdjList = type { ptr, float, float, i32, [4 x float] }
%struct.AdjListNode = type { i32, float, i32, ptr }

@graph = external dso_local global ptr, align 8

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

; Function Attrs: nounwind allocsize(0)
declare noalias ptr @malloc(i64 noundef) #1

; 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, float noundef) #2

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

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

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local ptr @dijkstra(i32 noundef %0, i32 noundef %1, ptr noundef %2) #2 {
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  store i32 %0, ptr %4, align 4, !tbaa !5
  store i32 %1, ptr %5, align 4, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #3
  %16 = load ptr, ptr @graph, align 8, !tbaa !9
  %17 = getelementptr inbounds %struct.Graph, ptr %16, i32 0, i32 0
  %18 = load i32, ptr %17, align 8, !tbaa !11
  store i32 %18, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #3
  %19 = load i32, ptr %7, align 4, !tbaa !5
  %20 = sext i32 %19 to i64
  %21 = mul i64 %20, 4
  %22 = call noalias ptr @malloc(i64 noundef %21) #4
  store ptr %22, ptr %8, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #3
  %23 = load i32, ptr %7, align 4, !tbaa !5
  %24 = sext i32 %23 to i64
  %25 = mul i64 %24, 4
  %26 = call noalias ptr @malloc(i64 noundef %25) #4
  store ptr %26, ptr %9, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #3
  %27 = load i32, ptr %7, align 4, !tbaa !5
  %28 = call ptr @createMinHeap(i32 noundef %27)
  store ptr %28, ptr %10, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #3
  store i32 0, ptr %11, align 4, !tbaa !5
  br label %29

29:                                               ; preds = %63, %3
  %30 = load i32, ptr %11, align 4, !tbaa !5
  %31 = load i32, ptr %7, align 4, !tbaa !5
  %32 = icmp slt i32 %30, %31
  br i1 %32, label %34, label %33

33:                                               ; preds = %29
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #3
  br label %66

34:                                               ; preds = %29
  %35 = load ptr, ptr %9, align 8, !tbaa !9
  %36 = load i32, ptr %11, align 4, !tbaa !5
  %37 = sext i32 %36 to i64
  %38 = getelementptr inbounds i32, ptr %35, i64 %37
  store i32 -1, ptr %38, align 4, !tbaa !5
  %39 = load ptr, ptr %8, align 8, !tbaa !9
  %40 = load i32, ptr %11, align 4, !tbaa !5
  %41 = sext i32 %40 to i64
  %42 = getelementptr inbounds float, ptr %39, i64 %41
  store float 0x41E0000000000000, ptr %42, align 4, !tbaa !13
  %43 = load i32, ptr %11, align 4, !tbaa !5
  %44 = load ptr, ptr %8, align 8, !tbaa !9
  %45 = load i32, ptr %11, align 4, !tbaa !5
  %46 = sext i32 %45 to i64
  %47 = getelementptr inbounds float, ptr %44, i64 %46
  %48 = load float, ptr %47, align 4, !tbaa !13
  %49 = call ptr @newMinHeapNode(i32 noundef %43, float noundef %48)
  %50 = load ptr, ptr %10, align 8, !tbaa !9
  %51 = getelementptr inbounds %struct.MinHeap, ptr %50, i32 0, i32 3
  %52 = load ptr, ptr %51, align 8, !tbaa !15
  %53 = load i32, ptr %11, align 4, !tbaa !5
  %54 = sext i32 %53 to i64
  %55 = getelementptr inbounds ptr, ptr %52, i64 %54
  store ptr %49, ptr %55, align 8, !tbaa !9
  %56 = load i32, ptr %11, align 4, !tbaa !5
  %57 = load ptr, ptr %10, align 8, !tbaa !9
  %58 = getelementptr inbounds %struct.MinHeap, ptr %57, i32 0, i32 2
  %59 = load ptr, ptr %58, align 8, !tbaa !17
  %60 = load i32, ptr %11, align 4, !tbaa !5
  %61 = sext i32 %60 to i64
  %62 = getelementptr inbounds i32, ptr %59, i64 %61
  store i32 %56, ptr %62, align 4, !tbaa !5
  br label %63

63:                                               ; preds = %34
  %64 = load i32, ptr %11, align 4, !tbaa !5
  %65 = add nsw i32 %64, 1
  store i32 %65, ptr %11, align 4, !tbaa !5
  br label %29, !llvm.loop !18

66:                                               ; preds = %33
  %67 = load i32, ptr %4, align 4, !tbaa !5
  %68 = load ptr, ptr %8, align 8, !tbaa !9
  %69 = load i32, ptr %4, align 4, !tbaa !5
  %70 = sext i32 %69 to i64
  %71 = getelementptr inbounds float, ptr %68, i64 %70
  %72 = load float, ptr %71, align 4, !tbaa !13
  %73 = call ptr @newMinHeapNode(i32 noundef %67, float noundef %72)
  %74 = load ptr, ptr %10, align 8, !tbaa !9
  %75 = getelementptr inbounds %struct.MinHeap, ptr %74, i32 0, i32 3
  %76 = load ptr, ptr %75, align 8, !tbaa !15
  %77 = load i32, ptr %4, align 4, !tbaa !5
  %78 = sext i32 %77 to i64
  %79 = getelementptr inbounds ptr, ptr %76, i64 %78
  store ptr %73, ptr %79, align 8, !tbaa !9
  %80 = load i32, ptr %4, align 4, !tbaa !5
  %81 = load ptr, ptr %10, align 8, !tbaa !9
  %82 = getelementptr inbounds %struct.MinHeap, ptr %81, i32 0, i32 2
  %83 = load ptr, ptr %82, align 8, !tbaa !17
  %84 = load i32, ptr %4, align 4, !tbaa !5
  %85 = sext i32 %84 to i64
  %86 = getelementptr inbounds i32, ptr %83, i64 %85
  store i32 %80, ptr %86, align 4, !tbaa !5
  %87 = load ptr, ptr %8, align 8, !tbaa !9
  %88 = load i32, ptr %4, align 4, !tbaa !5
  %89 = sext i32 %88 to i64
  %90 = getelementptr inbounds float, ptr %87, i64 %89
  store float 0.000000e+00, ptr %90, align 4, !tbaa !13
  %91 = load ptr, ptr %10, align 8, !tbaa !9
  %92 = load i32, ptr %4, align 4, !tbaa !5
  %93 = load ptr, ptr %8, align 8, !tbaa !9
  %94 = load i32, ptr %4, align 4, !tbaa !5
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds float, ptr %93, i64 %95
  %97 = load float, ptr %96, align 4, !tbaa !13
  call void @decreaseKey(ptr noundef %91, i32 noundef %92, float noundef %97)
  %98 = load i32, ptr %7, align 4, !tbaa !5
  %99 = load ptr, ptr %10, align 8, !tbaa !9
  %100 = getelementptr inbounds %struct.MinHeap, ptr %99, i32 0, i32 0
  store i32 %98, ptr %100, align 8, !tbaa !20
  br label %101

101:                                              ; preds = %183, %66
  %102 = load ptr, ptr %10, align 8, !tbaa !9
  %103 = call i32 @isEmpty(ptr noundef %102)
  %104 = icmp ne i32 %103, 0
  %105 = xor i1 %104, true
  br i1 %105, label %106, label %184

106:                                              ; preds = %101
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #3
  %107 = load ptr, ptr %10, align 8, !tbaa !9
  %108 = call ptr @extractMin(ptr noundef %107)
  store ptr %108, ptr %12, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #3
  %109 = load ptr, ptr %12, align 8, !tbaa !9
  %110 = getelementptr inbounds %struct.MinHeapNode, ptr %109, i32 0, i32 0
  %111 = load i32, ptr %110, align 4, !tbaa !21
  store i32 %111, ptr %13, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #3
  %112 = load ptr, ptr @graph, align 8, !tbaa !9
  %113 = getelementptr inbounds %struct.Graph, ptr %112, i32 0, i32 1
  %114 = load ptr, ptr %113, align 8, !tbaa !23
  %115 = load i32, ptr %13, align 4, !tbaa !5
  %116 = sext i32 %115 to i64
  %117 = getelementptr inbounds %struct.AdjList, ptr %114, i64 %116
  %118 = getelementptr inbounds %struct.AdjList, ptr %117, i32 0, i32 0
  %119 = load ptr, ptr %118, align 8, !tbaa !24
  store ptr %119, ptr %14, align 8, !tbaa !9
  br label %120

120:                                              ; preds = %179, %106
  %121 = load ptr, ptr %14, align 8, !tbaa !9
  %122 = icmp ne ptr %121, null
  br i1 %122, label %123, label %183

123:                                              ; preds = %120
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #3
  %124 = load ptr, ptr %14, align 8, !tbaa !9
  %125 = getelementptr inbounds %struct.AdjListNode, ptr %124, i32 0, i32 0
  %126 = load i32, ptr %125, align 8, !tbaa !26
  store i32 %126, ptr %15, align 4, !tbaa !5
  %127 = load ptr, ptr %10, align 8, !tbaa !9
  %128 = load i32, ptr %15, align 4, !tbaa !5
  %129 = call zeroext i1 @isInMinHeap(ptr noundef %127, i32 noundef %128)
  br i1 %129, label %130, label %179

130:                                              ; preds = %123
  %131 = load ptr, ptr %8, align 8, !tbaa !9
  %132 = load i32, ptr %13, align 4, !tbaa !5
  %133 = sext i32 %132 to i64
  %134 = getelementptr inbounds float, ptr %131, i64 %133
  %135 = load float, ptr %134, align 4, !tbaa !13
  %136 = fcmp une float %135, 0x41E0000000000000
  br i1 %136, label %137, label %179

137:                                              ; preds = %130
  %138 = load ptr, ptr %14, align 8, !tbaa !9
  %139 = getelementptr inbounds %struct.AdjListNode, ptr %138, i32 0, i32 1
  %140 = load float, ptr %139, align 4, !tbaa !28
  %141 = load ptr, ptr %8, align 8, !tbaa !9
  %142 = load i32, ptr %13, align 4, !tbaa !5
  %143 = sext i32 %142 to i64
  %144 = getelementptr inbounds float, ptr %141, i64 %143
  %145 = load float, ptr %144, align 4, !tbaa !13
  %146 = fadd float %140, %145
  %147 = load ptr, ptr %8, align 8, !tbaa !9
  %148 = load i32, ptr %15, align 4, !tbaa !5
  %149 = sext i32 %148 to i64
  %150 = getelementptr inbounds float, ptr %147, i64 %149
  %151 = load float, ptr %150, align 4, !tbaa !13
  %152 = fcmp olt float %146, %151
  br i1 %152, label %153, label %179

153:                                              ; preds = %137
  %154 = load i32, ptr %13, align 4, !tbaa !5
  %155 = load ptr, ptr %9, align 8, !tbaa !9
  %156 = load i32, ptr %15, align 4, !tbaa !5
  %157 = sext i32 %156 to i64
  %158 = getelementptr inbounds i32, ptr %155, i64 %157
  store i32 %154, ptr %158, align 4, !tbaa !5
  %159 = load ptr, ptr %8, align 8, !tbaa !9
  %160 = load i32, ptr %13, align 4, !tbaa !5
  %161 = sext i32 %160 to i64
  %162 = getelementptr inbounds float, ptr %159, i64 %161
  %163 = load float, ptr %162, align 4, !tbaa !13
  %164 = load ptr, ptr %14, align 8, !tbaa !9
  %165 = getelementptr inbounds %struct.AdjListNode, ptr %164, i32 0, i32 1
  %166 = load float, ptr %165, align 4, !tbaa !28
  %167 = fadd float %163, %166
  %168 = load ptr, ptr %8, align 8, !tbaa !9
  %169 = load i32, ptr %15, align 4, !tbaa !5
  %170 = sext i32 %169 to i64
  %171 = getelementptr inbounds float, ptr %168, i64 %170
  store float %167, ptr %171, align 4, !tbaa !13
  %172 = load ptr, ptr %10, align 8, !tbaa !9
  %173 = load i32, ptr %15, align 4, !tbaa !5
  %174 = load ptr, ptr %8, align 8, !tbaa !9
  %175 = load i32, ptr %15, align 4, !tbaa !5
  %176 = sext i32 %175 to i64
  %177 = getelementptr inbounds float, ptr %174, i64 %176
  %178 = load float, ptr %177, align 4, !tbaa !13
  call void @decreaseKey(ptr noundef %172, i32 noundef %173, float noundef %178)
  br label %179

179:                                              ; preds = %153, %137, %130, %123
  %180 = load ptr, ptr %14, align 8, !tbaa !9
  %181 = getelementptr inbounds %struct.AdjListNode, ptr %180, i32 0, i32 3
  %182 = load ptr, ptr %181, align 8, !tbaa !29
  store ptr %182, ptr %14, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #3
  br label %120, !llvm.loop !30

183:                                              ; preds = %120
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #3
  br label %101, !llvm.loop !31

184:                                              ; preds = %101
  %185 = load ptr, ptr %9, align 8, !tbaa !9
  %186 = load i32, ptr %4, align 4, !tbaa !5
  %187 = load i32, ptr %5, align 4, !tbaa !5
  %188 = load ptr, ptr %6, align 8, !tbaa !9
  %189 = call ptr @getDirection(ptr noundef %185, i32 noundef %186, i32 noundef %187, ptr noundef %188)
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #3
  ret ptr %189
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nounwind allocsize(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 = { 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 #3 = { nounwind }
attributes #4 = { nounwind allocsize(0) }

!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/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !6, i64 0}
!12 = !{!"Graph", !6, i64 0, !10, i64 8}
!13 = !{!14, !14, i64 0}
!14 = !{!"float", !7, i64 0}
!15 = !{!16, !10, i64 16}
!16 = !{!"MinHeap", !6, i64 0, !6, i64 4, !10, i64 8, !10, i64 16}
!17 = !{!16, !10, i64 8}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = !{!16, !6, i64 0}
!21 = !{!22, !6, i64 0}
!22 = !{!"MinHeapNode", !6, i64 0, !14, i64 4}
!23 = !{!12, !10, i64 8}
!24 = !{!25, !10, i64 0}
!25 = !{!"AdjList", !10, i64 0, !14, i64 8, !14, i64 12, !6, i64 16, !7, i64 20}
!26 = !{!27, !6, i64 0}
!27 = !{!"AdjListNode", !6, i64 0, !14, i64 4, !6, i64 8, !10, i64 16}
!28 = !{!27, !14, i64 4}
!29 = !{!27, !10, i64 16}
!30 = distinct !{!30, !19}
!31 = distinct !{!31, !19}


; 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, float, float, i32, [4 x float] }

@graph = external dso_local local_unnamed_addr global ptr, align 8

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #0

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

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

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

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local ptr @dijkstra(i32 noundef %0, i32 noundef %1, ptr noundef %2) local_unnamed_addr #1 {
.lr.ph:
  %3 = load ptr, ptr @graph, align 8, !tbaa !5
  %4 = load i32, ptr %3, align 8, !tbaa !9
  %5 = sext i32 %4 to i64
  %6 = shl nsw i64 %5, 2
  %7 = tail call noalias ptr @malloc(i64 noundef %6) #3
  %8 = tail call noalias ptr @malloc(i64 noundef %6) #3
  %9 = tail call ptr @createMinHeap(i32 noundef %4)
  %10 = icmp sgt i32 %4, 0
  tail call void @llvm.assume(i1 %10)
  %11 = getelementptr inbounds i8, ptr %9, i64 16
  %12 = getelementptr inbounds i8, ptr %9, i64 8
  %wide.trip.count = zext nneg i32 %4 to i64
  br label %22

._crit_edge.loopexit:                             ; preds = %22
  %.phi.trans.insert = sext i32 %0 to i64
  %.phi.trans.insert80 = getelementptr inbounds float, ptr %7, i64 %.phi.trans.insert
  %.pre = load float, ptr %.phi.trans.insert80, align 4, !tbaa !12
  %13 = getelementptr inbounds float, ptr %7, i64 %.phi.trans.insert
  %14 = tail call ptr @newMinHeapNode(i32 noundef %0, float noundef %.pre)
  %15 = getelementptr inbounds i8, ptr %9, i64 16
  %16 = load ptr, ptr %15, align 8, !tbaa !14
  %17 = getelementptr inbounds ptr, ptr %16, i64 %.phi.trans.insert
  store ptr %14, ptr %17, align 8, !tbaa !5
  %18 = getelementptr inbounds i8, ptr %9, i64 8
  %19 = load ptr, ptr %18, align 8, !tbaa !16
  %20 = getelementptr inbounds i32, ptr %19, i64 %.phi.trans.insert
  store i32 %0, ptr %20, align 4, !tbaa !17
  store float 0.000000e+00, ptr %13, align 4, !tbaa !12
  tail call void @decreaseKey(ptr noundef %9, i32 noundef %0, float noundef 0.000000e+00)
  store i32 %4, ptr %9, align 8, !tbaa !18
  %21 = tail call i32 @isEmpty(ptr noundef nonnull %9)
  %.not75 = icmp eq i32 %21, 0
  br i1 %.not75, label %.lr.ph77, label %._crit_edge78

22:                                               ; preds = %.lr.ph, %22
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %22 ]
  %23 = getelementptr inbounds i32, ptr %8, i64 %indvars.iv
  store i32 -1, ptr %23, align 4, !tbaa !17
  %24 = getelementptr inbounds float, ptr %7, i64 %indvars.iv
  store float 0x41E0000000000000, ptr %24, align 4, !tbaa !12
  %25 = trunc nuw nsw i64 %indvars.iv to i32
  %26 = tail call ptr @newMinHeapNode(i32 noundef %25, float noundef 0x41E0000000000000)
  %27 = load ptr, ptr %11, align 8, !tbaa !14
  %28 = getelementptr inbounds ptr, ptr %27, i64 %indvars.iv
  store ptr %26, ptr %28, align 8, !tbaa !5
  %29 = load ptr, ptr %12, align 8, !tbaa !16
  %30 = getelementptr inbounds i32, ptr %29, i64 %indvars.iv
  store i32 %25, ptr %30, align 4, !tbaa !17
  %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.loopexit, label %22, !llvm.loop !19

.loopexit:                                        ; preds = %56, %.lr.ph77
  %31 = tail call i32 @isEmpty(ptr noundef nonnull %9)
  %.not = icmp eq i32 %31, 0
  br i1 %.not, label %.lr.ph77, label %._crit_edge78, !llvm.loop !21

.lr.ph77:                                         ; preds = %._crit_edge.loopexit, %.loopexit
  %32 = tail call ptr @extractMin(ptr noundef nonnull %9)
  %33 = load i32, ptr %32, align 4, !tbaa !22
  %34 = load ptr, ptr @graph, align 8, !tbaa !5
  %35 = getelementptr inbounds i8, ptr %34, i64 8
  %36 = load ptr, ptr %35, align 8, !tbaa !24
  %37 = sext i32 %33 to i64
  %38 = getelementptr inbounds %struct.AdjList, ptr %36, i64 %37
  %.06570 = load ptr, ptr %38, align 8, !tbaa !5
  %.not6871 = icmp eq ptr %.06570, null
  br i1 %.not6871, label %.loopexit, label %.lr.ph74

.lr.ph74:                                         ; preds = %.lr.ph77
  %39 = getelementptr inbounds float, ptr %7, i64 %37
  br label %40

40:                                               ; preds = %.lr.ph74, %56
  %.06572 = phi ptr [ %.06570, %.lr.ph74 ], [ %.065, %56 ]
  %41 = load i32, ptr %.06572, align 8, !tbaa !25
  %42 = tail call zeroext i1 @isInMinHeap(ptr noundef nonnull %9, i32 noundef %41)
  br i1 %42, label %43, label %56

43:                                               ; preds = %40
  %44 = load float, ptr %39, align 4, !tbaa !12
  %45 = fcmp une float %44, 0x41E0000000000000
  br i1 %45, label %46, label %56

46:                                               ; preds = %43
  %47 = getelementptr inbounds i8, ptr %.06572, i64 4
  %48 = load float, ptr %47, align 4, !tbaa !27
  %49 = fadd float %44, %48
  %50 = sext i32 %41 to i64
  %51 = getelementptr inbounds float, ptr %7, i64 %50
  %52 = load float, ptr %51, align 4, !tbaa !12
  %53 = fcmp olt float %49, %52
  br i1 %53, label %54, label %56

54:                                               ; preds = %46
  %55 = getelementptr inbounds i32, ptr %8, i64 %50
  store i32 %33, ptr %55, align 4, !tbaa !17
  store float %49, ptr %51, align 4, !tbaa !12
  tail call void @decreaseKey(ptr noundef nonnull %9, i32 noundef %41, float noundef %49)
  br label %56

56:                                               ; preds = %54, %46, %43, %40
  %57 = getelementptr inbounds i8, ptr %.06572, i64 16
  %.065 = load ptr, ptr %57, align 8, !tbaa !5
  %.not68 = icmp eq ptr %.065, null
  br i1 %.not68, label %.loopexit, label %40, !llvm.loop !28

._crit_edge78:                                    ; preds = %.loopexit, %._crit_edge.loopexit
  %58 = tail call ptr @getDirection(ptr noundef %8, i32 noundef %0, i32 noundef %1, ptr noundef %2)
  ret ptr %58
}

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

attributes #0 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "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 = { 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 memory(inaccessiblemem: write) }
attributes #3 = { nounwind allocsize(0) }

!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, !11, i64 0}
!10 = !{!"Graph", !11, i64 0, !6, i64 8}
!11 = !{!"int", !7, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"float", !7, i64 0}
!14 = !{!15, !6, i64 16}
!15 = !{!"MinHeap", !11, i64 0, !11, i64 4, !6, i64 8, !6, i64 16}
!16 = !{!15, !6, i64 8}
!17 = !{!11, !11, i64 0}
!18 = !{!15, !11, i64 0}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = distinct !{!21, !20}
!22 = !{!23, !11, i64 0}
!23 = !{!"MinHeapNode", !11, i64 0, !13, i64 4}
!24 = !{!10, !6, i64 8}
!25 = !{!26, !11, i64 0}
!26 = !{!"AdjListNode", !11, i64 0, !13, i64 4, !11, i64 8, !6, i64 16}
!27 = !{!26, !13, i64 4}
!28 = distinct !{!28, !20}


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