; LLVM IR from fcimeson/cbTSP :: cbLKH/SRC (AddExtraCandidates)

; 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.Node = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, double, double, double, double, double, double, i8, i8, i8 }
%struct.Candidate = type { ptr, i32, i32 }

@DimensionSaved = external dso_local global i32, align 4
@.str = external hidden unnamed_addr constant [86 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [79 x i8], align 1
@__PRETTY_FUNCTION__.AddExtraCandidates = external hidden unnamed_addr constant [39 x i8], align 1
@FirstNode = external dso_local global ptr, align 8

; Function Attrs: nounwind uwtable
define dso_local void @AddExtraCandidates(i32 noundef %0, i32 noundef %1, i32 noundef %2) #0 {
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  store i32 %0, ptr %4, align 4, !tbaa !5
  store i32 %1, ptr %5, align 4, !tbaa !5
  store i32 %2, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  %11 = load i32, ptr @DimensionSaved, align 4, !tbaa !5
  %12 = add nsw i32 1, %11
  %13 = sext i32 %12 to i64
  %14 = mul i64 %13, 8
  %15 = call noalias ptr @malloc(i64 noundef %14) #7
  store ptr %15, ptr %9, align 8, !tbaa !9
  %16 = icmp ne ptr %15, null
  br i1 %16, label %17, label %18

17:                                               ; preds = %3
  br label %19

18:                                               ; preds = %3
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 23, ptr noundef @__PRETTY_FUNCTION__.AddExtraCandidates) #8
  unreachable

19:                                               ; preds = %17
  %20 = load ptr, ptr @FirstNode, align 8, !tbaa !9
  store ptr %20, ptr %10, align 8, !tbaa !9
  br label %21

21:                                               ; preds = %33, %19
  %22 = load ptr, ptr %10, align 8, !tbaa !9
  %23 = getelementptr inbounds %struct.Node, ptr %22, i32 0, i32 43
  %24 = load ptr, ptr %23, align 8, !tbaa !11
  %25 = load ptr, ptr %9, align 8, !tbaa !9
  %26 = load ptr, ptr %10, align 8, !tbaa !9
  %27 = getelementptr inbounds %struct.Node, ptr %26, i32 0, i32 0
  %28 = load i32, ptr %27, align 8, !tbaa !14
  %29 = sext i32 %28 to i64
  %30 = getelementptr inbounds ptr, ptr %25, i64 %29
  store ptr %24, ptr %30, align 8, !tbaa !9
  %31 = load ptr, ptr %10, align 8, !tbaa !9
  %32 = getelementptr inbounds %struct.Node, ptr %31, i32 0, i32 43
  store ptr null, ptr %32, align 8, !tbaa !11
  br label %33

33:                                               ; preds = %21
  %34 = load ptr, ptr %10, align 8, !tbaa !9
  %35 = getelementptr inbounds %struct.Node, ptr %34, i32 0, i32 16
  %36 = load ptr, ptr %35, align 8, !tbaa !15
  store ptr %36, ptr %10, align 8, !tbaa !9
  %37 = load ptr, ptr @FirstNode, align 8, !tbaa !9
  %38 = icmp ne ptr %36, %37
  br i1 %38, label %21, label %39, !llvm.loop !16

39:                                               ; preds = %33
  %40 = load i32, ptr %5, align 4, !tbaa !5
  %41 = icmp eq i32 %40, 2
  br i1 %41, label %42, label %44

42:                                               ; preds = %39
  %43 = load i32, ptr %4, align 4, !tbaa !5
  call void @CreateNearestNeighborCandidateSet(i32 noundef %43)
  br label %50

44:                                               ; preds = %39
  %45 = load i32, ptr %5, align 4, !tbaa !5
  %46 = icmp eq i32 %45, 3
  br i1 %46, label %47, label %49

47:                                               ; preds = %44
  %48 = load i32, ptr %4, align 4, !tbaa !5
  call void @CreateQuadrantCandidateSet(i32 noundef %48)
  br label %49

49:                                               ; preds = %47, %44
  br label %50

50:                                               ; preds = %49, %42
  %51 = load ptr, ptr @FirstNode, align 8, !tbaa !9
  store ptr %51, ptr %10, align 8, !tbaa !9
  br label %52

52:                                               ; preds = %108, %50
  %53 = load ptr, ptr %10, align 8, !tbaa !9
  %54 = getelementptr inbounds %struct.Node, ptr %53, i32 0, i32 43
  %55 = load ptr, ptr %54, align 8, !tbaa !11
  store ptr %55, ptr %8, align 8, !tbaa !9
  %56 = load ptr, ptr %9, align 8, !tbaa !9
  %57 = load ptr, ptr %10, align 8, !tbaa !9
  %58 = getelementptr inbounds %struct.Node, ptr %57, i32 0, i32 0
  %59 = load i32, ptr %58, align 8, !tbaa !14
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds ptr, ptr %56, i64 %60
  %62 = load ptr, ptr %61, align 8, !tbaa !9
  %63 = load ptr, ptr %10, align 8, !tbaa !9
  %64 = getelementptr inbounds %struct.Node, ptr %63, i32 0, i32 43
  store ptr %62, ptr %64, align 8, !tbaa !11
  %65 = load ptr, ptr %8, align 8, !tbaa !9
  store ptr %65, ptr %7, align 8, !tbaa !9
  br label %66

66:                                               ; preds = %103, %52
  %67 = load ptr, ptr %7, align 8, !tbaa !9
  %68 = icmp ne ptr %67, null
  br i1 %68, label %69, label %74

69:                                               ; preds = %66
  %70 = load ptr, ptr %7, align 8, !tbaa !9
  %71 = getelementptr inbounds %struct.Candidate, ptr %70, i32 0, i32 0
  %72 = load ptr, ptr %71, align 8, !tbaa !18
  %73 = icmp ne ptr %72, null
  br label %74

74:                                               ; preds = %69, %66
  %75 = phi i1 [ false, %66 ], [ %73, %69 ]
  br i1 %75, label %76, label %106

76:                                               ; preds = %74
  %77 = load ptr, ptr %10, align 8, !tbaa !9
  %78 = load ptr, ptr %7, align 8, !tbaa !9
  %79 = getelementptr inbounds %struct.Candidate, ptr %78, i32 0, i32 0
  %80 = load ptr, ptr %79, align 8, !tbaa !18
  %81 = load ptr, ptr %7, align 8, !tbaa !9
  %82 = getelementptr inbounds %struct.Candidate, ptr %81, i32 0, i32 1
  %83 = load i32, ptr %82, align 8, !tbaa !20
  %84 = load ptr, ptr %7, align 8, !tbaa !9
  %85 = getelementptr inbounds %struct.Candidate, ptr %84, i32 0, i32 2
  %86 = load i32, ptr %85, align 4, !tbaa !21
  %87 = call i32 @AddCandidate(ptr noundef %77, ptr noundef %80, i32 noundef %83, i32 noundef %86)
  %88 = load i32, ptr %6, align 4, !tbaa !5
  %89 = icmp ne i32 %88, 0
  br i1 %89, label %90, label %102

90:                                               ; preds = %76
  %91 = load ptr, ptr %7, align 8, !tbaa !9
  %92 = getelementptr inbounds %struct.Candidate, ptr %91, i32 0, i32 0
  %93 = load ptr, ptr %92, align 8, !tbaa !18
  %94 = load ptr, ptr %10, align 8, !tbaa !9
  %95 = load ptr, ptr %7, align 8, !tbaa !9
  %96 = getelementptr inbounds %struct.Candidate, ptr %95, i32 0, i32 1
  %97 = load i32, ptr %96, align 8, !tbaa !20
  %98 = load ptr, ptr %7, align 8, !tbaa !9
  %99 = getelementptr inbounds %struct.Candidate, ptr %98, i32 0, i32 2
  %100 = load i32, ptr %99, align 4, !tbaa !21
  %101 = call i32 @AddCandidate(ptr noundef %93, ptr noundef %94, i32 noundef %97, i32 noundef %100)
  br label %102

102:                                              ; preds = %90, %76
  br label %103

103:                                              ; preds = %102
  %104 = load ptr, ptr %7, align 8, !tbaa !9
  %105 = getelementptr inbounds %struct.Candidate, ptr %104, i32 1
  store ptr %105, ptr %7, align 8, !tbaa !9
  br label %66, !llvm.loop !22

106:                                              ; preds = %74
  %107 = load ptr, ptr %8, align 8, !tbaa !9
  call void @free(ptr noundef %107) #6
  br label %108

108:                                              ; preds = %106
  %109 = load ptr, ptr %10, align 8, !tbaa !9
  %110 = getelementptr inbounds %struct.Node, ptr %109, i32 0, i32 16
  %111 = load ptr, ptr %110, align 8, !tbaa !15
  store ptr %111, ptr %10, align 8, !tbaa !9
  %112 = load ptr, ptr @FirstNode, align 8, !tbaa !9
  %113 = icmp ne ptr %111, %112
  br i1 %113, label %52, label %114, !llvm.loop !23

114:                                              ; preds = %108
  %115 = load ptr, ptr %9, align 8, !tbaa !9
  call void @free(ptr noundef %115) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  ret void
}

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

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #3

declare void @CreateNearestNeighborCandidateSet(i32 noundef) #4

declare void @CreateQuadrantCandidateSet(i32 noundef) #4

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

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

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

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #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 "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 #6 = { nounwind }
attributes #7 = { nounwind allocsize(0) }
attributes #8 = { 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 = !{!"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, !10, i64 288}
!12 = !{!"Node", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12, !6, i64 16, !6, i64 20, !6, i64 24, !6, i64 28, !6, i64 32, !6, i64 36, !6, i64 40, !6, i64 44, !6, i64 48, !6, i64 52, !10, i64 56, !10, i64 64, !10, i64 72, !10, i64 80, !10, i64 88, !10, i64 96, !10, i64 104, !10, i64 112, !10, i64 120, !10, i64 128, !10, i64 136, !10, i64 144, !10, i64 152, !10, i64 160, !10, i64 168, !10, i64 176, !10, i64 184, !10, i64 192, !10, i64 200, !10, i64 208, !10, i64 216, !10, i64 224, !10, i64 232, !10, i64 240, !10, i64 248, !10, i64 256, !10, i64 264, !10, i64 272, !10, i64 280, !10, i64 288, !10, i64 296, !10, i64 304, !13, i64 312, !13, i64 320, !13, i64 328, !13, i64 336, !13, i64 344, !13, i64 352, !7, i64 360, !7, i64 361, !7, i64 362}
!13 = !{!"double", !7, i64 0}
!14 = !{!12, !6, i64 0}
!15 = !{!12, !10, i64 72}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = !{!19, !10, i64 0}
!19 = !{!"Candidate", !10, i64 0, !6, i64 8, !6, i64 12}
!20 = !{!19, !6, i64 8}
!21 = !{!19, !6, i64 12}
!22 = distinct !{!22, !17}
!23 = distinct !{!23, !17}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

@DimensionSaved = external dso_local local_unnamed_addr global i32, align 4
@.str = external hidden unnamed_addr constant [86 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [79 x i8], align 1
@__PRETTY_FUNCTION__.AddExtraCandidates = external hidden unnamed_addr constant [39 x i8], align 1
@FirstNode = external dso_local local_unnamed_addr global ptr, align 8

; Function Attrs: nounwind uwtable
define dso_local void @AddExtraCandidates(i32 noundef %0, i32 noundef %1, i32 noundef %2) local_unnamed_addr #0 {
  %4 = load i32, ptr @DimensionSaved, align 4, !tbaa !5
  %5 = add nsw i32 %4, 1
  %6 = sext i32 %5 to i64
  %7 = shl nsw i64 %6, 3
  %8 = tail call noalias ptr @malloc(i64 noundef %7) #5
  %.not = icmp eq ptr %8, null
  br i1 %.not, label %9, label %10

9:                                                ; preds = %3
  tail call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 23, ptr noundef nonnull @__PRETTY_FUNCTION__.AddExtraCandidates) #6
  unreachable

10:                                               ; preds = %3
  %11 = load ptr, ptr @FirstNode, align 8, !tbaa !9
  br label %12

12:                                               ; preds = %12, %10
  %.0 = phi ptr [ %11, %10 ], [ %19, %12 ]
  %13 = getelementptr inbounds i8, ptr %.0, i64 288
  %14 = load ptr, ptr %13, align 8, !tbaa !11
  %15 = load i32, ptr %.0, align 8, !tbaa !14
  %16 = sext i32 %15 to i64
  %17 = getelementptr inbounds ptr, ptr %8, i64 %16
  store ptr %14, ptr %17, align 8, !tbaa !9
  store ptr null, ptr %13, align 8, !tbaa !11
  %18 = getelementptr inbounds i8, ptr %.0, i64 72
  %19 = load ptr, ptr %18, align 8, !tbaa !15
  %.not33 = icmp eq ptr %19, %11
  br i1 %.not33, label %20, label %12, !llvm.loop !16

20:                                               ; preds = %12
  switch i32 %1, label %23 [
    i32 2, label %21
    i32 3, label %22
  ]

21:                                               ; preds = %20
  tail call void @CreateNearestNeighborCandidateSet(i32 noundef %0) #7
  br label %23

22:                                               ; preds = %20
  tail call void @CreateQuadrantCandidateSet(i32 noundef %0) #7
  br label %23

23:                                               ; preds = %20, %22, %21
  %24 = load ptr, ptr @FirstNode, align 8, !tbaa !9
  %.not37 = icmp eq i32 %2, 0
  br i1 %.not37, label %.split.us, label %.split

.split.us:                                        ; preds = %23, %.critedge.us
  %.1.us = phi ptr [ %32, %.critedge.us ], [ %24, %23 ]
  %25 = getelementptr inbounds i8, ptr %.1.us, i64 288
  %26 = load ptr, ptr %25, align 8, !tbaa !11
  %27 = load i32, ptr %.1.us, align 8, !tbaa !14
  %28 = sext i32 %27 to i64
  %29 = getelementptr inbounds ptr, ptr %8, i64 %28
  %30 = load ptr, ptr %29, align 8, !tbaa !9
  store ptr %30, ptr %25, align 8, !tbaa !11
  %.not3438.us = icmp eq ptr %26, null
  br i1 %.not3438.us, label %.critedge.us, label %.lr.ph.us

.critedge.us:                                     ; preds = %.lr.ph46.us, %.lr.ph.us, %.split.us
  tail call void @free(ptr noundef %26) #7
  %31 = getelementptr inbounds i8, ptr %.1.us, i64 72
  %32 = load ptr, ptr %31, align 8, !tbaa !15
  %33 = load ptr, ptr @FirstNode, align 8, !tbaa !9
  %.not36.us = icmp eq ptr %32, %33
  br i1 %.not36.us, label %.split48.us, label %.split.us, !llvm.loop !18

.lr.ph.us:                                        ; preds = %.split.us
  %34 = load ptr, ptr %26, align 8, !tbaa !19
  %.not35.us44.us = icmp eq ptr %34, null
  br i1 %.not35.us44.us, label %.critedge.us, label %.lr.ph46.us

.lr.ph46.us:                                      ; preds = %.lr.ph.us, %.lr.ph46.us
  %35 = phi ptr [ %42, %.lr.ph46.us ], [ %34, %.lr.ph.us ]
  %.02839.us45.us = phi ptr [ %41, %.lr.ph46.us ], [ %26, %.lr.ph.us ]
  %36 = getelementptr inbounds i8, ptr %.02839.us45.us, i64 8
  %37 = load i32, ptr %36, align 8, !tbaa !21
  %38 = getelementptr inbounds i8, ptr %.02839.us45.us, i64 12
  %39 = load i32, ptr %38, align 4, !tbaa !22
  %40 = tail call i32 @AddCandidate(ptr noundef nonnull %.1.us, ptr noundef nonnull %35, i32 noundef %37, i32 noundef %39) #7
  %41 = getelementptr inbounds i8, ptr %.02839.us45.us, i64 16
  %42 = load ptr, ptr %41, align 8, !tbaa !19
  %.not35.us.us = icmp eq ptr %42, null
  br i1 %.not35.us.us, label %.critedge.us, label %.lr.ph46.us

.split:                                           ; preds = %23, %.critedge
  %.1 = phi ptr [ %63, %.critedge ], [ %24, %23 ]
  %43 = getelementptr inbounds i8, ptr %.1, i64 288
  %44 = load ptr, ptr %43, align 8, !tbaa !11
  %45 = load i32, ptr %.1, align 8, !tbaa !14
  %46 = sext i32 %45 to i64
  %47 = getelementptr inbounds ptr, ptr %8, i64 %46
  %48 = load ptr, ptr %47, align 8, !tbaa !9
  store ptr %48, ptr %43, align 8, !tbaa !11
  %.not3438 = icmp eq ptr %44, null
  br i1 %.not3438, label %.critedge, label %.lr.ph

.lr.ph:                                           ; preds = %.split
  %49 = load ptr, ptr %44, align 8, !tbaa !19
  %.not3541 = icmp eq ptr %49, null
  br i1 %.not3541, label %.critedge, label %.lr.ph43

.lr.ph43:                                         ; preds = %.lr.ph, %.lr.ph43
  %50 = phi ptr [ %61, %.lr.ph43 ], [ %49, %.lr.ph ]
  %.0283942 = phi ptr [ %60, %.lr.ph43 ], [ %44, %.lr.ph ]
  %51 = getelementptr inbounds i8, ptr %.0283942, i64 8
  %52 = load i32, ptr %51, align 8, !tbaa !21
  %53 = getelementptr inbounds i8, ptr %.0283942, i64 12
  %54 = load i32, ptr %53, align 4, !tbaa !22
  %55 = tail call i32 @AddCandidate(ptr noundef nonnull %.1, ptr noundef nonnull %50, i32 noundef %52, i32 noundef %54) #7
  %56 = load ptr, ptr %.0283942, align 8, !tbaa !19
  %57 = load i32, ptr %51, align 8, !tbaa !21
  %58 = load i32, ptr %53, align 4, !tbaa !22
  %59 = tail call i32 @AddCandidate(ptr noundef %56, ptr noundef nonnull %.1, i32 noundef %57, i32 noundef %58) #7
  %60 = getelementptr inbounds i8, ptr %.0283942, i64 16
  %61 = load ptr, ptr %60, align 8, !tbaa !19
  %.not35 = icmp eq ptr %61, null
  br i1 %.not35, label %.critedge, label %.lr.ph43

.critedge:                                        ; preds = %.lr.ph43, %.lr.ph, %.split
  tail call void @free(ptr noundef %44) #7
  %62 = getelementptr inbounds i8, ptr %.1, i64 72
  %63 = load ptr, ptr %62, align 8, !tbaa !15
  %64 = load ptr, ptr @FirstNode, align 8, !tbaa !9
  %.not36 = icmp eq ptr %63, %64
  br i1 %.not36, label %.split48.us, label %.split, !llvm.loop !18

.split48.us:                                      ; preds = %.critedge, %.critedge.us
  tail call void @free(ptr noundef %8) #7
  ret void
}

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

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

declare void @CreateNearestNeighborCandidateSet(i32 noundef) local_unnamed_addr #3

declare void @CreateQuadrantCandidateSet(i32 noundef) local_unnamed_addr #3

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

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

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 = { 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 #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 = { 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 #5 = { nounwind allocsize(0) }
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 = !{!"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, !10, i64 288}
!12 = !{!"Node", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12, !6, i64 16, !6, i64 20, !6, i64 24, !6, i64 28, !6, i64 32, !6, i64 36, !6, i64 40, !6, i64 44, !6, i64 48, !6, i64 52, !10, i64 56, !10, i64 64, !10, i64 72, !10, i64 80, !10, i64 88, !10, i64 96, !10, i64 104, !10, i64 112, !10, i64 120, !10, i64 128, !10, i64 136, !10, i64 144, !10, i64 152, !10, i64 160, !10, i64 168, !10, i64 176, !10, i64 184, !10, i64 192, !10, i64 200, !10, i64 208, !10, i64 216, !10, i64 224, !10, i64 232, !10, i64 240, !10, i64 248, !10, i64 256, !10, i64 264, !10, i64 272, !10, i64 280, !10, i64 288, !10, i64 296, !10, i64 304, !13, i64 312, !13, i64 320, !13, i64 328, !13, i64 336, !13, i64 344, !13, i64 352, !7, i64 360, !7, i64 361, !7, i64 362}
!13 = !{!"double", !7, i64 0}
!14 = !{!12, !6, i64 0}
!15 = !{!12, !10, i64 72}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = distinct !{!18, !17}
!19 = !{!20, !10, i64 0}
!20 = !{!"Candidate", !10, i64 0, !6, i64 8, !6, i64 12}
!21 = !{!20, !6, i64 8}
!22 = !{!20, !6, i64 12}


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