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

@stderr = external global ptr, align 8
@.str = external hidden unnamed_addr constant [42 x i8], align 1
@.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
@.str.21 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [18 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
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #1

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

declare i32 @hashMapContains(ptr noundef, ptr noundef) #3

declare ptr @arrayListInitialization(i32 noundef, ptr noundef, ptr noundef) #3

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

declare void @arrayListAdd(ptr noundef, ptr noundef) #3

declare void @destroyHashMap(ptr noundef) #3

declare ptr @stackInitialization(ptr noundef) #3

declare void @stackPush(ptr noundef, ptr noundef) #3

declare signext i16 @stackIsEmpty(ptr noundef) #3

declare ptr @stackPop(ptr noundef) #3

declare void @destroyStack(ptr noundef) #3

; Function Attrs: nounwind uwtable
declare dso_local ptr @UDGraphGenerateDistancesMap(ptr noundef) #4

; Function Attrs: nounwind uwtable
define dso_local ptr @udGraphGetShortestPath(ptr noundef %0, ptr noundef %1, ptr noundef %2) #4 {
  %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 i64, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca i64, align 8
  %17 = alloca ptr, align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  %18 = load ptr, ptr %5, align 8, !tbaa !5
  %19 = icmp eq ptr %18, null
  br i1 %19, label %20, label %23

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

23:                                               ; preds = %3
  %24 = load ptr, ptr %6, align 8, !tbaa !5
  %25 = icmp eq ptr %24, null
  br i1 %25, label %26, label %29

26:                                               ; preds = %23
  %27 = load ptr, ptr @stderr, align 8, !tbaa !5
  %28 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %27, ptr noundef @.str, ptr noundef @.str.21, ptr noundef @.str.2) #5
  call void @exit(i32 noundef -83384987) #6
  unreachable

29:                                               ; preds = %23
  %30 = load ptr, ptr %7, align 8, !tbaa !5
  %31 = icmp eq ptr %30, null
  br i1 %31, label %32, label %35

32:                                               ; preds = %29
  %33 = load ptr, ptr @stderr, align 8, !tbaa !5
  %34 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %33, ptr noundef @.str, ptr noundef @.str.24, ptr noundef @.str.2) #5
  call void @exit(i32 noundef -83384987) #6
  unreachable

35:                                               ; preds = %29
  br label %36

36:                                               ; preds = %35
  br label %37

37:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  %38 = load ptr, ptr %5, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct.UndirectedGraph, ptr %38, i32 0, i32 0
  %40 = load ptr, ptr %39, align 8, !tbaa !9
  %41 = load ptr, ptr %6, align 8, !tbaa !5
  %42 = call ptr @hashMapGet(ptr noundef %40, ptr noundef %41)
  store ptr %42, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %43 = load ptr, ptr %5, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.UndirectedGraph, ptr %43, i32 0, i32 0
  %45 = load ptr, ptr %44, align 8, !tbaa !9
  %46 = load ptr, ptr %7, align 8, !tbaa !5
  %47 = call ptr @hashMapGet(ptr noundef %45, ptr noundef %46)
  store ptr %47, ptr %9, align 8, !tbaa !5
  %48 = load ptr, ptr %8, align 8, !tbaa !5
  %49 = icmp eq ptr %48, null
  br i1 %49, label %53, label %50

50:                                               ; preds = %37
  %51 = load ptr, ptr %9, align 8, !tbaa !5
  %52 = icmp eq ptr %51, null
  br i1 %52, label %53, label %54

53:                                               ; preds = %50, %37
  store ptr null, ptr %4, align 8
  store i32 1, ptr %10, align 4
  br label %120

54:                                               ; preds = %50
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  %55 = load ptr, ptr %8, align 8, !tbaa !5
  %56 = call ptr @UDGraphGenerateDistancesMap(ptr noundef %55)
  store ptr %56, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  %57 = load ptr, ptr %9, align 8, !tbaa !5
  %58 = getelementptr inbounds %struct.UDGraphNode, ptr %57, i32 0, i32 0
  %59 = load ptr, ptr %58, align 8, !tbaa !11
  %60 = ptrtoint ptr %59 to i64
  store i64 %60, ptr %12, align 8, !tbaa !13
  %61 = load ptr, ptr %11, align 8, !tbaa !5
  %62 = call i32 @hashMapContains(ptr noundef %61, ptr noundef %12)
  %63 = icmp ne i32 %62, 0
  br i1 %63, label %66, label %64

64:                                               ; preds = %54
  %65 = load ptr, ptr %11, align 8, !tbaa !5
  call void @destroyHashMap(ptr noundef %65)
  store ptr null, ptr %4, align 8
  store i32 1, ptr %10, align 4
  br label %119

66:                                               ; preds = %54
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  %67 = load ptr, ptr %5, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct.UndirectedGraph, ptr %67, i32 0, i32 1
  %69 = load ptr, ptr %68, align 8, !tbaa !15
  %70 = load ptr, ptr %5, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct.UndirectedGraph, ptr %70, i32 0, i32 2
  %72 = load ptr, ptr %71, align 8, !tbaa !16
  %73 = call ptr @arrayListInitialization(i32 noundef 5, ptr noundef %69, ptr noundef %72)
  store ptr %73, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  %74 = load ptr, ptr %5, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.UndirectedGraph, ptr %74, i32 0, i32 1
  %76 = load ptr, ptr %75, align 8, !tbaa !15
  %77 = call ptr @stackInitialization(ptr noundef %76)
  store ptr %77, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  %78 = load ptr, ptr %9, align 8, !tbaa !5
  store ptr %78, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  %79 = load ptr, ptr %15, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct.UDGraphNode, ptr %79, i32 0, i32 0
  %81 = load ptr, ptr %80, align 8, !tbaa !11
  %82 = ptrtoint ptr %81 to i64
  store i64 %82, ptr %16, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  br label %83

83:                                               ; preds = %99, %66
  %84 = load ptr, ptr %11, align 8, !tbaa !5
  %85 = call ptr @hashMapGet(ptr noundef %84, ptr noundef %16)
  store ptr %85, ptr %17, align 8, !tbaa !5
  %86 = load ptr, ptr %17, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct.DistanceHolder, ptr %86, i32 0, i32 1
  %88 = load ptr, ptr %87, align 8, !tbaa !17
  store ptr %88, ptr %15, align 8, !tbaa !5
  %89 = load ptr, ptr %15, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct.UDGraphNode, ptr %89, i32 0, i32 0
  %91 = load ptr, ptr %90, align 8, !tbaa !11
  %92 = ptrtoint ptr %91 to i64
  store i64 %92, ptr %16, align 8, !tbaa !13
  %93 = load ptr, ptr %14, align 8, !tbaa !5
  %94 = load ptr, ptr %17, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct.DistanceHolder, ptr %94, i32 0, i32 0
  %96 = load ptr, ptr %95, align 8, !tbaa !20
  %97 = getelementptr inbounds %struct.UDGraphNode, ptr %96, i32 0, i32 0
  %98 = load ptr, ptr %97, align 8, !tbaa !11
  call void @stackPush(ptr noundef %93, ptr noundef %98)
  br label %99

99:                                               ; preds = %83
  %100 = load ptr, ptr %17, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct.DistanceHolder, ptr %100, i32 0, i32 0
  %102 = load ptr, ptr %101, align 8, !tbaa !20
  %103 = load ptr, ptr %8, align 8, !tbaa !5
  %104 = icmp ne ptr %102, %103
  br i1 %104, label %83, label %105, !llvm.loop !21

105:                                              ; preds = %99
  br label %106

106:                                              ; preds = %111, %105
  %107 = load ptr, ptr %14, align 8, !tbaa !5
  %108 = call signext i16 @stackIsEmpty(ptr noundef %107)
  %109 = icmp ne i16 %108, 0
  %110 = xor i1 %109, true
  br i1 %110, label %111, label %115

111:                                              ; preds = %106
  %112 = load ptr, ptr %13, align 8, !tbaa !5
  %113 = load ptr, ptr %14, align 8, !tbaa !5
  %114 = call ptr @stackPop(ptr noundef %113)
  call void @arrayListAdd(ptr noundef %112, ptr noundef %114)
  br label %106, !llvm.loop !23

115:                                              ; preds = %106
  %116 = load ptr, ptr %11, align 8, !tbaa !5
  call void @destroyHashMap(ptr noundef %116)
  %117 = load ptr, ptr %14, align 8, !tbaa !5
  call void @destroyStack(ptr noundef %117)
  %118 = load ptr, ptr %13, align 8, !tbaa !5
  store ptr %118, ptr %4, align 8
  store i32 1, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  br label %119

119:                                              ; preds = %115, %64
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  br label %120

120:                                              ; preds = %119, %53
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  %121 = load ptr, ptr %4, align 8
  ret ptr %121
}

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 = { 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 = { 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 #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 0}
!10 = !{!"UndirectedGraph", !6, i64 0, !6, i64 8, !6, i64 16}
!11 = !{!12, !6, i64 0}
!12 = !{!"UDGraphNode", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!13 = !{!14, !14, i64 0}
!14 = !{!"long", !7, i64 0}
!15 = !{!10, !6, i64 8}
!16 = !{!10, !6, i64 16}
!17 = !{!18, !6, i64 8}
!18 = !{!"DistanceHolder", !6, i64 0, !6, i64 8, !19, i64 16}
!19 = !{!"int", !7, i64 0}
!20 = !{!18, !6, i64 0}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}
!23 = distinct !{!23, !22}


; 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 = external hidden unnamed_addr constant [42 x i8], align 1
@.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
@.str.21 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [18 x i8], align 1

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #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

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

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

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

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

declare void @destroyHashMap(ptr noundef) local_unnamed_addr #3

declare ptr @stackInitialization(ptr noundef) local_unnamed_addr #3

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

declare signext i16 @stackIsEmpty(ptr noundef) local_unnamed_addr #3

declare ptr @stackPop(ptr noundef) local_unnamed_addr #3

declare void @destroyStack(ptr noundef) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
declare dso_local ptr @UDGraphGenerateDistancesMap(ptr noundef) local_unnamed_addr #4

; Function Attrs: nounwind uwtable
define dso_local ptr @udGraphGetShortestPath(ptr noundef readonly %0, ptr noundef %1, ptr noundef %2) local_unnamed_addr #4 {
  %4 = alloca i64, align 8
  %5 = alloca i64, align 8
  %6 = icmp eq ptr %0, null
  br i1 %6, label %7, label %10

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

10:                                               ; preds = %3
  %11 = icmp eq ptr %1, null
  br i1 %11, label %12, label %15

12:                                               ; preds = %10
  %13 = load ptr, ptr @stderr, align 8, !tbaa !5
  %14 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %13, ptr noundef nonnull @.str, ptr noundef nonnull @.str.21, ptr noundef nonnull @.str.2) #5
  tail call void @exit(i32 noundef -83384987) #6
  unreachable

15:                                               ; preds = %10
  %16 = icmp eq ptr %2, null
  br i1 %16, label %17, label %20

17:                                               ; preds = %15
  %18 = load ptr, ptr @stderr, align 8, !tbaa !5
  %19 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %18, ptr noundef nonnull @.str, ptr noundef nonnull @.str.24, ptr noundef nonnull @.str.2) #5
  tail call void @exit(i32 noundef -83384987) #6
  unreachable

20:                                               ; preds = %15
  %21 = load ptr, ptr %0, align 8, !tbaa !9
  %22 = tail call ptr @hashMapGet(ptr noundef %21, ptr noundef nonnull %1) #7
  %23 = load ptr, ptr %0, align 8, !tbaa !9
  %24 = tail call ptr @hashMapGet(ptr noundef %23, ptr noundef nonnull %2) #7
  %25 = icmp eq ptr %22, null
  %26 = icmp eq ptr %24, null
  %or.cond = select i1 %25, i1 true, i1 %26
  br i1 %or.cond, label %56, label %27

27:                                               ; preds = %20
  %28 = tail call ptr @UDGraphGenerateDistancesMap(ptr noundef nonnull %22)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #7
  %29 = load ptr, ptr %24, align 8, !tbaa !11
  %30 = ptrtoint ptr %29 to i64
  store i64 %30, ptr %4, align 8, !tbaa !13
  %31 = call i32 @hashMapContains(ptr noundef %28, ptr noundef nonnull %4) #7
  %.not = icmp eq i32 %31, 0
  br i1 %.not, label %32, label %33

32:                                               ; preds = %27
  call void @destroyHashMap(ptr noundef %28) #7
  br label %55

33:                                               ; preds = %27
  %34 = getelementptr inbounds i8, ptr %0, i64 8
  %35 = load ptr, ptr %34, align 8, !tbaa !15
  %36 = getelementptr inbounds i8, ptr %0, i64 16
  %37 = load ptr, ptr %36, align 8, !tbaa !16
  %38 = call ptr @arrayListInitialization(i32 noundef 5, ptr noundef %35, ptr noundef %37) #7
  %39 = load ptr, ptr %34, align 8, !tbaa !15
  %40 = call ptr @stackInitialization(ptr noundef %39) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #7
  %41 = load ptr, ptr %24, align 8, !tbaa !11
  %42 = ptrtoint ptr %41 to i64
  store i64 %42, ptr %5, align 8, !tbaa !13
  br label %43

43:                                               ; preds = %43, %33
  %44 = call ptr @hashMapGet(ptr noundef %28, ptr noundef nonnull %5) #7
  %45 = getelementptr inbounds i8, ptr %44, i64 8
  %46 = load ptr, ptr %45, align 8, !tbaa !17
  %47 = load ptr, ptr %46, align 8, !tbaa !11
  %48 = ptrtoint ptr %47 to i64
  store i64 %48, ptr %5, align 8, !tbaa !13
  %49 = load ptr, ptr %44, align 8, !tbaa !20
  %50 = load ptr, ptr %49, align 8, !tbaa !11
  call void @stackPush(ptr noundef %40, ptr noundef %50) #7
  %51 = load ptr, ptr %44, align 8, !tbaa !20
  %.not38 = icmp eq ptr %51, %22
  br i1 %.not38, label %.preheader, label %43, !llvm.loop !21

.preheader:                                       ; preds = %43
  %52 = call signext i16 @stackIsEmpty(ptr noundef %40) #7
  %.not3940 = icmp eq i16 %52, 0
  br i1 %.not3940, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %.preheader, %.lr.ph
  %53 = call ptr @stackPop(ptr noundef %40) #7
  call void @arrayListAdd(ptr noundef %38, ptr noundef %53) #7
  %54 = call signext i16 @stackIsEmpty(ptr noundef %40) #7
  %.not39 = icmp eq i16 %54, 0
  br i1 %.not39, label %.lr.ph, label %._crit_edge, !llvm.loop !23

._crit_edge:                                      ; preds = %.lr.ph, %.preheader
  call void @destroyHashMap(ptr noundef %28) #7
  call void @destroyStack(ptr noundef %40) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  br label %55

55:                                               ; preds = %._crit_edge, %32
  %.0 = phi ptr [ %38, %._crit_edge ], [ null, %32 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #7
  br label %56

56:                                               ; preds = %20, %55
  %.1 = phi ptr [ %.0, %55 ], [ null, %20 ]
  ret ptr %.1
}

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #5 = { cold nounwind }
attributes #6 = { noreturn nounwind }
attributes #7 = { 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 = !{!"UndirectedGraph", !6, i64 0, !6, i64 8, !6, i64 16}
!11 = !{!12, !6, i64 0}
!12 = !{!"UDGraphNode", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!13 = !{!14, !14, i64 0}
!14 = !{!"long", !7, i64 0}
!15 = !{!10, !6, i64 8}
!16 = !{!10, !6, i64 16}
!17 = !{!18, !6, i64 8}
!18 = !{!"DistanceHolder", !6, i64 0, !6, i64 8, !19, i64 16}
!19 = !{!"int", !7, i64 0}
!20 = !{!18, !6, i64 0}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}
!23 = distinct !{!23, !22}


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