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

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

@Tabu = external hidden global i32, align 4
@FirstNode = external dso_local global ptr, align 8
@Dimension = external dso_local global i32, align 4
@DimensionSaved = external dso_local global i32, align 4
@NodeSet = external dso_local global ptr, align 8
@FirstFree = external hidden global ptr, align 8

; Function Attrs: nounwind uwtable
define dso_local void @ERXT() #0 {
  %1 = alloca ptr, align 8
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %1) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #3
  store i32 0, ptr @Tabu, align 4, !tbaa !5
  %4 = load ptr, ptr @FirstNode, align 8, !tbaa !9
  store ptr %4, ptr %1, align 8, !tbaa !9
  br label %5

5:                                                ; preds = %28, %0
  %6 = load ptr, ptr %1, align 8, !tbaa !9
  %7 = getelementptr inbounds %struct.Node, ptr %6, i32 0, i32 16
  %8 = load ptr, ptr %7, align 8, !tbaa !11
  %9 = load ptr, ptr %1, align 8, !tbaa !9
  %10 = getelementptr inbounds %struct.Node, ptr %9, i32 0, i32 18
  store ptr %8, ptr %10, align 8, !tbaa !14
  %11 = load ptr, ptr %1, align 8, !tbaa !9
  %12 = load ptr, ptr %1, align 8, !tbaa !9
  %13 = getelementptr inbounds %struct.Node, ptr %12, i32 0, i32 18
  %14 = load ptr, ptr %13, align 8, !tbaa !14
  %15 = getelementptr inbounds %struct.Node, ptr %14, i32 0, i32 17
  store ptr %11, ptr %15, align 8, !tbaa !15
  %16 = load ptr, ptr %1, align 8, !tbaa !9
  %17 = load ptr, ptr %1, align 8, !tbaa !9
  %18 = getelementptr inbounds %struct.Node, ptr %17, i32 0, i32 23
  %19 = load ptr, ptr %18, align 8, !tbaa !16
  %20 = getelementptr inbounds %struct.Node, ptr %19, i32 0, i32 24
  store ptr %16, ptr %20, align 8, !tbaa !17
  %21 = load ptr, ptr %1, align 8, !tbaa !9
  %22 = load ptr, ptr %1, align 8, !tbaa !9
  %23 = getelementptr inbounds %struct.Node, ptr %22, i32 0, i32 16
  %24 = load ptr, ptr %23, align 8, !tbaa !11
  %25 = getelementptr inbounds %struct.Node, ptr %24, i32 0, i32 15
  store ptr %21, ptr %25, align 8, !tbaa !18
  %26 = load ptr, ptr %1, align 8, !tbaa !9
  %27 = getelementptr inbounds %struct.Node, ptr %26, i32 0, i32 3
  store i32 0, ptr %27, align 4, !tbaa !19
  br label %28

28:                                               ; preds = %5
  %29 = load ptr, ptr %1, align 8, !tbaa !9
  %30 = getelementptr inbounds %struct.Node, ptr %29, i32 0, i32 16
  %31 = load ptr, ptr %30, align 8, !tbaa !11
  store ptr %31, ptr %1, align 8, !tbaa !9
  %32 = load ptr, ptr @FirstNode, align 8, !tbaa !9
  %33 = icmp ne ptr %31, %32
  br i1 %33, label %5, label %34, !llvm.loop !20

34:                                               ; preds = %28
  %35 = load i32, ptr @Dimension, align 4, !tbaa !5
  %36 = load i32, ptr @DimensionSaved, align 4, !tbaa !5
  %37 = icmp eq i32 %35, %36
  br i1 %37, label %38, label %46

38:                                               ; preds = %34
  %39 = load ptr, ptr @NodeSet, align 8, !tbaa !9
  %40 = call i32 @Random()
  %41 = load i32, ptr @Dimension, align 4, !tbaa !5
  %42 = urem i32 %40, %41
  %43 = add i32 1, %42
  %44 = zext i32 %43 to i64
  %45 = getelementptr inbounds %struct.Node, ptr %39, i64 %44
  store ptr %45, ptr @FirstNode, align 8, !tbaa !9
  br label %61

46:                                               ; preds = %34
  %47 = call i32 @Random()
  %48 = load i32, ptr @Dimension, align 4, !tbaa !5
  %49 = urem i32 %47, %48
  store i32 %49, ptr %3, align 4, !tbaa !5
  br label %50

50:                                               ; preds = %57, %46
  %51 = load i32, ptr %3, align 4, !tbaa !5
  %52 = icmp sgt i32 %51, 0
  br i1 %52, label %53, label %60

53:                                               ; preds = %50
  %54 = load ptr, ptr @FirstNode, align 8, !tbaa !9
  %55 = getelementptr inbounds %struct.Node, ptr %54, i32 0, i32 16
  %56 = load ptr, ptr %55, align 8, !tbaa !11
  store ptr %56, ptr @FirstNode, align 8, !tbaa !9
  br label %57

57:                                               ; preds = %53
  %58 = load i32, ptr %3, align 4, !tbaa !5
  %59 = add nsw i32 %58, -1
  store i32 %59, ptr %3, align 4, !tbaa !5
  br label %50, !llvm.loop !22

60:                                               ; preds = %50
  br label %61

61:                                               ; preds = %60, %38
  %62 = load ptr, ptr @FirstNode, align 8, !tbaa !9
  store ptr %62, ptr %1, align 8, !tbaa !9
  %63 = load ptr, ptr %1, align 8, !tbaa !9
  %64 = getelementptr inbounds %struct.Node, ptr %63, i32 0, i32 3
  store i32 1, ptr %64, align 4, !tbaa !19
  %65 = load ptr, ptr %1, align 8, !tbaa !9
  %66 = getelementptr inbounds %struct.Node, ptr %65, i32 0, i32 16
  %67 = load ptr, ptr %66, align 8, !tbaa !11
  store ptr %67, ptr @FirstFree, align 8, !tbaa !9
  %68 = load ptr, ptr %1, align 8, !tbaa !9
  %69 = getelementptr inbounds %struct.Node, ptr %68, i32 0, i32 16
  %70 = load ptr, ptr %69, align 8, !tbaa !11
  %71 = load ptr, ptr %1, align 8, !tbaa !9
  %72 = getelementptr inbounds %struct.Node, ptr %71, i32 0, i32 15
  %73 = load ptr, ptr %72, align 8, !tbaa !18
  %74 = getelementptr inbounds %struct.Node, ptr %73, i32 0, i32 16
  store ptr %70, ptr %74, align 8, !tbaa !11
  %75 = load ptr, ptr %1, align 8, !tbaa !9
  %76 = getelementptr inbounds %struct.Node, ptr %75, i32 0, i32 15
  %77 = load ptr, ptr %76, align 8, !tbaa !18
  %78 = load ptr, ptr %1, align 8, !tbaa !9
  %79 = getelementptr inbounds %struct.Node, ptr %78, i32 0, i32 16
  %80 = load ptr, ptr %79, align 8, !tbaa !11
  %81 = getelementptr inbounds %struct.Node, ptr %80, i32 0, i32 15
  store ptr %77, ptr %81, align 8, !tbaa !18
  store i32 1, ptr %3, align 4, !tbaa !5
  br label %82

82:                                               ; preds = %119, %61
  %83 = load i32, ptr %3, align 4, !tbaa !5
  %84 = load i32, ptr @Dimension, align 4, !tbaa !5
  %85 = icmp slt i32 %83, %84
  br i1 %85, label %86, label %122

86:                                               ; preds = %82
  %87 = load ptr, ptr %1, align 8, !tbaa !9
  %88 = call ptr @SelectNext(ptr noundef %87)
  store ptr %88, ptr %2, align 8, !tbaa !9
  %89 = load ptr, ptr %2, align 8, !tbaa !9
  %90 = load ptr, ptr @FirstFree, align 8, !tbaa !9
  %91 = icmp eq ptr %89, %90
  br i1 %91, label %92, label %96

92:                                               ; preds = %86
  %93 = load ptr, ptr %2, align 8, !tbaa !9
  %94 = getelementptr inbounds %struct.Node, ptr %93, i32 0, i32 16
  %95 = load ptr, ptr %94, align 8, !tbaa !11
  store ptr %95, ptr @FirstFree, align 8, !tbaa !9
  br label %96

96:                                               ; preds = %92, %86
  %97 = load ptr, ptr %2, align 8, !tbaa !9
  %98 = getelementptr inbounds %struct.Node, ptr %97, i32 0, i32 16
  %99 = load ptr, ptr %98, align 8, !tbaa !11
  %100 = load ptr, ptr %2, align 8, !tbaa !9
  %101 = getelementptr inbounds %struct.Node, ptr %100, i32 0, i32 15
  %102 = load ptr, ptr %101, align 8, !tbaa !18
  %103 = getelementptr inbounds %struct.Node, ptr %102, i32 0, i32 16
  store ptr %99, ptr %103, align 8, !tbaa !11
  %104 = load ptr, ptr %2, align 8, !tbaa !9
  %105 = getelementptr inbounds %struct.Node, ptr %104, i32 0, i32 15
  %106 = load ptr, ptr %105, align 8, !tbaa !18
  %107 = load ptr, ptr %2, align 8, !tbaa !9
  %108 = getelementptr inbounds %struct.Node, ptr %107, i32 0, i32 16
  %109 = load ptr, ptr %108, align 8, !tbaa !11
  %110 = getelementptr inbounds %struct.Node, ptr %109, i32 0, i32 15
  store ptr %106, ptr %110, align 8, !tbaa !18
  %111 = load ptr, ptr %1, align 8, !tbaa !9
  %112 = load ptr, ptr %2, align 8, !tbaa !9
  %113 = load ptr, ptr %1, align 8, !tbaa !9
  %114 = getelementptr inbounds %struct.Node, ptr %113, i32 0, i32 16
  store ptr %112, ptr %114, align 8, !tbaa !11
  %115 = getelementptr inbounds %struct.Node, ptr %112, i32 0, i32 15
  store ptr %111, ptr %115, align 8, !tbaa !18
  %116 = load ptr, ptr %2, align 8, !tbaa !9
  store ptr %116, ptr %1, align 8, !tbaa !9
  %117 = load ptr, ptr %1, align 8, !tbaa !9
  %118 = getelementptr inbounds %struct.Node, ptr %117, i32 0, i32 3
  store i32 1, ptr %118, align 4, !tbaa !19
  br label %119

119:                                              ; preds = %96
  %120 = load i32, ptr %3, align 4, !tbaa !5
  %121 = add nsw i32 %120, 1
  store i32 %121, ptr %3, align 4, !tbaa !5
  br label %82, !llvm.loop !23

122:                                              ; preds = %82
  %123 = load ptr, ptr %1, align 8, !tbaa !9
  %124 = load ptr, ptr @FirstNode, align 8, !tbaa !9
  %125 = load ptr, ptr %1, align 8, !tbaa !9
  %126 = getelementptr inbounds %struct.Node, ptr %125, i32 0, i32 16
  store ptr %124, ptr %126, align 8, !tbaa !11
  %127 = getelementptr inbounds %struct.Node, ptr %124, i32 0, i32 15
  store ptr %123, ptr %127, align 8, !tbaa !18
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %1) #3
  ret void
}

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

declare i32 @Random() #2

; Function Attrs: nounwind uwtable
declare hidden ptr @SelectNext(ptr noundef) #0

; 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 = { "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 = !{!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 72}
!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, !10, i64 88}
!15 = !{!12, !10, i64 80}
!16 = !{!12, !10, i64 128}
!17 = !{!12, !10, i64 136}
!18 = !{!12, !10, i64 64}
!19 = !{!12, !6, i64 12}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}
!22 = distinct !{!22, !21}
!23 = distinct !{!23, !21}


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

%struct.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 }

@Tabu = external hidden local_unnamed_addr global i32, align 4
@FirstNode = external dso_local local_unnamed_addr global ptr, align 8
@Dimension = external dso_local local_unnamed_addr global i32, align 4
@DimensionSaved = external dso_local local_unnamed_addr global i32, align 4
@NodeSet = external dso_local local_unnamed_addr global ptr, align 8
@FirstFree = external hidden local_unnamed_addr global ptr, align 8

; Function Attrs: nounwind uwtable
define dso_local void @ERXT() local_unnamed_addr #0 {
  store i32 0, ptr @Tabu, align 4, !tbaa !5
  %1 = load ptr, ptr @FirstNode, align 8, !tbaa !9
  br label %2

2:                                                ; preds = %2, %0
  %.033 = phi ptr [ %1, %0 ], [ %4, %2 ]
  %3 = getelementptr inbounds i8, ptr %.033, i64 72
  %4 = load ptr, ptr %3, align 8, !tbaa !11
  %5 = getelementptr inbounds i8, ptr %.033, i64 88
  store ptr %4, ptr %5, align 8, !tbaa !14
  %6 = getelementptr inbounds i8, ptr %4, i64 80
  store ptr %.033, ptr %6, align 8, !tbaa !15
  %7 = getelementptr inbounds i8, ptr %.033, i64 128
  %8 = load ptr, ptr %7, align 8, !tbaa !16
  %9 = getelementptr inbounds i8, ptr %8, i64 136
  store ptr %.033, ptr %9, align 8, !tbaa !17
  %10 = getelementptr inbounds i8, ptr %4, i64 64
  store ptr %.033, ptr %10, align 8, !tbaa !18
  %11 = getelementptr inbounds i8, ptr %.033, i64 12
  store i32 0, ptr %11, align 4, !tbaa !19
  %.not = icmp eq ptr %4, %1
  br i1 %.not, label %12, label %2, !llvm.loop !20

12:                                               ; preds = %2
  %13 = load i32, ptr @Dimension, align 4, !tbaa !5
  %14 = load i32, ptr @DimensionSaved, align 4, !tbaa !5
  %15 = icmp eq i32 %13, %14
  br i1 %15, label %16, label %24

16:                                               ; preds = %12
  %17 = load ptr, ptr @NodeSet, align 8, !tbaa !9
  %18 = tail call i32 @Random() #2
  %19 = load i32, ptr @Dimension, align 4, !tbaa !5
  %20 = urem i32 %18, %19
  %21 = add nuw i32 %20, 1
  %22 = zext i32 %21 to i64
  %23 = getelementptr inbounds %struct.Node, ptr %17, i64 %22
  br label %.loopexit.sink.split

24:                                               ; preds = %12
  %25 = tail call i32 @Random() #2
  %.fr = freeze i32 %25
  %26 = load i32, ptr @Dimension, align 4, !tbaa !5
  %27 = urem i32 %.fr, %26
  %FirstNode.promoted = load ptr, ptr @FirstNode, align 8, !tbaa !9
  %28 = icmp sgt i32 %27, 0
  br i1 %28, label %.lr.ph.preheader, label %.loopexit

.lr.ph.preheader:                                 ; preds = %24
  %29 = urem i32 %.fr, %26
  %30 = add i32 %29, -1
  %xtraiter = and i32 %27, 7
  %lcmp.mod.not = icmp eq i32 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.lr.ph.prol.loopexit, label %.lr.ph.prol

.lr.ph.prol:                                      ; preds = %.lr.ph.preheader, %.lr.ph.prol
  %.036.prol = phi i32 [ %34, %.lr.ph.prol ], [ %27, %.lr.ph.preheader ]
  %31 = phi ptr [ %33, %.lr.ph.prol ], [ %FirstNode.promoted, %.lr.ph.preheader ]
  %prol.iter = phi i32 [ %prol.iter.next, %.lr.ph.prol ], [ 0, %.lr.ph.preheader ]
  %32 = getelementptr inbounds i8, ptr %31, i64 72
  %33 = load ptr, ptr %32, align 8, !tbaa !11
  %34 = add nsw i32 %.036.prol, -1
  %prol.iter.next = add i32 %prol.iter, 1
  %prol.iter.cmp.not = icmp eq i32 %prol.iter.next, %xtraiter
  br i1 %prol.iter.cmp.not, label %.lr.ph.prol.loopexit, label %.lr.ph.prol, !llvm.loop !22

.lr.ph.prol.loopexit:                             ; preds = %.lr.ph.prol, %.lr.ph.preheader
  %.036.unr = phi i32 [ %27, %.lr.ph.preheader ], [ %34, %.lr.ph.prol ]
  %.unr = phi ptr [ %FirstNode.promoted, %.lr.ph.preheader ], [ %33, %.lr.ph.prol ]
  %.lcssa45.unr = phi ptr [ poison, %.lr.ph.preheader ], [ %33, %.lr.ph.prol ]
  %35 = icmp ult i32 %30, 7
  br i1 %35, label %.loopexit.sink.split, label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.prol.loopexit, %.lr.ph
  %.036 = phi i32 [ %53, %.lr.ph ], [ %.036.unr, %.lr.ph.prol.loopexit ]
  %36 = phi ptr [ %52, %.lr.ph ], [ %.unr, %.lr.ph.prol.loopexit ]
  %37 = getelementptr inbounds i8, ptr %36, i64 72
  %38 = load ptr, ptr %37, align 8, !tbaa !11
  %39 = getelementptr inbounds i8, ptr %38, i64 72
  %40 = load ptr, ptr %39, align 8, !tbaa !11
  %41 = getelementptr inbounds i8, ptr %40, i64 72
  %42 = load ptr, ptr %41, align 8, !tbaa !11
  %43 = getelementptr inbounds i8, ptr %42, i64 72
  %44 = load ptr, ptr %43, align 8, !tbaa !11
  %45 = getelementptr inbounds i8, ptr %44, i64 72
  %46 = load ptr, ptr %45, align 8, !tbaa !11
  %47 = getelementptr inbounds i8, ptr %46, i64 72
  %48 = load ptr, ptr %47, align 8, !tbaa !11
  %49 = getelementptr inbounds i8, ptr %48, i64 72
  %50 = load ptr, ptr %49, align 8, !tbaa !11
  %51 = getelementptr inbounds i8, ptr %50, i64 72
  %52 = load ptr, ptr %51, align 8, !tbaa !11
  %53 = add nsw i32 %.036, -8
  %54 = add i32 %.036, -9
  %55 = icmp ult i32 %54, -2
  br i1 %55, label %.lr.ph, label %.loopexit.sink.split, !llvm.loop !24

.loopexit.sink.split:                             ; preds = %.lr.ph.prol.loopexit, %.lr.ph, %16
  %.lcssa42.sink = phi ptr [ %23, %16 ], [ %.lcssa45.unr, %.lr.ph.prol.loopexit ], [ %52, %.lr.ph ]
  %.ph = phi i32 [ %19, %16 ], [ %26, %.lr.ph ], [ %26, %.lr.ph.prol.loopexit ]
  store ptr %.lcssa42.sink, ptr @FirstNode, align 8, !tbaa !9
  br label %.loopexit

.loopexit:                                        ; preds = %.loopexit.sink.split, %24
  %56 = phi i32 [ %26, %24 ], [ %.ph, %.loopexit.sink.split ]
  %57 = phi ptr [ %FirstNode.promoted, %24 ], [ %.lcssa42.sink, %.loopexit.sink.split ]
  %58 = getelementptr inbounds i8, ptr %57, i64 12
  store i32 1, ptr %58, align 4, !tbaa !19
  %59 = getelementptr inbounds i8, ptr %57, i64 72
  %60 = load ptr, ptr %59, align 8, !tbaa !11
  store ptr %60, ptr @FirstFree, align 8, !tbaa !9
  %61 = getelementptr inbounds i8, ptr %57, i64 64
  %62 = load ptr, ptr %61, align 8, !tbaa !18
  %63 = getelementptr inbounds i8, ptr %62, i64 72
  store ptr %60, ptr %63, align 8, !tbaa !11
  %64 = getelementptr inbounds i8, ptr %60, i64 64
  store ptr %62, ptr %64, align 8, !tbaa !18
  %65 = icmp sgt i32 %56, 1
  br i1 %65, label %.lr.ph39, label %._crit_edge

.lr.ph39:                                         ; preds = %.loopexit, %.lr.ph39._crit_edge
  %.138 = phi i32 [ %80, %.lr.ph39._crit_edge ], [ 1, %.loopexit ]
  %.13437 = phi ptr [ %66, %.lr.ph39._crit_edge ], [ %57, %.loopexit ]
  %66 = tail call ptr @SelectNext(ptr noundef nonnull %.13437)
  %67 = load ptr, ptr @FirstFree, align 8, !tbaa !9
  %68 = icmp eq ptr %66, %67
  %69 = getelementptr inbounds i8, ptr %66, i64 72
  %70 = load ptr, ptr %69, align 8, !tbaa !11
  br i1 %68, label %71, label %.lr.ph39._crit_edge

71:                                               ; preds = %.lr.ph39
  store ptr %70, ptr @FirstFree, align 8, !tbaa !9
  br label %.lr.ph39._crit_edge

.lr.ph39._crit_edge:                              ; preds = %.lr.ph39, %71
  %72 = getelementptr inbounds i8, ptr %66, i64 72
  %73 = getelementptr inbounds i8, ptr %66, i64 64
  %74 = load ptr, ptr %73, align 8, !tbaa !18
  %75 = getelementptr inbounds i8, ptr %74, i64 72
  store ptr %70, ptr %75, align 8, !tbaa !11
  %76 = load ptr, ptr %72, align 8, !tbaa !11
  %77 = getelementptr inbounds i8, ptr %76, i64 64
  store ptr %74, ptr %77, align 8, !tbaa !18
  %78 = getelementptr inbounds i8, ptr %.13437, i64 72
  store ptr %66, ptr %78, align 8, !tbaa !11
  store ptr %.13437, ptr %73, align 8, !tbaa !18
  %79 = getelementptr inbounds i8, ptr %66, i64 12
  store i32 1, ptr %79, align 4, !tbaa !19
  %80 = add nuw nsw i32 %.138, 1
  %81 = load i32, ptr @Dimension, align 4, !tbaa !5
  %82 = icmp slt i32 %80, %81
  br i1 %82, label %.lr.ph39, label %._crit_edge.loopexit, !llvm.loop !25

._crit_edge.loopexit:                             ; preds = %.lr.ph39._crit_edge
  %.pre41 = load ptr, ptr @FirstNode, align 8, !tbaa !9
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.loopexit
  %83 = phi ptr [ %57, %.loopexit ], [ %.pre41, %._crit_edge.loopexit ]
  %.134.lcssa = phi ptr [ %57, %.loopexit ], [ %66, %._crit_edge.loopexit ]
  %84 = getelementptr inbounds i8, ptr %.134.lcssa, i64 72
  store ptr %83, ptr %84, align 8, !tbaa !11
  %85 = getelementptr inbounds i8, ptr %83, i64 64
  store ptr %.134.lcssa, ptr %85, align 8, !tbaa !18
  ret void
}

declare i32 @Random() local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare hidden ptr @SelectNext(ptr noundef) local_unnamed_addr #0

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 = { "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 }

!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 72}
!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, !10, i64 88}
!15 = !{!12, !10, i64 80}
!16 = !{!12, !10, i64 128}
!17 = !{!12, !10, i64 136}
!18 = !{!12, !10, i64 64}
!19 = !{!12, !6, i64 12}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.unroll.disable"}
!24 = distinct !{!24, !21}
!25 = distinct !{!25, !21}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass