; LLVM IR from MostafaTwfiq/C-DataStructures-And-Algorithms :: DataStructure/Graphs/Sources (UndirectedGraph)

; 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.UndirectedGraph = type { ptr, ptr, ptr }
%struct.HashMap = type { ptr, i32, i32, i32, ptr, ptr, ptr, ptr }
%struct.UDGraphNode = type { ptr, ptr, ptr, ptr }
%struct.UDGraphEdge = type { ptr, i32 }
%struct.DistanceHolder = type { ptr, ptr, i32 }

@stderr = external global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [31 x i8], align 1

; 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 @undirectedGraphInitialization(ptr noundef, ptr noundef, ptr noundef) #1

; Function Attrs: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #2

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) #3

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

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

declare ptr @hashMapGet(ptr noundef, ptr noundef) #4

declare ptr @arrayListGet(ptr noundef, i32 noundef) #4

declare i32 @arrayListGetLength(ptr noundef) #4

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

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

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

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

declare ptr @priorityQueueInitialization(ptr noundef, ptr noundef) #4

declare void @pQueueEnqueue(ptr noundef, ptr noundef) #4

declare i32 @pQueueIsEmpty(ptr noundef) #4

declare ptr @pQueueDequeue(ptr noundef) #4

declare void @destroyPQueue(ptr noundef) #4

; Function Attrs: nounwind uwtable
define dso_local ptr @udGraphMinimumSpanningGraph(ptr noundef %0, ptr noundef %1) #1 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  %17 = load ptr, ptr %4, align 8, !tbaa !5
  %18 = icmp eq ptr %17, null
  br i1 %18, label %19, label %22

19:                                               ; preds = %2
  %20 = load ptr, ptr @stderr, align 8, !tbaa !5
  %21 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %20, ptr noundef @.str.7, ptr noundef @.str.6, ptr noundef @.str.2) #5
  call void @exit(i32 noundef -83386157) #6
  unreachable

22:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  %23 = load ptr, ptr %4, align 8, !tbaa !5
  %24 = getelementptr inbounds %struct.UndirectedGraph, ptr %23, i32 0, i32 1
  %25 = load ptr, ptr %24, align 8, !tbaa !9
  %26 = load ptr, ptr %4, align 8, !tbaa !5
  %27 = getelementptr inbounds %struct.UndirectedGraph, ptr %26, i32 0, i32 2
  %28 = load ptr, ptr %27, align 8, !tbaa !11
  %29 = load ptr, ptr %4, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct.UndirectedGraph, ptr %29, i32 0, i32 0
  %31 = load ptr, ptr %30, align 8, !tbaa !12
  %32 = getelementptr inbounds %struct.HashMap, ptr %31, i32 0, i32 7
  %33 = load ptr, ptr %32, align 8, !tbaa !13
  %34 = call ptr @undirectedGraphInitialization(ptr noundef %25, ptr noundef %28, ptr noundef %33)
  store ptr %34, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  %35 = load ptr, ptr %4, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.UndirectedGraph, ptr %35, i32 0, i32 0
  %37 = load ptr, ptr %36, align 8, !tbaa !12
  %38 = load ptr, ptr %5, align 8, !tbaa !5
  %39 = call ptr @hashMapGet(ptr noundef %37, ptr noundef %38)
  store ptr %39, ptr %7, align 8, !tbaa !5
  %40 = load ptr, ptr %7, align 8, !tbaa !5
  %41 = icmp eq ptr %40, null
  br i1 %41, label %42, label %44

42:                                               ; preds = %22
  %43 = load ptr, ptr %6, align 8, !tbaa !5
  store ptr %43, ptr %3, align 8
  store i32 1, ptr %8, align 4
  br label %166

44:                                               ; preds = %22
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %45 = call ptr @priorityQueueInitialization(ptr noundef @distanceHolderFreeFun, ptr noundef @distanceHolderComp)
  store ptr %45, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  store i32 0, ptr %10, align 4, !tbaa !16
  br label %46

46:                                               ; preds = %70, %44
  %47 = load i32, ptr %10, align 4, !tbaa !16
  %48 = load ptr, ptr %7, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.UDGraphNode, ptr %48, i32 0, i32 1
  %50 = load ptr, ptr %49, align 8, !tbaa !17
  %51 = call i32 @arrayListGetLength(ptr noundef %50)
  %52 = icmp slt i32 %47, %51
  br i1 %52, label %54, label %53

53:                                               ; preds = %46
  store i32 2, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  br label %73

54:                                               ; preds = %46
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  %55 = load ptr, ptr %7, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.UDGraphNode, ptr %55, i32 0, i32 1
  %57 = load ptr, ptr %56, align 8, !tbaa !17
  %58 = load i32, ptr %10, align 4, !tbaa !16
  %59 = call ptr @arrayListGet(ptr noundef %57, i32 noundef %58)
  store ptr %59, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  %60 = load ptr, ptr %7, align 8, !tbaa !5
  %61 = load ptr, ptr %11, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.UDGraphEdge, ptr %61, i32 0, i32 0
  %63 = load ptr, ptr %62, align 8, !tbaa !19
  %64 = load ptr, ptr %11, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct.UDGraphEdge, ptr %64, i32 0, i32 1
  %66 = load i32, ptr %65, align 8, !tbaa !21
  %67 = call ptr @generateDisHolder(ptr noundef %60, ptr noundef %63, i32 noundef %66)
  store ptr %67, ptr %12, align 8, !tbaa !5
  %68 = load ptr, ptr %9, align 8, !tbaa !5
  %69 = load ptr, ptr %12, align 8, !tbaa !5
  call void @pQueueEnqueue(ptr noundef %68, ptr noundef %69)
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  br label %70

70:                                               ; preds = %54
  %71 = load i32, ptr %10, align 4, !tbaa !16
  %72 = add nsw i32 %71, 1
  store i32 %72, ptr %10, align 4, !tbaa !16
  br label %46, !llvm.loop !22

73:                                               ; preds = %53
  %74 = load ptr, ptr %6, align 8, !tbaa !5
  %75 = load ptr, ptr %5, align 8, !tbaa !5
  call void @udGraphAddNode(ptr noundef %74, ptr noundef %75)
  br label %76

76:                                               ; preds = %162, %160, %73
  %77 = load ptr, ptr %9, align 8, !tbaa !5
  %78 = call i32 @pQueueIsEmpty(ptr noundef %77)
  %79 = icmp ne i32 %78, 0
  %80 = xor i1 %79, true
  br i1 %80, label %81, label %163

81:                                               ; preds = %76
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  %82 = load ptr, ptr %9, align 8, !tbaa !5
  %83 = call ptr @pQueueDequeue(ptr noundef %82)
  store ptr %83, ptr %13, align 8, !tbaa !5
  %84 = load ptr, ptr %6, align 8, !tbaa !5
  %85 = load ptr, ptr %13, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct.DistanceHolder, ptr %85, i32 0, i32 0
  %87 = load ptr, ptr %86, align 8, !tbaa !24
  %88 = getelementptr inbounds %struct.UDGraphNode, ptr %87, i32 0, i32 0
  %89 = load ptr, ptr %88, align 8, !tbaa !26
  %90 = call i32 @udGraphContainsNode(ptr noundef %84, ptr noundef %89)
  %91 = icmp ne i32 %90, 0
  br i1 %91, label %92, label %94

92:                                               ; preds = %81
  %93 = load ptr, ptr %13, align 8, !tbaa !5
  call void @distanceHolderFreeFun(ptr noundef %93)
  store i32 5, ptr %8, align 4
  br label %160, !llvm.loop !27

94:                                               ; preds = %81
  %95 = load ptr, ptr %6, align 8, !tbaa !5
  %96 = load ptr, ptr %13, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct.DistanceHolder, ptr %96, i32 0, i32 0
  %98 = load ptr, ptr %97, align 8, !tbaa !24
  %99 = getelementptr inbounds %struct.UDGraphNode, ptr %98, i32 0, i32 0
  %100 = load ptr, ptr %99, align 8, !tbaa !26
  call void @udGraphAddNode(ptr noundef %95, ptr noundef %100)
  %101 = load ptr, ptr %6, align 8, !tbaa !5
  %102 = load ptr, ptr %13, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct.DistanceHolder, ptr %102, i32 0, i32 1
  %104 = load ptr, ptr %103, align 8, !tbaa !28
  %105 = getelementptr inbounds %struct.UDGraphNode, ptr %104, i32 0, i32 0
  %106 = load ptr, ptr %105, align 8, !tbaa !26
  %107 = load ptr, ptr %13, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct.DistanceHolder, ptr %107, i32 0, i32 0
  %109 = load ptr, ptr %108, align 8, !tbaa !24
  %110 = getelementptr inbounds %struct.UDGraphNode, ptr %109, i32 0, i32 0
  %111 = load ptr, ptr %110, align 8, !tbaa !26
  %112 = load ptr, ptr %13, align 8, !tbaa !5
  %113 = getelementptr inbounds %struct.DistanceHolder, ptr %112, i32 0, i32 2
  %114 = load i32, ptr %113, align 8, !tbaa !29
  call void @udGraphAddEdge(ptr noundef %101, ptr noundef %106, ptr noundef %111, i32 noundef %114)
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  store i32 0, ptr %14, align 4, !tbaa !16
  br label %115

115:                                              ; preds = %155, %94
  %116 = load i32, ptr %14, align 4, !tbaa !16
  %117 = load ptr, ptr %13, align 8, !tbaa !5
  %118 = getelementptr inbounds %struct.DistanceHolder, ptr %117, i32 0, i32 0
  %119 = load ptr, ptr %118, align 8, !tbaa !24
  %120 = getelementptr inbounds %struct.UDGraphNode, ptr %119, i32 0, i32 1
  %121 = load ptr, ptr %120, align 8, !tbaa !17
  %122 = call i32 @arrayListGetLength(ptr noundef %121)
  %123 = icmp slt i32 %116, %122
  br i1 %123, label %125, label %124

124:                                              ; preds = %115
  store i32 7, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  br label %158

125:                                              ; preds = %115
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  %126 = load ptr, ptr %13, align 8, !tbaa !5
  %127 = getelementptr inbounds %struct.DistanceHolder, ptr %126, i32 0, i32 0
  %128 = load ptr, ptr %127, align 8, !tbaa !24
  %129 = getelementptr inbounds %struct.UDGraphNode, ptr %128, i32 0, i32 1
  %130 = load ptr, ptr %129, align 8, !tbaa !17
  %131 = load i32, ptr %14, align 4, !tbaa !16
  %132 = call ptr @arrayListGet(ptr noundef %130, i32 noundef %131)
  store ptr %132, ptr %15, align 8, !tbaa !5
  %133 = load ptr, ptr %6, align 8, !tbaa !5
  %134 = load ptr, ptr %15, align 8, !tbaa !5
  %135 = getelementptr inbounds %struct.UDGraphEdge, ptr %134, i32 0, i32 0
  %136 = load ptr, ptr %135, align 8, !tbaa !19
  %137 = getelementptr inbounds %struct.UDGraphNode, ptr %136, i32 0, i32 0
  %138 = load ptr, ptr %137, align 8, !tbaa !26
  %139 = call i32 @udGraphContainsNode(ptr noundef %133, ptr noundef %138)
  %140 = icmp ne i32 %139, 0
  br i1 %140, label %154, label %141

141:                                              ; preds = %125
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  %142 = load ptr, ptr %13, align 8, !tbaa !5
  %143 = getelementptr inbounds %struct.DistanceHolder, ptr %142, i32 0, i32 0
  %144 = load ptr, ptr %143, align 8, !tbaa !24
  %145 = load ptr, ptr %15, align 8, !tbaa !5
  %146 = getelementptr inbounds %struct.UDGraphEdge, ptr %145, i32 0, i32 0
  %147 = load ptr, ptr %146, align 8, !tbaa !19
  %148 = load ptr, ptr %15, align 8, !tbaa !5
  %149 = getelementptr inbounds %struct.UDGraphEdge, ptr %148, i32 0, i32 1
  %150 = load i32, ptr %149, align 8, !tbaa !21
  %151 = call ptr @generateDisHolder(ptr noundef %144, ptr noundef %147, i32 noundef %150)
  store ptr %151, ptr %16, align 8, !tbaa !5
  %152 = load ptr, ptr %9, align 8, !tbaa !5
  %153 = load ptr, ptr %16, align 8, !tbaa !5
  call void @pQueueEnqueue(ptr noundef %152, ptr noundef %153)
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  br label %154

154:                                              ; preds = %141, %125
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  br label %155

155:                                              ; preds = %154
  %156 = load i32, ptr %14, align 4, !tbaa !16
  %157 = add nsw i32 %156, 1
  store i32 %157, ptr %14, align 4, !tbaa !16
  br label %115, !llvm.loop !30

158:                                              ; preds = %124
  %159 = load ptr, ptr %13, align 8, !tbaa !5
  call void @distanceHolderFreeFun(ptr noundef %159)
  store i32 0, ptr %8, align 4
  br label %160

160:                                              ; preds = %158, %92
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  %161 = load i32, ptr %8, align 4
  switch i32 %161, label %168 [
    i32 0, label %162
    i32 5, label %76
  ]

162:                                              ; preds = %160
  br label %76, !llvm.loop !27

163:                                              ; preds = %76
  %164 = load ptr, ptr %9, align 8, !tbaa !5
  call void @destroyPQueue(ptr noundef %164)
  %165 = load ptr, ptr %6, align 8, !tbaa !5
  store ptr %165, ptr %3, align 8
  store i32 1, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  br label %166

166:                                              ; preds = %163, %42
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  %167 = load ptr, ptr %3, align 8
  ret ptr %167

168:                                              ; preds = %160
  unreachable
}

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 = { 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 #3 = { noreturn 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 #4 = { "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 }
attributes #6 = { noreturn 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, !6, i64 8}
!10 = !{!"UndirectedGraph", !6, i64 0, !6, i64 8, !6, i64 16}
!11 = !{!10, !6, i64 16}
!12 = !{!10, !6, i64 0}
!13 = !{!14, !6, i64 48}
!14 = !{!"HashMap", !6, i64 0, !15, i64 8, !15, i64 12, !15, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48}
!15 = !{!"int", !7, i64 0}
!16 = !{!15, !15, i64 0}
!17 = !{!18, !6, i64 8}
!18 = !{!"UDGraphNode", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!19 = !{!20, !6, i64 0}
!20 = !{!"UDGraphEdge", !6, i64 0, !15, i64 8}
!21 = !{!20, !15, i64 8}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = !{!25, !6, i64 0}
!25 = !{!"DistanceHolder", !6, i64 0, !6, i64 8, !15, i64 16}
!26 = !{!18, !6, i64 0}
!27 = distinct !{!27, !23}
!28 = !{!25, !6, i64 8}
!29 = !{!25, !15, i64 16}
!30 = distinct !{!30, !23}


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

@stderr = external local_unnamed_addr global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [31 x i8], align 1

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

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

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) local_unnamed_addr #2

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

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

declare ptr @hashMapGet(ptr noundef, ptr noundef) local_unnamed_addr #3

declare ptr @arrayListGet(ptr noundef, i32 noundef) local_unnamed_addr #3

declare i32 @arrayListGetLength(ptr noundef) local_unnamed_addr #3

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

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

; Function Attrs: nounwind uwtable
declare dso_local void @distanceHolderFreeFun(ptr noundef) #0

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

declare ptr @priorityQueueInitialization(ptr noundef, ptr noundef) local_unnamed_addr #3

declare void @pQueueEnqueue(ptr noundef, ptr noundef) local_unnamed_addr #3

declare i32 @pQueueIsEmpty(ptr noundef) local_unnamed_addr #3

declare ptr @pQueueDequeue(ptr noundef) local_unnamed_addr #3

declare void @destroyPQueue(ptr noundef) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
define dso_local ptr @udGraphMinimumSpanningGraph(ptr noundef readonly %0, ptr noundef %1) local_unnamed_addr #0 {
  %3 = icmp eq ptr %0, null
  br i1 %3, label %4, label %7

4:                                                ; preds = %2
  %5 = load ptr, ptr @stderr, align 8, !tbaa !5
  %6 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %5, ptr noundef nonnull @.str.7, ptr noundef nonnull @.str.6, ptr noundef nonnull @.str.2) #4
  tail call void @exit(i32 noundef -83386157) #5
  unreachable

7:                                                ; preds = %2
  %8 = getelementptr inbounds i8, ptr %0, i64 8
  %9 = load ptr, ptr %8, align 8, !tbaa !9
  %10 = getelementptr inbounds i8, ptr %0, i64 16
  %11 = load ptr, ptr %10, align 8, !tbaa !11
  %12 = load ptr, ptr %0, align 8, !tbaa !12
  %13 = getelementptr inbounds i8, ptr %12, i64 48
  %14 = load ptr, ptr %13, align 8, !tbaa !13
  %15 = tail call ptr @undirectedGraphInitialization(ptr noundef %9, ptr noundef %11, ptr noundef %14)
  %16 = load ptr, ptr %0, align 8, !tbaa !12
  %17 = tail call ptr @hashMapGet(ptr noundef %16, ptr noundef %1) #6
  %18 = icmp eq ptr %17, null
  br i1 %18, label %76, label %19

19:                                               ; preds = %7
  %20 = tail call ptr @priorityQueueInitialization(ptr noundef nonnull @distanceHolderFreeFun, ptr noundef nonnull @distanceHolderComp) #6
  %21 = getelementptr inbounds i8, ptr %17, i64 8
  %22 = load ptr, ptr %21, align 8, !tbaa !16
  %23 = tail call i32 @arrayListGetLength(ptr noundef %22) #6
  %24 = icmp sgt i32 %23, 0
  br i1 %24, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %19
  tail call void @udGraphAddNode(ptr noundef %15, ptr noundef %1)
  %25 = tail call i32 @pQueueIsEmpty(ptr noundef %20) #6
  %.not56 = icmp eq i32 %25, 0
  br i1 %.not56, label %.lr.ph58, label %._crit_edge59

.lr.ph:                                           ; preds = %19, %.lr.ph
  %.04751 = phi i32 [ %32, %.lr.ph ], [ 0, %19 ]
  %26 = load ptr, ptr %21, align 8, !tbaa !16
  %27 = tail call ptr @arrayListGet(ptr noundef %26, i32 noundef %.04751) #6
  %28 = load ptr, ptr %27, align 8, !tbaa !18
  %29 = getelementptr inbounds i8, ptr %27, i64 8
  %30 = load i32, ptr %29, align 8, !tbaa !20
  %31 = tail call ptr @generateDisHolder(ptr noundef nonnull %17, ptr noundef %28, i32 noundef %30)
  tail call void @pQueueEnqueue(ptr noundef %20, ptr noundef %31) #6
  %32 = add nuw nsw i32 %.04751, 1
  %33 = load ptr, ptr %21, align 8, !tbaa !16
  %34 = tail call i32 @arrayListGetLength(ptr noundef %33) #6
  %35 = icmp slt i32 %32, %34
  br i1 %35, label %.lr.ph, label %._crit_edge, !llvm.loop !21

.lr.ph58:                                         ; preds = %._crit_edge, %._crit_edge55
  %36 = tail call ptr @pQueueDequeue(ptr noundef %20) #6
  %37 = load ptr, ptr %36, align 8, !tbaa !23
  %38 = load ptr, ptr %37, align 8, !tbaa !25
  %39 = tail call i32 @udGraphContainsNode(ptr noundef %15, ptr noundef %38)
  %.not49 = icmp eq i32 %39, 0
  br i1 %.not49, label %40, label %._crit_edge55, !llvm.loop !26

40:                                               ; preds = %.lr.ph58
  %41 = load ptr, ptr %36, align 8, !tbaa !23
  %42 = load ptr, ptr %41, align 8, !tbaa !25
  tail call void @udGraphAddNode(ptr noundef %15, ptr noundef %42)
  %43 = getelementptr inbounds i8, ptr %36, i64 8
  %44 = load ptr, ptr %43, align 8, !tbaa !27
  %45 = load ptr, ptr %44, align 8, !tbaa !25
  %46 = load ptr, ptr %36, align 8, !tbaa !23
  %47 = load ptr, ptr %46, align 8, !tbaa !25
  %48 = getelementptr inbounds i8, ptr %36, i64 16
  %49 = load i32, ptr %48, align 8, !tbaa !28
  tail call void @udGraphAddEdge(ptr noundef %15, ptr noundef %45, ptr noundef %47, i32 noundef %49)
  %50 = load ptr, ptr %36, align 8, !tbaa !23
  %51 = getelementptr inbounds i8, ptr %50, i64 8
  %52 = load ptr, ptr %51, align 8, !tbaa !16
  %53 = tail call i32 @arrayListGetLength(ptr noundef %52) #6
  %54 = icmp sgt i32 %53, 0
  br i1 %54, label %.lr.ph54, label %._crit_edge55

.lr.ph54:                                         ; preds = %40, %68
  %.04652 = phi i32 [ %69, %68 ], [ 0, %40 ]
  %55 = load ptr, ptr %36, align 8, !tbaa !23
  %56 = getelementptr inbounds i8, ptr %55, i64 8
  %57 = load ptr, ptr %56, align 8, !tbaa !16
  %58 = tail call ptr @arrayListGet(ptr noundef %57, i32 noundef %.04652) #6
  %59 = load ptr, ptr %58, align 8, !tbaa !18
  %60 = load ptr, ptr %59, align 8, !tbaa !25
  %61 = tail call i32 @udGraphContainsNode(ptr noundef %15, ptr noundef %60)
  %.not50 = icmp eq i32 %61, 0
  br i1 %.not50, label %62, label %68

62:                                               ; preds = %.lr.ph54
  %63 = load ptr, ptr %36, align 8, !tbaa !23
  %64 = load ptr, ptr %58, align 8, !tbaa !18
  %65 = getelementptr inbounds i8, ptr %58, i64 8
  %66 = load i32, ptr %65, align 8, !tbaa !20
  %67 = tail call ptr @generateDisHolder(ptr noundef %63, ptr noundef %64, i32 noundef %66)
  tail call void @pQueueEnqueue(ptr noundef %20, ptr noundef %67) #6
  br label %68

68:                                               ; preds = %62, %.lr.ph54
  %69 = add nuw nsw i32 %.04652, 1
  %70 = load ptr, ptr %36, align 8, !tbaa !23
  %71 = getelementptr inbounds i8, ptr %70, i64 8
  %72 = load ptr, ptr %71, align 8, !tbaa !16
  %73 = tail call i32 @arrayListGetLength(ptr noundef %72) #6
  %74 = icmp slt i32 %69, %73
  br i1 %74, label %.lr.ph54, label %._crit_edge55, !llvm.loop !29

._crit_edge55:                                    ; preds = %68, %40, %.lr.ph58
  tail call void @distanceHolderFreeFun(ptr noundef nonnull %36)
  %75 = tail call i32 @pQueueIsEmpty(ptr noundef %20) #6
  %.not = icmp eq i32 %75, 0
  br i1 %.not, label %.lr.ph58, label %._crit_edge59

._crit_edge59:                                    ; preds = %._crit_edge55, %._crit_edge
  tail call void @destroyPQueue(ptr noundef %20) #6
  br label %76

76:                                               ; preds = %7, %._crit_edge59
  ret ptr %15
}

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 = { 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 = { noreturn 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 #3 = { "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 = { cold nounwind }
attributes #5 = { noreturn nounwind }
attributes #6 = { 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, !6, i64 8}
!10 = !{!"UndirectedGraph", !6, i64 0, !6, i64 8, !6, i64 16}
!11 = !{!10, !6, i64 16}
!12 = !{!10, !6, i64 0}
!13 = !{!14, !6, i64 48}
!14 = !{!"HashMap", !6, i64 0, !15, i64 8, !15, i64 12, !15, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48}
!15 = !{!"int", !7, i64 0}
!16 = !{!17, !6, i64 8}
!17 = !{!"UDGraphNode", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!18 = !{!19, !6, i64 0}
!19 = !{!"UDGraphEdge", !6, i64 0, !15, i64 8}
!20 = !{!19, !15, i64 8}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}
!23 = !{!24, !6, i64 0}
!24 = !{!"DistanceHolder", !6, i64 0, !6, i64 8, !15, i64 16}
!25 = !{!17, !6, i64 0}
!26 = distinct !{!26, !22}
!27 = !{!24, !6, i64 8}
!28 = !{!24, !15, i64 16}
!29 = distinct !{!29, !22}


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