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

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

; Function Attrs: nounwind
declare void @free(ptr noundef) #1

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

declare ptr @hashMapInitialization(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #2

declare void @hashMapInsert(ptr noundef, ptr noundef, ptr noundef) #2

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

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

declare i32 @arrayListGetLength(ptr noundef) #2

; Function Attrs: nounwind uwtable
declare dso_local void @UDGFreeUintptr_t(ptr noundef) #3

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @uintptr_tHashFunUDirG(ptr noundef) #3

declare ptr @hashSetInitialization(ptr noundef, ptr noundef, ptr noundef) #2

declare void @hashSetInsert(ptr noundef, ptr noundef) #2

declare i32 @hashSetContains(ptr noundef, ptr noundef) #2

declare void @destroyHashSet(ptr noundef) #2

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

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

; Function Attrs: nounwind uwtable
declare dso_local ptr @generateNodeValAddress(ptr noundef) #3

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

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

; Function Attrs: nounwind uwtable
define dso_local ptr @UDGraphGenerateDistancesMap(ptr noundef %0) #3 {
  %2 = alloca ptr, align 8
  %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 ptr, align 8
  %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
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #4
  %14 = call ptr @priorityQueueInitialization(ptr noundef @distanceHolderFreeFun, ptr noundef @distanceHolderComp)
  store ptr %14, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #4
  %15 = call ptr @hashSetInitialization(ptr noundef @UDGFreeUintptr_t, ptr noundef @UDGCompUintptr_t, ptr noundef @uintptr_tHashFunUDirG)
  store ptr %15, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #4
  %16 = call ptr @hashSetInitialization(ptr noundef @UDGFreeUintptr_t, ptr noundef @UDGCompUintptr_t, ptr noundef @uintptr_tHashFunUDirG)
  store ptr %16, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #4
  %17 = call ptr @hashMapInitialization(ptr noundef @UDGFreeUintptr_t, ptr noundef @distanceHolderFreeFun, ptr noundef @UDGCompUintptr_t, ptr noundef @uintptr_tHashFunUDirG)
  store ptr %17, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  %18 = load ptr, ptr %2, align 8, !tbaa !5
  %19 = load ptr, ptr %2, align 8, !tbaa !5
  %20 = call ptr @generateDisHolder(ptr noundef %18, ptr noundef %19, i32 noundef 0)
  store ptr %20, ptr %7, align 8, !tbaa !5
  %21 = load ptr, ptr %3, align 8, !tbaa !5
  %22 = load ptr, ptr %7, align 8, !tbaa !5
  call void @pQueueEnqueue(ptr noundef %21, ptr noundef %22)
  %23 = load ptr, ptr %4, align 8, !tbaa !5
  %24 = load ptr, ptr %2, align 8, !tbaa !5
  %25 = call ptr @generateNodeValAddress(ptr noundef %24)
  call void @hashSetInsert(ptr noundef %23, ptr noundef %25)
  %26 = load ptr, ptr %6, align 8, !tbaa !5
  %27 = load ptr, ptr %2, align 8, !tbaa !5
  %28 = call ptr @generateNodeValAddress(ptr noundef %27)
  %29 = load ptr, ptr %7, align 8, !tbaa !5
  call void @hashMapInsert(ptr noundef %26, ptr noundef %28, ptr noundef %29)
  br label %30

30:                                               ; preds = %134, %1
  %31 = load ptr, ptr %3, align 8, !tbaa !5
  %32 = call i32 @pQueueIsEmpty(ptr noundef %31)
  %33 = icmp ne i32 %32, 0
  %34 = xor i1 %33, true
  br i1 %34, label %35, label %135

35:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  %36 = load ptr, ptr %3, align 8, !tbaa !5
  %37 = call ptr @pQueueDequeue(ptr noundef %36)
  store ptr %37, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  %38 = load ptr, ptr %8, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct.DistanceHolder, ptr %38, i32 0, i32 0
  %40 = load ptr, ptr %39, align 8, !tbaa !9
  store ptr %40, ptr %9, align 8, !tbaa !5
  %41 = load ptr, ptr %5, align 8, !tbaa !5
  %42 = load ptr, ptr %9, align 8, !tbaa !5
  %43 = call ptr @generateNodeValAddress(ptr noundef %42)
  call void @hashSetInsert(ptr noundef %41, ptr noundef %43)
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  store i32 0, ptr %10, align 4, !tbaa !12
  br label %44

44:                                               ; preds = %131, %35
  %45 = load i32, ptr %10, align 4, !tbaa !12
  %46 = load ptr, ptr %9, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct.UDGraphNode, ptr %46, i32 0, i32 1
  %48 = load ptr, ptr %47, align 8, !tbaa !13
  %49 = call i32 @arrayListGetLength(ptr noundef %48)
  %50 = icmp slt i32 %45, %49
  br i1 %50, label %52, label %51

51:                                               ; preds = %44
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  br label %134

52:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  %53 = load ptr, ptr %9, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.UDGraphNode, ptr %53, i32 0, i32 1
  %55 = load ptr, ptr %54, align 8, !tbaa !13
  %56 = load i32, ptr %10, align 4, !tbaa !12
  %57 = call ptr @arrayListGet(ptr noundef %55, i32 noundef %56)
  store ptr %57, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  %58 = load ptr, ptr %11, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.UDGraphEdge, ptr %58, i32 0, i32 0
  %60 = load ptr, ptr %59, align 8, !tbaa !15
  %61 = call ptr @generateNodeValAddress(ptr noundef %60)
  store ptr %61, ptr %12, align 8, !tbaa !5
  %62 = load ptr, ptr %5, align 8, !tbaa !5
  %63 = load ptr, ptr %12, align 8, !tbaa !5
  %64 = call i32 @hashSetContains(ptr noundef %62, ptr noundef %63)
  %65 = icmp ne i32 %64, 0
  br i1 %65, label %129, label %66

66:                                               ; preds = %52
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  %67 = load ptr, ptr %6, align 8, !tbaa !5
  %68 = load ptr, ptr %12, align 8, !tbaa !5
  %69 = call ptr @hashMapGet(ptr noundef %67, ptr noundef %68)
  store ptr %69, ptr %13, align 8, !tbaa !5
  %70 = load ptr, ptr %13, align 8, !tbaa !5
  %71 = icmp ne ptr %70, null
  br i1 %71, label %72, label %98

72:                                               ; preds = %66
  %73 = load ptr, ptr %8, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.DistanceHolder, ptr %73, i32 0, i32 2
  %75 = load i32, ptr %74, align 8, !tbaa !17
  %76 = load ptr, ptr %11, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.UDGraphEdge, ptr %76, i32 0, i32 1
  %78 = load i32, ptr %77, align 8, !tbaa !18
  %79 = add nsw i32 %75, %78
  %80 = load ptr, ptr %13, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct.DistanceHolder, ptr %80, i32 0, i32 2
  %82 = load i32, ptr %81, align 8, !tbaa !17
  %83 = icmp slt i32 %79, %82
  br i1 %83, label %84, label %97

84:                                               ; preds = %72
  %85 = load ptr, ptr %13, align 8, !tbaa !5
  %86 = load ptr, ptr %9, align 8, !tbaa !5
  %87 = load ptr, ptr %13, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct.DistanceHolder, ptr %87, i32 0, i32 0
  %89 = load ptr, ptr %88, align 8, !tbaa !9
  %90 = load ptr, ptr %8, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct.DistanceHolder, ptr %90, i32 0, i32 2
  %92 = load i32, ptr %91, align 8, !tbaa !17
  %93 = load ptr, ptr %11, align 8, !tbaa !5
  %94 = getelementptr inbounds %struct.UDGraphEdge, ptr %93, i32 0, i32 1
  %95 = load i32, ptr %94, align 8, !tbaa !18
  %96 = add nsw i32 %92, %95
  call void @updateDisHolder(ptr noundef %85, ptr noundef %86, ptr noundef %89, i32 noundef %96)
  br label %97

97:                                               ; preds = %84, %72
  br label %117

98:                                               ; preds = %66
  %99 = load ptr, ptr %9, align 8, !tbaa !5
  %100 = load ptr, ptr %11, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct.UDGraphEdge, ptr %100, i32 0, i32 0
  %102 = load ptr, ptr %101, align 8, !tbaa !15
  %103 = load ptr, ptr %11, align 8, !tbaa !5
  %104 = getelementptr inbounds %struct.UDGraphEdge, ptr %103, i32 0, i32 1
  %105 = load i32, ptr %104, align 8, !tbaa !18
  %106 = load ptr, ptr %8, align 8, !tbaa !5
  %107 = getelementptr inbounds %struct.DistanceHolder, ptr %106, i32 0, i32 2
  %108 = load i32, ptr %107, align 8, !tbaa !17
  %109 = add nsw i32 %105, %108
  %110 = call ptr @generateDisHolder(ptr noundef %99, ptr noundef %102, i32 noundef %109)
  store ptr %110, ptr %13, align 8, !tbaa !5
  %111 = load ptr, ptr %6, align 8, !tbaa !5
  %112 = load ptr, ptr %11, align 8, !tbaa !5
  %113 = getelementptr inbounds %struct.UDGraphEdge, ptr %112, i32 0, i32 0
  %114 = load ptr, ptr %113, align 8, !tbaa !15
  %115 = call ptr @generateNodeValAddress(ptr noundef %114)
  %116 = load ptr, ptr %13, align 8, !tbaa !5
  call void @hashMapInsert(ptr noundef %111, ptr noundef %115, ptr noundef %116)
  br label %117

117:                                              ; preds = %98, %97
  %118 = load ptr, ptr %4, align 8, !tbaa !5
  %119 = load ptr, ptr %12, align 8, !tbaa !5
  %120 = call i32 @hashSetContains(ptr noundef %118, ptr noundef %119)
  %121 = icmp ne i32 %120, 0
  br i1 %121, label %128, label %122

122:                                              ; preds = %117
  %123 = load ptr, ptr %3, align 8, !tbaa !5
  %124 = load ptr, ptr %13, align 8, !tbaa !5
  call void @pQueueEnqueue(ptr noundef %123, ptr noundef %124)
  %125 = load ptr, ptr %4, align 8, !tbaa !5
  %126 = load ptr, ptr %9, align 8, !tbaa !5
  %127 = call ptr @generateNodeValAddress(ptr noundef %126)
  call void @hashSetInsert(ptr noundef %125, ptr noundef %127)
  br label %128

128:                                              ; preds = %122, %117
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  br label %129

129:                                              ; preds = %128, %52
  %130 = load ptr, ptr %12, align 8, !tbaa !5
  call void @free(ptr noundef %130) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  br label %131

131:                                              ; preds = %129
  %132 = load i32, ptr %10, align 4, !tbaa !12
  %133 = add nsw i32 %132, 1
  store i32 %133, ptr %10, align 4, !tbaa !12
  br label %44, !llvm.loop !19

134:                                              ; preds = %51
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  br label %30, !llvm.loop !21

135:                                              ; preds = %30
  %136 = load ptr, ptr %3, align 8, !tbaa !5
  call void @destroyPQueue(ptr noundef %136)
  %137 = load ptr, ptr %5, align 8, !tbaa !5
  call void @destroyHashSet(ptr noundef %137)
  %138 = load ptr, ptr %4, align 8, !tbaa !5
  call void @destroyHashSet(ptr noundef %138)
  %139 = load ptr, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #4
  ret ptr %139
}

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

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

declare i32 @pQueueIsEmpty(ptr noundef) #2

declare ptr @pQueueDequeue(ptr noundef) #2

declare void @destroyPQueue(ptr noundef) #2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 = { "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 uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 0}
!10 = !{!"DistanceHolder", !6, i64 0, !6, i64 8, !11, i64 16}
!11 = !{!"int", !7, i64 0}
!12 = !{!11, !11, i64 0}
!13 = !{!14, !6, i64 8}
!14 = !{!"UDGraphNode", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!15 = !{!16, !6, i64 0}
!16 = !{!"UDGraphEdge", !6, i64 0, !11, i64 8}
!17 = !{!10, !11, i64 16}
!18 = !{!16, !11, i64 8}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = distinct !{!21, !20}


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

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #0

declare ptr @hashMapInitialization(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

declare void @hashMapInsert(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

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

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

declare i32 @arrayListGetLength(ptr noundef) local_unnamed_addr #1

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

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

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

declare ptr @hashSetInitialization(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

declare void @hashSetInsert(ptr noundef, ptr noundef) local_unnamed_addr #1

declare i32 @hashSetContains(ptr noundef, ptr noundef) local_unnamed_addr #1

declare void @destroyHashSet(ptr noundef) local_unnamed_addr #1

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

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local ptr @UDGraphGenerateDistancesMap(ptr noundef %0) local_unnamed_addr #2 {
  %2 = tail call ptr @priorityQueueInitialization(ptr noundef nonnull @distanceHolderFreeFun, ptr noundef nonnull @distanceHolderComp) #3
  %3 = tail call ptr @hashSetInitialization(ptr noundef nonnull @UDGFreeUintptr_t, ptr noundef nonnull @UDGCompUintptr_t, ptr noundef nonnull @uintptr_tHashFunUDirG) #3
  %4 = tail call ptr @hashSetInitialization(ptr noundef nonnull @UDGFreeUintptr_t, ptr noundef nonnull @UDGCompUintptr_t, ptr noundef nonnull @uintptr_tHashFunUDirG) #3
  %5 = tail call ptr @hashMapInitialization(ptr noundef nonnull @UDGFreeUintptr_t, ptr noundef nonnull @distanceHolderFreeFun, ptr noundef nonnull @UDGCompUintptr_t, ptr noundef nonnull @uintptr_tHashFunUDirG) #3
  %6 = tail call ptr @generateDisHolder(ptr noundef %0, ptr noundef %0, i32 noundef 0)
  tail call void @pQueueEnqueue(ptr noundef %2, ptr noundef %6) #3
  %7 = tail call ptr @generateNodeValAddress(ptr noundef %0)
  tail call void @hashSetInsert(ptr noundef %3, ptr noundef %7) #3
  %8 = tail call ptr @generateNodeValAddress(ptr noundef %0)
  tail call void @hashMapInsert(ptr noundef %5, ptr noundef %8, ptr noundef %6) #3
  %9 = tail call i32 @pQueueIsEmpty(ptr noundef %2) #3
  %.not57 = icmp eq i32 %9, 0
  br i1 %.not57, label %.lr.ph58, label %._crit_edge

.loopexit:                                        ; preds = %48, %.lr.ph58
  %10 = tail call i32 @pQueueIsEmpty(ptr noundef %2) #3
  %.not = icmp eq i32 %10, 0
  br i1 %.not, label %.lr.ph58, label %._crit_edge, !llvm.loop !5

.lr.ph58:                                         ; preds = %1, %.loopexit
  %11 = tail call ptr @pQueueDequeue(ptr noundef %2) #3
  %12 = load ptr, ptr %11, align 8, !tbaa !7
  %13 = tail call ptr @generateNodeValAddress(ptr noundef %12)
  tail call void @hashSetInsert(ptr noundef %4, ptr noundef %13) #3
  %14 = getelementptr inbounds i8, ptr %12, i64 8
  %15 = load ptr, ptr %14, align 8, !tbaa !13
  %16 = tail call i32 @arrayListGetLength(ptr noundef %15) #3
  %17 = icmp sgt i32 %16, 0
  br i1 %17, label %.lr.ph, label %.loopexit

.lr.ph:                                           ; preds = %.lr.ph58
  %18 = getelementptr inbounds i8, ptr %11, i64 16
  br label %19

19:                                               ; preds = %.lr.ph, %48
  %.05056 = phi i32 [ 0, %.lr.ph ], [ %49, %48 ]
  %20 = load ptr, ptr %14, align 8, !tbaa !13
  %21 = tail call ptr @arrayListGet(ptr noundef %20, i32 noundef %.05056) #3
  %22 = load ptr, ptr %21, align 8, !tbaa !15
  %23 = tail call ptr @generateNodeValAddress(ptr noundef %22)
  %24 = tail call i32 @hashSetContains(ptr noundef %4, ptr noundef %23) #3
  %.not53 = icmp eq i32 %24, 0
  br i1 %.not53, label %25, label %48

25:                                               ; preds = %19
  %26 = tail call ptr @hashMapGet(ptr noundef %5, ptr noundef %23) #3
  %.not54 = icmp eq ptr %26, null
  %27 = getelementptr inbounds i8, ptr %21, i64 8
  %28 = load i32, ptr %27, align 8, !tbaa !17
  br i1 %.not54, label %37, label %29

29:                                               ; preds = %25
  %30 = load i32, ptr %18, align 8, !tbaa !18
  %31 = add nsw i32 %28, %30
  %32 = getelementptr inbounds i8, ptr %26, i64 16
  %33 = load i32, ptr %32, align 8, !tbaa !18
  %34 = icmp slt i32 %31, %33
  br i1 %34, label %35, label %44

35:                                               ; preds = %29
  %36 = load ptr, ptr %26, align 8, !tbaa !7
  tail call void @updateDisHolder(ptr noundef nonnull %26, ptr noundef nonnull %12, ptr noundef %36, i32 noundef %31)
  br label %44

37:                                               ; preds = %25
  %38 = load ptr, ptr %21, align 8, !tbaa !15
  %39 = load i32, ptr %18, align 8, !tbaa !18
  %40 = add nsw i32 %39, %28
  %41 = tail call ptr @generateDisHolder(ptr noundef nonnull %12, ptr noundef %38, i32 noundef %40)
  %42 = load ptr, ptr %21, align 8, !tbaa !15
  %43 = tail call ptr @generateNodeValAddress(ptr noundef %42)
  tail call void @hashMapInsert(ptr noundef %5, ptr noundef %43, ptr noundef %41) #3
  br label %44

44:                                               ; preds = %29, %35, %37
  %.0 = phi ptr [ %26, %35 ], [ %26, %29 ], [ %41, %37 ]
  %45 = tail call i32 @hashSetContains(ptr noundef %3, ptr noundef %23) #3
  %.not55 = icmp eq i32 %45, 0
  br i1 %.not55, label %46, label %48

46:                                               ; preds = %44
  tail call void @pQueueEnqueue(ptr noundef %2, ptr noundef %.0) #3
  %47 = tail call ptr @generateNodeValAddress(ptr noundef nonnull %12)
  tail call void @hashSetInsert(ptr noundef %3, ptr noundef %47) #3
  br label %48

48:                                               ; preds = %44, %46, %19
  tail call void @free(ptr noundef %23) #3
  %49 = add nuw nsw i32 %.05056, 1
  %50 = load ptr, ptr %14, align 8, !tbaa !13
  %51 = tail call i32 @arrayListGetLength(ptr noundef %50) #3
  %52 = icmp slt i32 %49, %51
  br i1 %52, label %19, label %.loopexit, !llvm.loop !19

._crit_edge:                                      ; preds = %.loopexit, %1
  tail call void @destroyPQueue(ptr noundef %2) #3
  tail call void @destroyHashSet(ptr noundef %4) #3
  tail call void @destroyHashSet(ptr noundef %3) #3
  ret ptr %5
}

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

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

declare i32 @pQueueIsEmpty(ptr noundef) local_unnamed_addr #1

declare ptr @pQueueDequeue(ptr noundef) local_unnamed_addr #1

declare void @destroyPQueue(ptr noundef) local_unnamed_addr #1

attributes #0 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, 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 = { "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 }

!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 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}
!7 = !{!8, !9, i64 0}
!8 = !{!"DistanceHolder", !9, i64 0, !9, i64 8, !12, i64 16}
!9 = !{!"any pointer", !10, i64 0}
!10 = !{!"omnipotent char", !11, i64 0}
!11 = !{!"Simple C/C++ TBAA"}
!12 = !{!"int", !10, i64 0}
!13 = !{!14, !9, i64 8}
!14 = !{!"UDGraphNode", !9, i64 0, !9, i64 8, !9, i64 16, !9, i64 24}
!15 = !{!16, !9, i64 0}
!16 = !{!"UDGraphEdge", !9, i64 0, !12, i64 8}
!17 = !{!16, !12, i64 8}
!18 = !{!8, !12, i64 16}
!19 = distinct !{!19, !6}


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